Repository navigation
get_differential_vars: accept IdentityOperator and ScalarOperator mass matrices - #3837
Merged
ChrisRackauckas merged 1 commit intoJul 12, 2026
Conversation
singhharsh1708
force-pushed
the
fix/get-differential-vars-operator-mm
branch
from
July 12, 2026 19:39
2e98253 to
93382fd
Compare
Member
Author
|
Rebased on master. Also fixed a hole in my own first pass. The original patch returned
Test covers the singular case. |
This was referenced Jul 15, 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.
Follow-up to #3814. Once SciML/SciMLOperators.jl#400 lands the
issingularmethods,IdentityOperatorandScalarOperatormass matrices still hitMethodError: no method matching iterate(::IdentityOperator)insideget_differential_varsatlib/OrdinaryDiffEqCore/src/misc_utils.jl:143.Root cause: the function reaches
elseif all(!iszero, mm)and tries to iterate the operator.Fix: treat
IdentityOperatorandScalarOperatorthe same asUniformScaling(both represent scalar-uniform mass matrices) and returnnothingearly.End-to-end verified against the #3814 repro with both fixes in place:
Direct regression test added in
algebraic_vars_detection_tests.jlcallsget_differential_varson both operator kinds and assertsnothing.Depends on SciML/SciMLOperators.jl#400 for full end-to-end.