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 Plots
using BifurcationKit
const BK = BifurcationKit
function 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 f
end
sol0 = 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.006224449009236915
โโ Algo: AutoSwitch
โโ Special points:
- # 1, bp at ฮฑ โ +0.36787092 โ (+0.36747428, +0.36787092), |ฮดp|=4e-04, [converged], ฮด = ( 1, 0), step = 11
- # 2, bp at ฮฑ โ +0.14907908 โ (+0.14907908, +0.14973607), |ฮดp|=7e-04, [converged], ฮด = ( 1, 0), step = 21
- # 3, endpoint at ฮฑ โ +0.00518664, step = 41
You can plot the result as usual:
plot(br)