Repository navigation
Add ArrayInterface.issingular for IdentityOperator and ScalarOperator - #400
Merged
ChrisRackauckas merged 2 commits intoJul 9, 2026
Merged
ChrisRackauckas merged 2 commits into
ChrisRackauckas merged 2 commits into
Conversation
Lets these operators be used as mass matrices in DiffEq solvers.
This was referenced Jul 8, 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.
IdentityOperatorandScalarOperatorcannot be used asf.mass_matrixin OrdinaryDiffEq today becauseArrayInterface.issingularis not defined on them, so the DAE check at the top ofsolvethrows before the solver even starts. Repro on master: SciML/OrdinaryDiffEq.jl#3814.Adds:
Alongside the existing
ArrayInterface.issingular(::MatrixOperator)inmatrix.jl:278.Tests exercise both methods in
test/basic.jlandtest/scalar.jl.Note: this fixes only the
issingularblocker. A separate follow-up in OrdinaryDiffEqCore is needed forget_differential_vars(lib/OrdinaryDiffEqCore/src/misc_utils.jl:143), which callsall(!iszero, mass_matrix)and needs anIdentityOperator/ScalarOperator-aware branch.