Skip to content

Commit

Permalink
add sanity check for interpolation used
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Nov 29, 2023
1 parent e7fb077 commit b5e768d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/interface/algebraic_interpolation.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using OrdinaryDiffEq
using DiffEqBase
using Test
function rober_ip(du, u, p, t)
y₁, y₂, y₃ = u
Expand Down Expand Up @@ -32,6 +33,13 @@ ref_op = solve(prob_op, Rodas5P(), reltol = 1e-8, abstol = 1e-8)
sol_ip = solve(prob_ip, FBDF(), reltol = 1e-8, abstol = 1e-8)
sol_op = solve(prob_op, FBDF(), reltol = 1e-8, abstol = 1e-8)

# make sure interpolation changes don't accidentally break this test suite
# the intention is that ref uses a stiffness-aware interpolation, while sol uses hermite
@test DiffEqBase.interp_summary(sol_ip) == "3rd order Hermite"
@test DiffEqBase.interp_summary(sol_op) == "3rd order Hermite"
@test occursin("stiffness-aware", DiffEqBase.interp_summary(ref_ip))
@test occursin("stiffness-aware", DiffEqBase.interp_summary(ref_op))

reltol = 1e-4
abstol = 1e-4
t = 1
Expand Down

0 comments on commit b5e768d

Please sign in to comment.