From d668b8f2f37a7b233351765369b6cfe0a7f97a29 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 13 Mar 2024 06:57:00 -0400 Subject: [PATCH] Update for use of nanmath default --- test/structural_transformation/tearing.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/structural_transformation/tearing.jl b/test/structural_transformation/tearing.jl index debafd2f51..8bf09a480b 100644 --- a/test/structural_transformation/tearing.jl +++ b/test/structural_transformation/tearing.jl @@ -164,9 +164,10 @@ prob.f(du, u, pr, tt) @test du≈[u[2], u[1] + sin(u[2]) - pr * tt] atol=1e-5 # test the initial guess is respected -@named sys = ODESystem(eqs, t, defaults = Dict(z => Inf)) +@named sys = ODESystem(eqs, t, defaults = Dict(z => NaN)) infprob = ODEProblem(structural_simplify(sys), [x => 1.0], (0, 1.0), [p => 0.2]) -@test_throws Any infprob.f(du, infprob.u0, pr, tt) +infprob.f(du, infprob.u0, pr, tt) +@test any(isnan, du) sol1 = solve(prob, RosShamp4(), reltol = 8e-7) sol2 = solve(ODEProblem{false}((u, p, t) -> [-asin(u[1] - pr * t)],