Repository navigation
Reconstruct array observables once per PDE field - #676
Merged
ChrisRackauckas merged 1 commit intoSep 7, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
This was referenced Sep 5, 2026
Evaluate complete array observations before reshaping spatial values, avoiding a separately generated observed function for each grid point. Preserve the scalar fallback and cover both time-axis positions. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> 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
ChrisRackauckas-Claude
force-pushed
the
batch-array-reconstruction
branch
from
September 5, 2026 12:04
a49c522 to
7260461
Compare
ChrisRackauckas
marked this pull request as ready for review
September 7, 2026 06:14
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 7, 2026
- Trim the array-form capability list from MOLFiniteDifference. (#673) - Stop infinite expansion when a PDE unknown is missing from the system. (#674) - Support vector-valued functions in ArrayDiscretization (#675) - Test ModelingToolkitNeuralNets terms and fix the compiled ODE path (#678) - Add a tutorial on training a neural network term in a PDE (#679) - Stack vector field inputs and batch network calls in ArrayDiscretization (#680) - Add a tutorial on learning the Brusselator reaction with a neural network (#681) - Stack scalar inputs with field slices in ArrayDiscretization (#682) - Test callable diffusion coefficients (#683) - Reconstruct array observables once per PDE field (#676) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
xtalax
added a commit
that referenced
this pull request
Oct 20, 2026
On a compiled system the observed equation of a field is one array literal with a statement per grid point. array_observed_solution evaluated it, and compiling that function grew faster than the grid: wrapping a 2D heat solution took 22 s at 6,241 states. Read the unknown elements by state index and evaluate the observed ones together. A field with no unknowns, such as a reduced order reconstruction (#676), still goes through the array function. Agent-Harness: Claude Code 2.1.296 Agent-Model: claude-opus-5-5 Agent-Session: 644ed0ff-c8c9-4cc3-b4c6-f326231a4030 Agent-Review: unreviewed Co-authored-by: Claude Code <[email protected]>
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.
PDE solution packaging currently requests a separate observed function for each spatial grid point. For array-based reduced systems, this reintroduces compilation that grows with the grid. Evaluate each matching array observation once per saved time and reshape its numeric values; retain the existing scalar fallback.
Companion to SciML/ModelOrderReduction.jl#178. This fixes automatic PDE reconstruction as well as explicit whole-array evaluation. Matching and data movement still scale with the grid; the number of generated observation functions scales with the number of fields.
Ignore this draft until reviewed by @ChrisRackauckas.
Verification
The same regression on unmodified master at b1d818f3 requested 12 and 26 distinct scalar observations for two fields on grids with 6 and 13 points:
The focused regression passes after the fix:
The complete relevant test group passes through
Pkg.test():After rebasing onto 62f07c32, all validation above was repeated successfully: 18 solution-interface tests, 21 QA checks, and 106 MOR Core assertions with both local checkouts. Repository-wide Runic, typos, and
git diff --checkpass. QA passes through the package's standard runner:Run in an environment with this MethodOfLines checkout and the MOR companion checkout, once per size:
julia --project pde-reconstruction-scaling.jl 32andjulia --project pde-reconstruction-scaling.jl 512. The actual runs used Julia 1.12.7 with--check-bounds=yes --depwarn=yes --warn-overwrite=yes --startup-file=no.🤖 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.