@@ -28,8 +28,8 @@ function bc_pendulum(u, p, t)
28
28
return [u ((t0 + t1) / 2 )[1 ] + π / 2 , u (t1)[1 ] - π / 2 ]
29
29
end
30
30
31
- const prob_oop = BVProblem (simple_pendulum, bc_pendulum, [π / 2 , π / 2 ], tspan)
32
- const prob_iip = BVProblem (simple_pendulum!, bc_pendulum!, [π / 2 , π / 2 ], tspan)
31
+ const prob_oop = BVProblem {false} (simple_pendulum, bc_pendulum, [π / 2 , π / 2 ], tspan)
32
+ const prob_iip = BVProblem {true} (simple_pendulum!, bc_pendulum!, [π / 2 , π / 2 ], tspan)
33
33
34
34
end
35
35
@@ -42,27 +42,35 @@ function create_simple_pendulum_benchmark()
42
42
suite[" IIP" ] = iip_suite
43
43
suite[" OOP" ] = oop_suite
44
44
45
- iip_suite[" MultipleShooting(100, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
46
- $ MultipleShooting (100 , Tsit5 ()))
47
- iip_suite[" MultipleShooting(100, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
48
- $ MultipleShooting (100 , Tsit5 (); grid_coarsening = false ))
49
- iip_suite[" MultipleShooting(10, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
50
- $ MultipleShooting (10 , Tsit5 ()))
51
- iip_suite[" MultipleShooting(10, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
52
- $ MultipleShooting (10 , Tsit5 (); grid_coarsening = false ))
53
- iip_suite[" Shooting(Tsit5())" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
54
- $ Shooting (Tsit5 ()))
45
+ if @isdefined (MultipleShooting)
46
+ iip_suite[" MultipleShooting(100, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
47
+ $ MultipleShooting (100 , Tsit5 ()))
48
+ iip_suite[" MultipleShooting(100, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
49
+ $ MultipleShooting (100 , Tsit5 (); grid_coarsening = false ))
50
+ iip_suite[" MultipleShooting(10, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
51
+ $ MultipleShooting (10 , Tsit5 ()))
52
+ iip_suite[" MultipleShooting(10, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
53
+ $ MultipleShooting (10 , Tsit5 (); grid_coarsening = false ))
54
+ end
55
+ if @isdefined (Shooting)
56
+ iip_suite[" Shooting(Tsit5())" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_iip,
57
+ $ Shooting (Tsit5 ()))
58
+ end
55
59
56
- oop_suite[" MultipleShooting(100, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
57
- $ MultipleShooting (100 , Tsit5 ()))
58
- oop_suite[" MultipleShooting(100, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
59
- $ MultipleShooting (100 , Tsit5 (); grid_coarsening = false ))
60
- oop_suite[" MultipleShooting(10, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
61
- $ MultipleShooting (10 , Tsit5 ()))
62
- oop_suite[" MultipleShooting(10, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
63
- $ MultipleShooting (10 , Tsit5 (); grid_coarsening = false ))
64
- oop_suite[" Shooting(Tsit5())" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
65
- $ Shooting (Tsit5 ()))
60
+ if @isdefined (MultipleShooting)
61
+ oop_suite[" MultipleShooting(100, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
62
+ $ MultipleShooting (100 , Tsit5 ()))
63
+ oop_suite[" MultipleShooting(100, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
64
+ $ MultipleShooting (100 , Tsit5 (); grid_coarsening = false ))
65
+ oop_suite[" MultipleShooting(10, Tsit5; grid_coarsening = true)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
66
+ $ MultipleShooting (10 , Tsit5 ()))
67
+ oop_suite[" MultipleShooting(10, Tsit5; grid_coarsening = false)" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
68
+ $ MultipleShooting (10 , Tsit5 (); grid_coarsening = false ))
69
+ end
70
+ if @isdefined (Shooting)
71
+ oop_suite[" Shooting(Tsit5())" ] = @benchmarkable solve ($ SimplePendulumBenchmark. prob_oop,
72
+ $ Shooting (Tsit5 ()))
73
+ end
66
74
67
75
return suite
68
76
end
0 commit comments