Skip to content

Commit e9ff335

Browse files
committed
Fix ManifoldProjection errors
1 parent c890f56 commit e9ff335

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/examples/kepler_problem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function first_integrals_manifold(residual, u, p, t)
127127
residual[3:4] .= initial_first_integrals[2] - L(u[1:2], u[3:4])
128128
end
129129
130-
cb = ManifoldProjection(first_integrals_manifold)
130+
cb = ManifoldProjection(first_integrals_manifold, autodiff = AutoForwardDiff())
131131
sol5 = solve(prob2, RK4(), dt = 1 // 5, adaptive = false, callback = cb)
132132
analysis_plot2(sol5, H, L)
133133
```
@@ -139,7 +139,7 @@ function energy_manifold(residual, u, p, t)
139139
residual[1:2] .= initial_first_integrals[1] - H(u[1:2], u[3:4])
140140
residual[3:4] .= 0
141141
end
142-
energy_cb = ManifoldProjection(energy_manifold)
142+
energy_cb = ManifoldProjection(energy_manifold, autodiff = AutoForwardDiff())
143143
sol6 = solve(prob2, RK4(), dt = 1 // 5, adaptive = false, callback = energy_cb)
144144
analysis_plot2(sol6, H, L)
145145
```
@@ -151,7 +151,7 @@ function angular_manifold(residual, u, p, t)
151151
residual[1:2] .= initial_first_integrals[2] - L(u[1:2], u[3:4])
152152
residual[3:4] .= 0
153153
end
154-
angular_cb = ManifoldProjection(angular_manifold)
154+
angular_cb = ManifoldProjection(angular_manifold, autodiff = AutoForwardDiff())
155155
sol7 = solve(prob2, RK4(), dt = 1 // 5, adaptive = false, callback = angular_cb)
156156
analysis_plot2(sol7, H, L)
157157
```

0 commit comments

Comments
 (0)