Skip to content

Commit

Permalink
Fixes the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 20, 2023
1 parent 52b9efc commit df5f98b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/mirk/nonlinear_least_squares.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ using BoundaryValueDiffEq, LinearAlgebra, Test

for solver in SOLVERS
@time sol = solve(bvp3, solver; verbose = false, dt = 1.0, abstol = 1e-3,
reltol = 1e-3, nlsolve_kwargs = (; maxiters = 50, abstol = 1e-3, reltol = 1e-3))
reltol = 1e-3)
resida = Array{Float64}(undef, 1)
residb = Array{Float64}(undef, 2)
bc1a!(resida, sol(0.0), nothing)
Expand All @@ -82,7 +82,8 @@ end
# This is not a very meaningful problem, but it tests that our solvers are not throwing an
# error
@testset "Underconstrained BVP: Rod BVP" begin
SOLVERS = [mirk(; nlsolve) for mirk in (MIRK4, MIRK5, MIRK6),
# Force normal form for GN
SOLVERS = [mirk(; nlsolve) for mirk in (MIRK4, MIRK5),
nlsolve in (LevenbergMarquardt(), GaussNewton(), nothing)]

function hat(y)
Expand Down Expand Up @@ -183,10 +184,10 @@ end

for solver in SOLVERS
@time sol = solve(prob_tp, solver; verbose = false, dt = 0.1, abstol = 1e-3,
reltol = 1e-3, nlsolve_kwargs = (; maxiters = 50, abstol = 1e-3, reltol = 1e-3))
reltol = 1e-3)
@test SciMLBase.successful_retcode(sol.retcode)
@time sol = solve(prob, solver; verbose = false, dt = 0.1, abstol = 1e-3,
reltol = 1e-3, nlsolve_kwargs = (; maxiters = 50, abstol = 1e-3, reltol = 1e-3))
reltol = 1e-3)
@test SciMLBase.successful_retcode(sol.retcode)
end
end

0 comments on commit df5f98b

Please sign in to comment.