Automatic switching between Natural and PALC
This is one of the continuation methods implemented in the package. It is set by the option AutoSwitch() in continuation. See also AutoSwitch for more information.
This algorithm uses a Natural continuation when the branch is "horizontal" and switches to PALC (or other which cab be specified) otherwise.
Example
We provide an example of use. We define a BifurcationProblem as usual and pass the continuation algorithm AutoSwitch.
using Plotsusing BifurcationKitconst BK = BifurcationKitfunction F(x, p) (;Ξ±) = p f = similar(x) f[1] = (-2x[1]+x[2]) + Ξ± * exp(x[1]) f[2] = ( x[1]-2x[2]) + Ξ± * exp(x[2]) return fendsol0 = zeros(2)par = (Ξ± = 0.0, )prob = ODEBifProblem(F, sol0, par, (@optic _.Ξ±))ββ Bifurcation problem with uType Vector{Float64}
ββ Inplace: false
ββ Dimension: 2
ββ Symmetric: false
ββ Parameter: Ξ±opts = ContinuationPar(dsmax = 0.15, max_steps = 40, )br = continuation(prob, AutoSwitch(), opts, normC = norminf) ββ Curve type: EquilibriumCont
ββ Number of points: 41
ββ Type of vectors: Vector{Float64}
ββ Parameter Ξ± starts at 0.0, ends at 0.006224449009229535
ββ Algo: AutoSwitch
ββ Special points:
ββββββ¬βββββββββββββ¬ββββββββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββ¬ββββββββββββββ¬βββββββββββ¬βββββββ
β Nb β type β Ξ± β interval β precision β status β Ξ΄ β step β
ββββββΌβββββββββββββΌββββββββββββββΌβββββββββββββββββββββββββββββΌββββββββββββΌββββββββββββββΌβββββββββββΌβββββββ€
β 1 β bp β +0.36787092 β (+0.36747428, +0.36787092) β 4e-04 β converged β ( 1, 0) β 11 β
β 2 β bp β +0.14907908 β (+0.14907908, +0.14973607) β 7e-04 β converged β ( 1, 0) β 21 β
β 3 β endpoint β +0.00518664 β β β β β 41 β
ββββββ΄βββββββββββββ΄ββββββββββββββ΄βββββββββββββββββββββββββββββ΄ββββββββββββ΄ββββββββββββββ΄βββββββββββ΄βββββββ
You can plot the result as usual:
plot(br)