Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jan 29, 2018
1 parent b43e10f commit bb2036c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ abstol = 1e-8
sol = solve(prob,SSRootfind())

du = zeros(2)
f(du,sol.u,p,0)
f(du,sol.u,nothing,0)
@test maximum(du) < 1e-11

prob = ODEProblem(f,u0,(0.0,1.0))
prob = SteadyStateProblem(prob)
sol = solve(prob,SSRootfind(nlsolve = (f,u0,abstol) -> (res=NLsolve.nlsolve(f,u0,autodiff=true,method=:newton,iterations=Int(1e6),ftol=abstol);res.zero) ))

f(du,sol.u,p,0)
f(du,sol.u,nothing,0)
@test du == [0,0]

# Use Sundials
sol = solve(prob,SSRootfind(nlsolve = (f,u0,abstol) -> (res=Sundials.kinsol(f,u0)) ))

f(du,sol.u,p,0)
f(du,sol.u,nothing,0)
@test du == [0,0]

0 comments on commit bb2036c

Please sign in to comment.