Skip to content

Commit d01c8c1

Browse files
Merge pull request #2550 from oscardssmith/os/no-Rosenbrock23-with-MM
don't use Rosenbrock23 with mass matrix
2 parents 5c00abb + 51cf004 commit d01c8c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/OrdinaryDiffEqDefault/src/default_alg.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function stiffchoice(reltol, len, mass_matrix)
8181
elseif len > SMALLSIZE
8282
DefaultSolverChoice.FBDF
8383
else
84-
if reltol < LOW_TOL || !isdiag(mass_matrix)
84+
if reltol < LOW_TOL || mass_matrix != I
8585
DefaultSolverChoice.Rodas5P
8686
else
8787
DefaultSolverChoice.Rosenbrock23

lib/OrdinaryDiffEqDefault/test/default_solver_tests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ end
108108
f = ODEFunction(rober_mm, mass_matrix = [1 0 0; 0 1 0; 0 0 0])
109109
prob_rober_mm = ODEProblem(f, [1.0, 0.0, 1.0], (0.0, 1e5), (0.04, 3e7, 1e4))
110110
sol = solve(prob_rober_mm)
111-
@test all(isequal(3), sol.alg_choice)
111+
@test all(isequal(4), sol.alg_choice)
112112
@test sol(0.5) isa Vector{Float64} # test dense output
113113

114114
# test callback on ConstantCache (https://github.com/SciML/OrdinaryDiffEq.jl/issues/2287)

0 commit comments

Comments
 (0)