11# ## TODO : update when BoundaryValueDiffEqAscher is updated to use the normal boundary condition conventions
22using OrdinaryDiffEq
33using BoundaryValueDiffEqMIRK, BoundaryValueDiffEqAscher
4- using BenchmarkTools
54using ModelingToolkit
65using SciMLBase
76using ModelingToolkit: t_nounits as t, D_nounits as D
@@ -30,8 +29,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6]
3029
3130 for solver in solvers
3231 sol = solve (bvp, solver (), dt = 0.01 )
33- @test isapprox (sol. u[end ], osol. u[end ]; atol = 0.01 )
34- @test sol. u[1 ] == [1.0 , 2.0 ]
32+ @test_broken isapprox (sol. u[end ], osol. u[end ]; atol = 0.01 )
33+ @test_broken sol. u[1 ] == [1.0 , 2.0 ]
3534 end
3635
3736 # Test out of place
@@ -40,8 +39,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6]
4039
4140 for solver in solvers
4241 sol = solve (bvp2, solver (), dt = 0.01 )
43- @test isapprox (sol. u[end ], osol. u[end ]; atol = 0.01 )
44- @test sol. u[1 ] == [1.0 , 2.0 ]
42+ @test_broken isapprox (sol. u[end ], osol. u[end ]; atol = 0.01 )
43+ @test_broken sol. u[1 ] == [1.0 , 2.0 ]
4544 end
4645end
4746
@@ -125,18 +124,18 @@ end
125124 bvpi4 = SciMLBase. BVProblem {false, SciMLBase.FullSpecialize} (
126125 lksys, [x (t) => 1.0 ], tspan; guesses = [y (t) => 1.0 ])
127126
128- sol1 = @btime solve ($ bvpi1, MIRK4 (), dt = 0.01 )
129- sol2 = @btime solve ($ bvpi2, MIRK4 (), dt = 0.01 )
130- sol3 = @btime solve ($ bvpi3, MIRK4 (), dt = 0.01 )
131- sol4 = @btime solve ($ bvpi4, MIRK4 (), dt = 0.01 )
127+ sol1 = solve (bvpi1, MIRK4 (), dt = 0.01 )
128+ sol2 = solve (bvpi2, MIRK4 (), dt = 0.01 )
129+ sol3 = solve (bvpi3, MIRK4 (), dt = 0.01 )
130+ sol4 = solve (bvpi4, MIRK4 (), dt = 0.01 )
132131 @test sol1 ≈ sol2 ≈ sol3 ≈ sol4 # don't get true equality here, not sure why
133132end
134133
135134function test_solvers (
136135 solvers, prob, u0map, constraints, equations = []; dt = 0.05 , atol = 1e-2 )
137136 for solver in solvers
138137 println (" Solver: $solver " )
139- sol = @btime solve ($ prob, $ solver (), dt = $ dt, abstol = $ atol)
138+ sol = solve (prob, solver (), dt = dt, abstol = atol)
140139 @test SciMLBase. successful_retcode (sol. retcode)
141140 p = prob. p
142141 t = sol. t
0 commit comments