Skip to content

Commit

Permalink
Merge pull request SciML#2550 from oscardssmith/os/no-Rosenbrock23-wi…
Browse files Browse the repository at this point in the history
…th-MM

don't use Rosenbrock23 with mass matrix
  • Loading branch information
ChrisRackauckas authored Dec 4, 2024
2 parents 5c00abb + 51cf004 commit d01c8c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqDefault/src/default_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function stiffchoice(reltol, len, mass_matrix)
elseif len > SMALLSIZE
DefaultSolverChoice.FBDF
else
if reltol < LOW_TOL || !isdiag(mass_matrix)
if reltol < LOW_TOL || mass_matrix != I
DefaultSolverChoice.Rodas5P
else
DefaultSolverChoice.Rosenbrock23
Expand Down
2 changes: 1 addition & 1 deletion lib/OrdinaryDiffEqDefault/test/default_solver_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ end
f = ODEFunction(rober_mm, mass_matrix = [1 0 0; 0 1 0; 0 0 0])
prob_rober_mm = ODEProblem(f, [1.0, 0.0, 1.0], (0.0, 1e5), (0.04, 3e7, 1e4))
sol = solve(prob_rober_mm)
@test all(isequal(3), sol.alg_choice)
@test all(isequal(4), sol.alg_choice)
@test sol(0.5) isa Vector{Float64} # test dense output

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

0 comments on commit d01c8c1

Please sign in to comment.