Use MethodOfLines v1 array-form DAE path - #177
Conversation
|
Implementation scratchpad and commit map:
Validated after both commits:
The full-order path never constructs an ODEProblem or generated scalar nonlinear function. Tearing is used only to recover the explicit differential equations and the saved DAE states are reordered by symbolic identity before reduction. |
|
CI follow-up:
Local verification on |
Adversarial reviewVerdictDo not merge this as the “fully array-form MOR” solution. It successfully moves the full-order MethodOfLines solve onto the array-form Findings
O(1) compile-time resultFor supported array stencils, yes: the full-order DAE’s symbolic/JIT compilation is consistent with Using Julia 1.12.7, MethodOfLines 1.1.1, ModelingToolkit 11.40.0, and the same kind of two-field 1D stencil:
After warming compilation, increasing from 102 to 1,002 to 10,002 unknowns gave compiler times of 0.50, 0.29, and 0.35 seconds. But total construction time grew from 0.50 to 0.54 to 20.44 seconds, and allocations from 37 MiB to 136 MiB to 7.99 GiB. MethodOfLines necessarily enumerates every scalar unknown when constructing its operating point: https://github.com/SciML/MethodOfLines.jl/blob/v1.1.1/src/dae_discretization.jl#L158-L243. Therefore:
All ten remote checks are green. My local The PR also does not currently follow the repository workflow supplied for this review: it is not a draft, lacks the ignore-until-reviewed note, and its two commit messages have empty bodies without the required co-author/agent trailers. Links
🤖 Review generated by an AI agent using Codex (harness version unavailable; model: GPT-5). Local session; no shareable conversation URL was exposed. |
Summary
This implements the MethodOfLines v1 path referenced by SciMLDocs#350 and supersedes the dependency-only update in #174.
Implementation
MethodOfLines v1 now constructs the full problem with discretize(...; fallback = false) and solves that DAE directly. For POD-DEIM, the new overload:
Projecting all raw DAE residuals would change the existing explicit-ODE DEIM semantics, so this keeps the same algebraic elimination semantics as the old compiled path.
The ModelingToolkit and SciMLBase lower bounds match the MethodOfLines v1 requirements.
Tests
References