Skip to content

Commit 8995e3d

Browse files
a few tweaks
1 parent 58f412c commit 8995e3d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/src/examples/kepler_problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ analysis_plot2(sol_, H, L)
112112
There is a significant fluctuation in the first integrals, when there is no mainfold projection.
113113

114114
```@example kepler
115-
function first_integrals_manifold(residual,u)
115+
function first_integrals_manifold(residual,u,p,t)
116116
residual[1:2] .= initial_first_integrals[1] - H(u[1:2], u[3:4])
117117
residual[3:4] .= initial_first_integrals[2] - L(u[1:2], u[3:4])
118118
end
@@ -125,7 +125,7 @@ analysis_plot2(sol5, H, L)
125125
We can see that thanks to the manifold projection, the first integrals' variation is very small, although we are using `RK4` which is not symplectic. But wait, what if we only project to the energy conservation manifold?
126126

127127
```@example kepler
128-
function energy_manifold(residual,u)
128+
function energy_manifold(residual,u,p,t)
129129
residual[1:2] .= initial_first_integrals[1] - H(u[1:2], u[3:4])
130130
residual[3:4] .= 0
131131
end

docs/src/examples/min_and_max.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function is `f`:
5959

6060
```@example minmax
6161
using Optimization, OptimizationNLopt, ForwardDiff
62-
optf = OptimizationFunction(f, AutoForwardDiff())
62+
optf = OptimizationFunction(f, Optimization.AutoForwardDiff())
6363
min_guess = 18.0
6464
optprob = OptimizationProblem(optf, min_guess)
6565
opt = solve(optprob, NLopt.LD_LBFGS())
@@ -75,7 +75,7 @@ println(opt.u)
7575
To get the maximum, we just minimize the negative of the function:
7676

7777
```@example minmax
78-
optf = OptimizationFunction(f, AutoForwardDiff())
78+
optf = OptimizationFunction(f, Optimization.AutoForwardDiff())
7979
min_guess = 22.0
8080
optprob2 = OptimizationProblem(optf, min_guess)
8181
opt2 = solve(optprob2, NLopt.LD_LBFGS())

0 commit comments

Comments
 (0)