Skip to content

Commit

Permalink
Update solve.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Nov 2, 2023
1 parent 4cc617d commit 3a76bb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ function DiffEqBase.__init(prob::Union{DiffEqBase.AbstractODEProblem,
end

if alg isa OrdinaryDiffEqRosenbrockAdaptiveAlgorithm &&
!(prob.f.mass_matrix isa SciMLOperators.AbstractSciMLOperator) &&
prob.f.mass_matrix isa AbstractMatrix &&
all(isequal(0), prob.f.mass_matrix)
# technically this should also warn for zero operators but those are hard to check for
alg isa Union{Rosenbrock23, Rosenbrock32} && error("Rosenbrock23 and Rosenbrock32 require at least one differential variable to produce valid solutions")
if dense && verbose
@warn("Rosenbrock methods have questionable interpolations when applied to equations without differential states.")
Expand Down

0 comments on commit 3a76bb0

Please sign in to comment.