Skip to content

Commit 0d7e7be

Browse files
Updates
1 parent c04d1b0 commit 0d7e7be

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ In order to separate these two, we will use `iip` for the in-place names and `oo
1919
using OrdinaryDiffEq, Plots, DiffEqCallbacks
2020
using SciMLBenchmarks
2121
using TaylorIntegration, LinearAlgebra, StaticArrays
22-
using ADTypes
2322
gr(fmt=:png)
2423
default(fmt=:png)
2524

@@ -69,7 +68,8 @@ function g(resid, u, p)
6968
resid[2:4] .= 0
7069
end
7170

72-
const cb = ManifoldProjection(g, nlopts=Dict(:ftol => 1e-13), autodiff = AutoFiniteDiff())
71+
const cb = ManifoldProjection(g, nlopts=Dict(:ftol => 1e-13))
72+
7373
const E = H(iip_p0, iip_q0, nothing)
7474
```
7575

@@ -203,4 +203,4 @@ The benchmarks were performed on a machine with
203203
```julia, echo = false
204204
using SciMLBenchmarks
205205
SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file])
206-
```
206+
```

benchmarks/DynamicalODE/Quadrupole_boson_Hamiltonian_energy_conservation_benchmark.jmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The aim of this benchmark is to see what happens with the energy error when high
1414
using OrdinaryDiffEq, Plots, DiffEqCallbacks, LinearAlgebra
1515
using TaylorIntegration
1616
using ParameterizedFunctions
17-
using StaticArrays, ADTypes
17+
using StaticArrays
1818
gr()
1919
default(fmt=:png)
2020

@@ -67,7 +67,7 @@ function g(resid, u, p)
6767
end
6868

6969
const E = H(iip_p0, iip_q0, nothing)
70-
const cb = ManifoldProjection(g, nlopts=Dict(:ftol=>1e-13), autodiff = AutoFiniteDiff());
70+
const cb = ManifoldProjection(g, nlopts=Dict(:ftol=>1e-13));
7171
```
7272

7373
For the comparison we will use the following function
@@ -78,11 +78,11 @@ abs_energy_err(sol) = [abs.(H([sol[1,j], sol[2,j]], [sol[3,j], sol[4,j]],nothing
7878

7979
function compare(mode=:inplace, all=true, plt=nothing; tmax=1e2)
8080
if mode == :inplace
81-
prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0., tmax), nothing)
81+
prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0., tmax))
8282
else
83-
prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0., tmax), nothing)
83+
prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0., tmax))
8484
end
85-
prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0., tmax), nothing)
85+
prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0., tmax))
8686

8787
GC.gc()
8888
(mode == :inplace && all) && @time sol1 = solve(prob, Vern9(), callback=cb, abstol=1e-14, reltol=1e-14)
@@ -191,4 +191,4 @@ In comparison with the Henon-Heiles case, we see that the symplectic methods are
191191
```julia, echo = false
192192
using SciMLBenchmarks
193193
SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file])
194-
```
194+
```

0 commit comments

Comments
 (0)