Repository navigation
Keep POD-DEIM ROMs array-based for v1 - #178
Merged
Merged
Conversation
Return array dynamics and field reconstruction from both high-level entry points. Evaluate training snapshots and consistent initial derivatives offline, retain the training parameter point, and substitute eliminated algebraic variables before projection. Add numerical and graph-size regressions and a compilation benchmark. Document the offline complexity boundary and fitted algebraic reconstruction. Track the independent array-indexing issue at SciML/ModelingToolkit.jl#5072. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: /home/crackauc/.codex/sessions/2026/09/05/rollout-2026-09-05T05-19-42-01a070dd-d97a-7180-9b71-095f2a5f5489.jsonl
This was referenced Sep 5, 2026
ChrisRackauckas
marked this pull request as ready for review
September 6, 2026 06:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ignore this PR until reviewed by @ChrisRackauckas.
The previous implementation kept the full-order MethodOfLines solve array-based but returned scalar reduced dynamics and one reconstruction equation per full-order state. This replaces the high-level reduction with one array dynamics equation and one array reconstruction per source field, stores the full lift as an array parameter, and prepares the package for v1.0.0.
The system and DAE entry points now share this path. Offline reduction substitutes eliminated algebraic variables with
full_equations, evaluates nonlinear training snapshots without generating full-order scalar functions, preserves parameter defaults, and uses the DAE problem's actual training parameters and times. The ROM is a freshSystemwith consistent projected initial state and derivative values; the examples construct array-formDAEProblems.This supersedes #177 and builds on the array representation explored in #174 and addresses the review at #177 (comment).
Compilation evidence
For fixed POD/DEIM dimensions, field count, forcing expression count, and nonlinear stencil size, the generated ROM graph is independent of the full-order grid. The structural regression checks equation/observable counts and tree sizes across two MethodOfLines grids. The checked-in benchmark/array_compilation.jl separately measures offline reduction, problem construction, first RHS evaluation, and first reconstruction.
Fresh Julia 1.12.7 processes, two POD/DEIM modes, one array field with pointwise cubic dynamics:
These are compiler counters from
@timed, excluding package loading. Offline time increased from 18.16 to 20.55 seconds across those sizes. Offline reduction, problem construction, lift storage, and full-field evaluation are not claimed to be O(1).Failing before / passing after
The same
test/array_structure.jlwas copied into an unchanged checkout of 3ef906c and run with the same dependency versions:TMPDIR="$PWD/../validation/tmp" /home/crackauc/.juliaup/bin/julia +1.12 --check-bounds=yes --depwarn=yes --warn-overwrite=yes --startup-file=no --project=../validation/before-env ../ModelOrderReduction.jl/test/array_structure.jlLocal verification
106/106 passed, including all six assertions in the same regression file used above.
TMPDIR="$PWD/../validation/tmp" GKSwstype=100 timeout 3600 /home/crackauc/.juliaup/bin/julia +1.12 --check-bounds=yes --depwarn=yes --warn-overwrite=yes --startup-file=no --project=docs docs/make.jlFull Documenter build, doctests, executed tutorial, rendering, and link checks passed; recorded exit status 0. Local deployment was skipped by Documenter.
Repository-wide
Runic --check .,typos, andgit diff --checkall exited 0.All 10 PR validation checks passed for commit 2455dd6, including release/LTS/prerelease tests, QA, downgrade tests, and documentation. Test matrix: https://github.com/SciML/ModelOrderReduction.jl/actions/runs/33962122865.
MethodOfLines integration and release dependency
MethodOfLines 1.3.0 requests each grid point's observed function separately when packaging PDE solutions. The companion fix, SciML/MethodOfLines.jl#676, requests one array evaluator per field. Ship v1 with that fix released and raise the MethodOfLines compatibility floor when its release is available. Until then, use the two branches together for automatic PDE reconstruction; explicit whole-array evaluation already has the measured behavior above.
The final combined checkouts pass all 106 MOR Core assertions. The companion passes 18 solution-interface tests and 21 QA checks, including a regression that fails on unmodified MethodOfLines master (12/26 observed requests instead of 2) and passes after (2 requests on both grids).
With the two branches, actual PDE reconstruction in fresh Julia processes compiled in 6.802 s for 32 intervals and 5.725 s for 512 intervals, with two POD/DEIM modes and three saved times. The measurement includes PDE field packaging and interpolation construction; it excludes package loading, discretization, offline reduction, and problem construction. The full reproducer and timings are in the companion PR.
Scope and review decisions
DAEProblemcode generation. Scalarizing the returned system forfeits this compilation property. The low-level matrix-projection overload remains available.SymbolicIndexingInterface.observedfunction. A separate convenience-indexing bug was reduced to a ModelingToolkit-only reproducer and reported at Array observed state is misclassified as parameter-only by getu ModelingToolkit.jl#5072. PDE metadata-based field retrieval is tested.Links
🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; local session: 01a070dd-d97a-7180-9b71-095f2a5f5489). Transcript:
/home/crackauc/.codex/sessions/2026/09/05/rollout-2026-09-05T05-19-42-01a070dd-d97a-7180-9b71-095f2a5f5489.jsonl.