Skip to content

Commit 343ebde

Browse files
Merge pull request #1145 from ParamThakkar123/DynamicalODE
DynamicalODE Benchmark Updates
2 parents 42299dd + f065aac commit 343ebde

File tree

4 files changed

+1056
-547
lines changed

4 files changed

+1056
-547
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)