Skip to content

Commit 4fb3229

Browse files
Updated DynamicalODE benchmarks
1 parent 8584fc1 commit 4fb3229

File tree

4 files changed

+1046
-529
lines changed

4 files changed

+1046
-529
lines changed

benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,15 @@ function g(resid, u, p)
6868
resid[2:4] .= 0
6969
end
7070

71-
const cb = ManifoldProjection(g, nlopts=Dict(:ftol => 1e-13))
71+
function g_jacobian(J, u, p)
72+
J[1, 1] = u[1]
73+
J[1, 2] = u[2]
74+
J[1, 3] = u[3]
75+
J[1, 4] = u[4]
76+
J[2:4, :] .= 0
77+
end
78+
79+
const cb = ManifoldProjection(g, manifold_jacobian=g_jacobian, nlopts=Dict(:ftol => 1e-13))
7280

7381
const E = H(iip_p0, iip_q0, nothing)
7482
```

0 commit comments

Comments
 (0)