Skip to content

Commit

Permalink
Update for use of nanmath default
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored and AayushSabharwal committed Mar 13, 2024
1 parent 6878d5a commit d668b8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/structural_transformation/tearing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down

0 comments on commit d668b8f

Please sign in to comment.