Skip to content

Transfer MTK metadata from PDESystem to discretized System - #658

Merged
ChrisRackauckas merged 8 commits into
SciML:masterfrom
mjowen:transfer-metadata
Aug 26, 2026
Merged

ChrisRackauckas merged 8 commits into
SciML:masterfrom
mjowen:transfer-metadata

Conversation

@mjowen

@mjowen mjowen commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Any MTK metadata (those available as ModelingToolkit.Variable...) that is present in the PDESystem is now copied across to the final discretized system. This allows options like irreducible to be used to avoid simplifications and reductions on particular variables.

There are some metadata options that aren't included here (default, guess, disturbance, distribution, and tunable), since I don't think they work with hasmetadata and getmetadata, and there is no public setter for them.

mjowen added 4 commits August 24, 2026 16:22
tests mtk metadata is passed through to the discretized system and that the final system is compiled according to that metadata (irreducible=true on g)
the metadata from the pdesys variables is copied to the discretized array variable - MTK then ensures the individual indexes of the array variable use the same metadata
@mjowen

mjowen commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixes #614

@mjowen

mjowen commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

I have fixed the formatting and explicit import errors. Everything should pass now

@ChrisRackauckas
ChrisRackauckas merged commit 4974661 into SciML:master Aug 26, 2026
69 checks passed
ChrisRackauckas referenced this pull request Aug 27, 2026
v1.1.1 was never registered - AutoMerge rejected it because `import MethodOfLines` failed, and that PR was closed unmerged. The version number is therefore still free, so 1.1.2 would skip it and trips the sequential-version guideline. Restore 1.1.1, keeping the Symbolics 7.38 floor that actually fixes the load failure.



Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants