Skip to content

Commit

Permalink
handle SciMLOperators
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 10, 2023
1 parent ce6980f commit 6ec50f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/misc_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,11 @@ function get_differential_vars(f, u)
differential_vars = nothing
if hasproperty(f, :mass_matrix)
mm = f.mass_matrix
mm = mm isa MatrixOperator ? mm.A : mm

if mm isa UniformScaling
return nothing
elseif isdiag(mm)
elseif !(mm isa SciMLOperators.AbstractSciMLOperators) && isdiag(mm)
differential_vars = reshape(diag(mm) .!= 0, size(u))
else
return DifferentialVarsUndefined()
Expand Down

0 comments on commit 6ec50f5

Please sign in to comment.