Repository navigation
Add DAE initialisation helpers (Brown init check, operating point) - #142
Merged
Merged
Conversation
Brown init offender check, differential unknown classification, DAE operating point and time derivative order are discretizer-independent, so they live in PDEBase (FiniteElementMethod spec 4.3). Agent-Harness: Claude Code 2.1.310 Agent-Model: claude-sonnet-5-5 Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2 Agent-Review: unreviewed Co-authored-by: Claude Code <[email protected]>
differential_unknowns threw a MethodError for slices such as u[:, 2:4] because CartesianIndices cannot take a Colon. _region now takes the parent unknown and expands a colon to its dimension. Agent-Harness: Claude Code 2.1.310 Agent-Model: claude-sonnet-5-5 Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2 Agent-Review: unreviewed Co-authored-by: Claude Code <[email protected]>
xtalax-droid
pushed a commit
to xtalax-droid/PDEBase.jl
that referenced
this pull request
Oct 28, 2026
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.
Problem. MethodOfLines holds discretizer-independent helpers for building a
DAEProblemwithoutmtkcompile. They classify differential and algebraic unknowns per element or slice, check whetherBrownFullBasicInit()is safe for a system's initialization equations, and build the operating point. Other discretizers, such as the planned FiniteElementMethod.jl (design spec section 4.3), need them too.Fix. Add
src/dae_support.jlwithBrownFullBasicInitUnsafeError,brown_init_offenders,differential_unknowns,dae_operating_pointandtime_derivative_order. The logic is copied from MethodOfLines apart from names and imports. One deliberate difference: slice regions now expand a colon index to its whole dimension, so slices such asu[:, 2:4]no longer throw aMethodError. The five names are declared public through@publicand documented indocs/src/api.md. MethodOfLines is untouched.Tests. New
test/dae_support.jlcovers each helper on a scalar system (differential, algebraic, coupled and derivative offenders, the error message, the operating point) and on array systems (slice-mask classification, element and slice offenders, a slice straddling an algebraic boundary, an array operating point, colon slices).GROUP=CoreandGROUP=QApass on Julia 1.12;ltsandprewere not run locally.Review notes. The colon expansion uses
size(unknown)of a symbolic array, exercised only for[1:3, 1:5]shapes. MethodOfLines has the same_regionbug until it imports these helpers. The first line of theshowerrortext changed so PDEBase does not name MethodOfLines; the rest is unchanged.🤖 Posted by an AI agent · harness: Claude Code 2.1.310 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2