Skip to content

Commit

Permalink
Up
Browse files Browse the repository at this point in the history
  • Loading branch information
vyudu committed Dec 16, 2024
1 parent 999ec30 commit 9226ad6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/bvproblem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ osol = solve(op, Vern9())
bvp = SciMLBase.BVProblem{true, SciMLBase.AutoSpecialize}(lotkavolterra, u0map, tspan, parammap; eval_expression = true)

for solver in solvers
println("$solver")
sol = solve(bvp, solver(), dt = 0.01)
@test isapprox(sol.u[end], osol.u[end]; atol = 0.01)
@test sol.u[1] == [1., 2.]
Expand All @@ -47,15 +46,15 @@ eqs = [D(D(θ)) ~ -(g / L) * sin(θ)]

u0map ==> π/2, D(θ) => π/2]
parammap = [:L => 1., :g => 9.81]
tspan = (0., 10.)
tspan = (0., 6.)

op = ODEProblem(pend, u0map, tspan, parammap)
osol = solve(op, Vern9())

bvp = SciMLBase.BVProblem{true, SciMLBase.AutoSpecialize}(pend, u0map, tspan, parammap)
for solver in solvers
sol = solve(bvp2, solver(), dt = 0.01)
@test isapprox(sol.u[end],osol.u[end]; atol = 0.01)
sol = solve(bvp, solver(), dt = 0.01)
@test isapprox(sol.u[end], osol.u[end]; atol = 0.01)
@test sol.u[1] ==/2, π/2]
end

Expand Down

0 comments on commit 9226ad6

Please sign in to comment.