Skip to content

Commit b50a1fe

Browse files
authored
Update bifurcation_diagram.md
Minor change to respect BifurcationKit interface
1 parent 4adb253 commit b50a1fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/tutorials/bifurcation_diagram.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ opts = ContinuationPar( dsmax = 0.05, # Maximum arclength value of the ps
4141
detectBifurcation=3, # Value in {0,1,2,3} determening to what extent bofurcation points are detected (0 means nothing is done, 3 both them and there localisation are detected).
4242
newtonOptions = NewtonPar(tol = 1e-9, verbose = false, maxIter = 15)) #Parameters to the newton solver (when finding fixed points) see BifurcationKit documentation.
4343

44-
DO = DeflationOperator( 2.0, # Algorithm parameter required when using deflated continuation, see BifurcationKit documentation.
44+
DO = DeflationOperator( 2, # Algorithm parameter required when using deflated continuation, see BifurcationKit documentation.
4545
dot, # Algorithm parameter required when using deflated continuation, see BifurcationKit documentation.
4646
1., # Algorithm parameter required when using deflated continuation, see BifurcationKit documentation.
4747
[fill(0.,length(rn.states))]); # Guess(es) of the fixed point for the initial parameter set. Do not need to be exact.
@@ -52,7 +52,7 @@ With all this done, we can compute the bifurcations:
5252
params_input = setindex!(copy(params),p_span[1],p_idx) # The input parameter values have to start at the first index of our parameter span.
5353
branches, = continuation(F, J, params_input, (@lens _[p_idx]) ,opts , DO, # Gives our input.
5454
verbosity = 0, showplot=false, # We do not want to display, or plot, intermediary results.
55-
printSolution=(x, p) -> x[plot_var_idx], # How we wish to print the output in the diagram. Here we simply want the value of the target varriable.
55+
recordFromSolution = (x, p) -> x[plot_var_idx], # How we wish to print the output in the diagram. Here we simply want the value of the target varriable.
5656
perturbSolution = (x,p,id) -> (x .+ 0.8 .* rand(length(x))), # Parameter for the continuation method, see BifurcationKit documentation.
5757
callbackN = (x, f, J, res, iteration, itlinear, options; kwargs...) -> res <1e7) # Parameter for the continuation method, see BifurcationKit documentation.
5858
```
@@ -74,4 +74,4 @@ plot!(branches[4],lw=4,color=map(i->(i==0) ? :blue : :red, getproperty.(branches
7474
```
7575
![bifurcation_diagram2](../assets/bifurcation_diagram2.svg)
7676

77-
(Note that the second branch corresponds to a negative steady state, which is biological irrelevant, and we hence do not plot)
77+
(Note that the second branch corresponds to a negative steady state, which is biological irrelevant, and we hence do not plot)

0 commit comments

Comments
 (0)