Skip to content

Commit

Permalink
fix depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jan 24, 2024
1 parent 270df7f commit 8b91268
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions test/common_interface/cvode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ sol9 = solve(prob, CVODE_BDF(; linear_solver = :Dense))
sol10 = solve(prob, CVODE_BDF(; linear_solver = :LapackDense))
sol11 = solve(prob, CVODE_BDF(; linear_solver = :LapackBand, jac_upper = 3, jac_lower = 3))

@test isapprox(sol1[end], sol2[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol3[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol4[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol5[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol6[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol7[end]; rtol = 1e-3)
@test isapprox(sol1[end], sol8[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol2.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol3.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol4.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol5.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol6.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol7.u[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol8.u[end]; rtol = 1e-3)
#@test isapprox(sol1[end],sol9[end],rtol=1e-3)

# Test identity preconditioner
Expand All @@ -99,12 +99,12 @@ global psetup_used = false
prec = (z, r, p, t, y, fy, gamma, delta, lr) -> (global prec_used = true; z .= r)
psetup = (p, t, u, du, jok, jcurPtr, gamma) -> (global psetup_used = true; jcurPtr[] = false)
sol4 = solve(prob, CVODE_BDF(; linear_solver = :GMRES, prec_side = 3, prec = prec))
@test isapprox(sol1[end], sol4[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol4.u[end]; rtol = 1e-3)
@test prec_used
sol4 = solve(prob,
CVODE_BDF(; linear_solver = :GMRES, prec_side = 3, prec = prec,
psetup = psetup))
@test isapprox(sol1[end], sol4[end]; rtol = 1e-3)
@test isapprox(sol1.u[end], sol4.u[end]; rtol = 1e-3)
@test psetup_used

# Backwards
Expand Down
4 changes: 2 additions & 2 deletions test/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear
function regression_test(alg, tol_ode_linear, tol_ode_2Dlinear)
sol = solve(prob_ode_linear, alg, dense = true, abstol = 1e-8, reltol = 1e-8)
@inferred sol(0.5)
u0 = sol[1]
u0 = sol.u[1]
p = sol.prob.p
for t in 0.0:(1 / 16):1.0
@test isapprox(u0 * exp(p * t), sol(t), rtol = tol_ode_linear)
end

sol = solve(prob_ode_2Dlinear, alg, dt = 1 / 2^(2), dense = true)
sol2 = solve(prob_ode_2Dlinear, alg, dense = true, abstol = 1e-8, reltol = 1e-8)
u0 = sol[1]
u0 = sol.u[1]
p = sol.prob.p
for t in 0.0:(1 / 16):1.0
@test isapprox(u0 .* exp(p * t), sol(t), rtol = tol_ode_2Dlinear)
Expand Down

0 comments on commit 8b91268

Please sign in to comment.