diff --git a/benchmark/simple_pendulum.jl b/benchmark/simple_pendulum.jl index 49eb0ed7..4fb57048 100644 --- a/benchmark/simple_pendulum.jl +++ b/benchmark/simple_pendulum.jl @@ -30,6 +30,7 @@ function simple_pendulum(u, p, t) end function bc_pendulum(u, p, t) + t0, t1 = tspan return [u((t0 + t1) / 2)[1] + π / 2, u(t1)[1] - π / 2] end @@ -57,19 +58,21 @@ function create_simple_pendulum_benchmark() if @isdefined(MultipleShooting) iip_suite["MultipleShooting(100, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $MultipleShooting(100, Tsit5())) + $SimplePendulumBenchmark.prob_iip, + $MultipleShooting(100, Tsit5(), NewtonRaphson())) iip_suite["MultipleShooting(100, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_iip, - $MultipleShooting(100, Tsit5(); grid_coarsening = false)) + $MultipleShooting(100, Tsit5(), NewtonRaphson(); grid_coarsening = false)) iip_suite["MultipleShooting(10, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $MultipleShooting(10, Tsit5())) + $SimplePendulumBenchmark.prob_iip, + $MultipleShooting(10, Tsit5(), NewtonRaphson())) iip_suite["MultipleShooting(10, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_iip, - $MultipleShooting(10, Tsit5(); grid_coarsening = false)) + $MultipleShooting(10, Tsit5(), NewtonRaphson(); grid_coarsening = false)) end if @isdefined(Shooting) iip_suite["Shooting(Tsit5())"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_iip, $Shooting(Tsit5())) + $SimplePendulumBenchmark.prob_iip, $Shooting(Tsit5(), NewtonRaphson())) end for alg in (MIRK2, MIRK3, MIRK4, MIRK5, MIRK6) if @isdefined(alg) @@ -80,19 +83,21 @@ function create_simple_pendulum_benchmark() if @isdefined(MultipleShooting) oop_suite["MultipleShooting(100, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $MultipleShooting(100, Tsit5())) + $SimplePendulumBenchmark.prob_oop, + $MultipleShooting(100, Tsit5(), NewtonRaphson())) oop_suite["MultipleShooting(100, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_oop, - $MultipleShooting(100, Tsit5(); grid_coarsening = false)) + $MultipleShooting(100, Tsit5(), NewtonRaphson(); grid_coarsening = false)) oop_suite["MultipleShooting(10, Tsit5; grid_coarsening = true)"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $MultipleShooting(10, Tsit5())) + $SimplePendulumBenchmark.prob_oop, + $MultipleShooting(10, Tsit5(), NewtonRaphson())) oop_suite["MultipleShooting(10, Tsit5; grid_coarsening = false)"] = @benchmarkable solve( $SimplePendulumBenchmark.prob_oop, - $MultipleShooting(10, Tsit5(); grid_coarsening = false)) + $MultipleShooting(10, Tsit5(), NewtonRaphson(); grid_coarsening = false)) end if @isdefined(Shooting) oop_suite["Shooting(Tsit5())"] = @benchmarkable solve( - $SimplePendulumBenchmark.prob_oop, $Shooting(Tsit5())) + $SimplePendulumBenchmark.prob_oop, $Shooting(Tsit5(), NewtonRaphson())) end for alg in (MIRK2, MIRK3, MIRK4, MIRK5, MIRK6) if @isdefined(alg)