1
1
# ## TODO : update when BoundaryValueDiffEqAscher is updated to use the normal boundary condition conventions
2
2
using OrdinaryDiffEq
3
3
using BoundaryValueDiffEqMIRK, BoundaryValueDiffEqAscher
4
- using BenchmarkTools
5
4
using ModelingToolkit
6
5
using SciMLBase
7
6
using ModelingToolkit: t_nounits as t, D_nounits as D
@@ -30,8 +29,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6]
30
29
31
30
for solver in solvers
32
31
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 ]
35
34
end
36
35
37
36
# Test out of place
@@ -40,8 +39,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6]
40
39
41
40
for solver in solvers
42
41
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 ]
45
44
end
46
45
end
47
46
@@ -125,18 +124,18 @@ end
125
124
bvpi4 = SciMLBase. BVProblem {false, SciMLBase.FullSpecialize} (
126
125
lksys, [x (t) => 1.0 ], tspan; guesses = [y (t) => 1.0 ])
127
126
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 )
132
131
@test sol1 ≈ sol2 ≈ sol3 ≈ sol4 # don't get true equality here, not sure why
133
132
end
134
133
135
134
function test_solvers (
136
135
solvers, prob, u0map, constraints, equations = []; dt = 0.05 , atol = 1e-2 )
137
136
for solver in solvers
138
137
println (" Solver: $solver " )
139
- sol = @btime solve ($ prob, $ solver (), dt = $ dt, abstol = $ atol)
138
+ sol = solve (prob, solver (), dt = dt, abstol = atol)
140
139
@test SciMLBase. successful_retcode (sol. retcode)
141
140
p = prob. p
142
141
t = sol. t
0 commit comments