Skip to content

Support MethodOfLines v1 array-form reductions - #174

Closed
dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/julia/docs/all-julia-packages-4d9b98e3c8
Closed

dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/julia/docs/all-julia-packages-4d9b98e3c8

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Require MethodOfLines 1.1 in the test and documentation environments and raise the ModelingToolkit floor to 11.39.1.
  • Accept the uncompiled symbolic array system returned by symbolic_discretize in deim.
  • Route every high-level deim(::ODESystem, ...) call through the array-form reduction path, including inputs that @mtkcompile has scalarized. The former scalar build_function code-generation path has been removed.
  • Perform structural elimination offline, reduce only the resulting dynamic states, and evaluate nonlinear training snapshots by symbolic substitution instead of compiling a full-grid nonlinear output function.
  • Return one symbolic array dynamics equation and one array-valued reconstruction observable per array-backed original state field.
  • Restore canonical array indexing after mtkcompile, including reversed one-dimensional arrays and arbitrary multidimensional permutations.
  • Store the full reconstruction lift as one sized array parameter, preserving model parameter defaults and unrelated user observables.
  • Update the FitzHugh-Nagumo README and tutorial to solve MethodOfLines v1 array-form DAEProblems.

Complexity boundary

For fixed POD and DEIM dimensions and a fixed number of state fields, the generated reduced equation and observable graph is independent of the spatial grid size. The regression compares 5 and 20 intervals and obtains the same equation count, observable count, parameter count, and symbolic tree sizes.

This does not make the entire offline reduction O(1). Structural preprocessing, POD/DEIM basis construction, the O(nk) reconstruction matrix, and full-field observable evaluation still scale with the full-order grid. The optimization targets compilation of the returned reduced solve.

Numerical design

Projecting the raw MethodOfLines descriptor DAE directly is not equivalent to eliminating its algebraic boundary states and produced an inaccurate reduced trajectory. This implementation therefore performs structural elimination before POD/DEIM projection, while keeping the returned online dynamics and reconstruction observables in array form.

MethodOfLines symbolic_discretize output should be passed before structural compilation so its complete field and boundary reconstruction metadata remains available. MOR may scalarize it internally for offline analysis, but its generated reduced dynamics remain a single symbolic array equation.

Validation

  • julia --project=. -e 'using Pkg; Pkg.test()': 93 tests passed.
  • Local-only Documenter build with doctests, document checks, tutorial execution, and link checking: passed.
  • Runic --check .: passed.
  • End-to-end MethodOfLines 1.1 FitzHugh-Nagumo full and reduced DAEs: successful retcodes, full-field v(x,t) and w(x,t) retrieval, and trajectory error below the regression threshold.
  • Completed-but-unscheduled input is structurally compiled before reduction.
  • Scalarized one-dimensional and multidimensional @mtkcompile inputs reduce to one array dynamics equation, solve successfully, and reconstruct in canonical array order.
  • Defaulted scalar and matrix parameters used inside nonlinear array dynamics are preserved and evaluated at the training parameter point.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file julia Pull requests that update julia code labels Aug 21, 2026
Updates the requirements on  and [MethodOfLines](https://github.com/SciML/MethodOfLines.jl) to permit the latest version.

Updates `MethodOfLines` to 1.1.0
- [Release notes](https://github.com/SciML/MethodOfLines.jl/releases)
- [Changelog](https://github.com/SciML/MethodOfLines.jl/blob/master/NEWS.md)
- [Commits](https://github.com/SciML/MethodOfLines.jl/commits)

Updates `MethodOfLines` to 1.1.0
- [Release notes](https://github.com/SciML/MethodOfLines.jl/releases)
- [Changelog](https://github.com/SciML/MethodOfLines.jl/blob/master/NEWS.md)
- [Commits](https://github.com/SciML/MethodOfLines.jl/commits)

---
updated-dependencies:
- dependency-name: MethodOfLines
  dependency-version: 1.0.0
  dependency-type: direct:production
  dependency-group: all-julia-packages
- dependency-name: MethodOfLines
  dependency-version: 1.0.0
  dependency-type: direct:production
  dependency-group: all-julia-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/julia/docs/all-julia-packages-4d9b98e3c8 branch from a831769 to 846adfb Compare August 24, 2026 21:10
@ChrisRackauckas ChrisRackauckas changed the title Bump the all-julia-packages group across 2 directories with 1 update Support MethodOfLines v1 array-form reductions Aug 25, 2026
@ChrisRackauckas

Copy link
Copy Markdown
Member

Implementation record for e7ea205:

  1. Audited PR Support MethodOfLines v1 array-form reductions #174, current main, the existing scalar DEIM path, and the MethodOfLines 1.1 array DAE API.
  2. Prototyped raw descriptor projection and rejected it because algebraic boundary constraints made the reduced trajectory numerically invalid.
  3. Implemented structural preprocessing followed by POD/DEIM on dynamic states, with array-form reduced dynamics and parent-array reconstruction observables.
  4. Added atomic reconstruction parameter defaults, original parameter/default preservation, nonlinear parameter training values, original observable preservation, and explicit validation that preprocessing produces one differential equation per dynamic unknown.
  5. Updated the README and tutorial from scalarized ODEProblem plus Tsit5 to the MethodOfLines v1 array DAEProblem workflow.
  6. Added end-to-end solve, reconstruction, accuracy, parameterized-nonlinearity, and grid-independent symbolic graph regressions.
  7. Ran the full package tests, local-only documentation build, and Runic check successfully before pushing.

@ChrisRackauckas

Copy link
Copy Markdown
Member

Follow-up plan from review feedback:

  • remove equation-form dispatch and the legacy scalar build_function code-generation branch
  • route every ODESystem reduction through one array-output implementation
  • allow mtkcompile to scalarize internally for structural analysis, while keeping the returned reduced dynamics as one symbolic array equation
  • cover an already compiled scalar input to prove it also returns array-form codegen
  • rerun package tests, docs, Runic, and the full PR CI matrix

@ChrisRackauckas

Copy link
Copy Markdown
Member

Follow-up commit 29902c7 implements the array-only code-generation feedback:

  • deim(::ODESystem, ...) now always uses the array-form reduction path. The scalar dispatch, tearing_substitution, and runtime build_function nonlinear snapshot path are removed.
  • Already scheduled @mtkcompile inputs are analyzed without recompiling; completed-but-unscheduled inputs are still structurally compiled.
  • The reduced dynamics are always emitted as one symbolic array equation, and reconstruction expressions multiply by the reduced parent array directly.
  • Source array elements are restored to canonical index order after scalarization, including arbitrary multidimensional permutations.

Added regressions cover complete(...), scalarized 1D and 2D array inputs, successful reduced DAE solves, canonical reconstruction, and the existing grid-independent symbolic graph check.

Local validation:

  • Full Pkg.test(): 93/93 passed, including DEIM 37/37.
  • Runic check: passed.
  • Local-only Documenter build with doctests, tutorial execution, checks, and link checking: passed.

@ChrisRackauckas

Copy link
Copy Markdown
Member

Follow-up commit 2e95959 fixes the QA ownership error by replacing the non-public ModelingToolkit.isscheduled access with the public, ModelingToolkit-owned ModelingToolkit.get_isscheduled accessor. The scheduling behavior is unchanged. Local validation after the fix: QA 20/20, full package tests 93/93, and Runic check passed.

@ChrisRackauckas

Copy link
Copy Markdown
Member

Closing as superseded: superseded by #178, which replaces this dependabot branch.


🤖 Posted by an AI agent — harness: Claude Code, model: claude-opus-5[1m]. Chris asked for these closures directly.

https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

@dependabot @github

dependabot Bot commented on behalf of github Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

This pull request was built based on a group rule. Closing it will not ignore any of these versions in future pull requests.

To ignore these dependencies, configure ignore rules in dependabot.yml

@dependabot
dependabot Bot deleted the dependabot/julia/docs/all-julia-packages-4d9b98e3c8 branch September 6, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file julia Pull requests that update julia code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant