|
67 | 67 | tspan = (0.0, 6.0) |
68 | 68 |
|
69 | 69 | op = ODEProblem(pend, [u0map; parammap], tspan) |
70 | | - osol = solve(op, Vern9()) |
| 70 | + osol = solve(op, Vern9(), abstol=1e-10, reltol=1e-10) |
71 | 71 |
|
72 | | - bvp = SciMLBase.BVProblem{true, SciMLBase.AutoSpecialize}( |
73 | | - pend, [u0map; parammap], tspan |
74 | | - ) |
| 72 | + bvp = BVProblem(pend, [u0map; parammap], tspan) |
75 | 73 | for solver in solvers |
76 | | - sol = solve(bvp, solver(), dt = 0.01) |
77 | | - @test isapprox(sol.u[end], osol.u[end]; atol = 0.01) |
| 74 | + sol = solve(bvp, solver(), dt = 1e-2) |
| 75 | + @test isapprox(sol.u[end], osol.u[end]) |
78 | 76 | @test sol.u[1] == [π / 2, π / 2] |
79 | 77 | end |
80 | 78 |
|
81 | 79 | # Test out-of-place |
82 | | - bvp2 = SciMLBase.BVProblem{false, SciMLBase.FullSpecialize}( |
83 | | - pend, [u0map; parammap], tspan |
84 | | - ) |
| 80 | + bvp2 = BVProblem{false, SciMLBase.FullSpecialize}(pend, [u0map; parammap], tspan) |
85 | 81 |
|
86 | 82 | for solver in solvers |
87 | 83 | sol = solve(bvp2, solver(), dt = 0.01) |
88 | | - @test isapprox(sol.u[end], osol.u[end]; atol = 0.01) |
| 84 | + @test isapprox(sol.u[end], osol.u[end]) |
89 | 85 | @test sol.u[1] == [π / 2, π / 2] |
90 | 86 | end |
91 | 87 | end |
|
0 commit comments