Library
Parameters
Problems
HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC — Typemutable struct HomoclinicHyperbolicProblemPBC{Tdisc, Nfree, Tlens, Ty, Tlensfree, Tq, Tt} <: BifurcationKit.AbstractBoundaryValueProblemStructure to encode the computation of a homoclinic orbit to a hyperbolic saddle based on the projection boundary condition (PBC) method.
Constructor
It is most conveniently created from a periodic orbit with generate_hom_problem, or by branch switching from a Bogdanov–Takens point with continuation. It can also be built directly as
HomoclinicHyperbolicProblemPBC(disc, lens, N, J; ϵ0 = ..., ϵ1 = ..., T = ..., ...)where disc is the discretization of the boundary value problem (Collocation or Shooting), lens the parameter axis used for the continuation, N the dimension of the phase space and J the jacobian of the vector field at the saddle point.
Internal fields
disc::Any: Discretization of the boundary value problem:CollocationorShooting.lens::Any: Lens (parameter axis) of the free parameter stored in the state, used to evaluate the vector field.T::Any: Return timeTof the homoclinic orbit.ϵ0::Any: Desired distance of the pointx₀(departure from the saddle) to the saddle point.ϵ1::Any: Desired distance of the pointx₁(return to the saddle) to the saddle point.freelens::Any: Lenses (parameter axes) of the free homoclinic parameters (typicallyTandϵ0).Qu0::Any: Orthonormal projector associated with the unstable subspace.Qs0::Any: Orthonormal projector associated with the stable subspace.N::Int64: Dimension of the phase space.updateEveryStep::Int64: Frequency (in number of continuation steps) at which the projectors and free parameters are updated.jacobian::Symbol: How the jacobian of the problem is computed.test::Any: NamedTuple with the test functions used to detect codimension-two bifurcations of the homoclinic orbit (e.g.NNS,NSF,DRS,BT, ...).testOrbitFlip::Bool: Whether to compute the test functions for orbit flips.testInclinationFlip::Bool: Whether to compute the test functions for inclination flips.nUnstable::Int64: Number of unstable eigenvalues of the jacobian at the saddle.nStable::Int64: Number of stable eigenvalues of the jacobian at the saddle.
Continuation
BifurcationKit.continuation — Methodcontinuation(
𝐇𝐨𝐦,
homguess,
lens,
alg,
_contParams;
plot_solution,
kwargs...
)
Perform continuation of a homoclinic orbit to a hyperbolic saddle, based on the projection boundary condition (PBC) method. The functional 𝐇𝐨𝐦 and the initial guess homguess are for example obtained from a periodic orbit with generate_hom_problem or from branch switching at a Bogdanov–Takens point with continuation.
Arguments
𝐇𝐨𝐦::HomoclinicHyperbolicProblemPBC: the functional encoding the homoclinic boundary value problem.homguess: the initial guess, as returned together with𝐇𝐨𝐦.lens::BK.AllOpticTypes: the parameter (lens) used as continuation parameter.alg::BK.AbstractContinuationAlgorithm: the continuation algorithm, seecontinuation._contParams::ContinuationPar: the parameters of the continuation.
The additional kwargs are the ones of BifurcationKit.continuation.
BifurcationKit.continuation — Methodcontinuation(
prob_vf,
bt,
bvp,
alg,
_contParams;
ϵ0,
amplitude,
freeparams,
maxT,
update_every_step,
test_orbit_flip,
test_inclination_flip,
normC,
kwargs...
)
Perform automatic branch switching to a homoclinic curve from a Bogdanov–Takens bifurcation point. It uses the homoclinic orbit predictor from the Bogdanov–Takens normal form.
Arguments
prob::BifurcationProblemcontains the vector fieldbt::BK.BogdanovTakensa Bogdanov–Takens point. For example, you can get this from a call tobt = get_normal_form(br, ind_bt)bvp::BK.AbstractBoundaryValueDiscretization, for exampleCollocation(50, 4)algcontinuation algorithm_contParams::ContinuationPar
Optional arguments
ϵ0 = 1e-5distance of the homoclinic orbit from the saddle pointamplitude = 1e-3amplitude of the homoclinic orbitfreeparams = ((@optic _.ϵ0), (@optic _.T))free parameters used to define the homoclinic orbit in parameter spacemaxT = Inflimit on the "period" of the homoclinic cycleupdate_every_step = 1frequency at which the homoclinic problem is updated during the continuationtest_orbit_flip = falseset totrueto detect orbit flipstest_inclination_flip = falseset totrueto detect inclination flips
You can also pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC and those to continuation from BifurcationKit.
kwargsarguments passed tocontinuation
Output
- returns a branch of homoclinic orbits together with the Bogdanov–Takens point
bt.
Utils
HclinicBifurcationKit.generate_hom_problem — Functiongenerate_hom_problem(
coll::Collocation,
x::AbstractArray,
pars,
lensHom::Union{typeof(identity), IndexLens, PropertyLens, ComposedFunction};
verbose,
ϵ0,
ϵ1,
t0,
t1,
maxT,
freeparams,
mesh,
kw...
) -> Tuple{Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}, Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}}
Generate a HomoclinicHyperbolicProblemPBC functional together with an initial guess from a periodic orbit computed with the collocation method coll.
The guess is built by extracting the time slices of the existing periodic-orbit solution: a contiguous block of whole collocation intervals is selected and the corresponding stored points are reused as is — no polynomial re-interpolation is performed. A possibly adapted mesh (and therefore the resolution of peaked layers) is thus preserved.
In case of an adapted mesh, you can pass the BK.POSavedSolutionAndState solution directly in place of x, see the dedicated method below. When using the AbstractArray method, the mesh of coll must be the mesh on which x was computed; this can be forced with the keyword mesh.
Arguments
coll::Collocation: collocation discretization used to compute the periodic orbitx::AbstractArray: periodic orbit solution, as stored on a branch (e.g.br.sol[end].x)pars: parameters at which the periodic orbit was computedlensHom::BK.AllOpticTypes: parameter axis (lens) used for the continuation of the homoclinic orbit
Keyword arguments
t0 = 0,t1 = 0: absolute times in the periodic orbit delimiting the homoclinic interval. If both are0, the interval is obtained by removing the single collocation interval containing the point of the orbit closest to the saddle. Otherwise the whole collocation intervals covering the window[t0, t1]are kept.ϵ0 = 1e-5,ϵ1 = 1e-5: kept for compatibility; the distancesϵ0hom,ϵ1homare measured from the first/last kept points to the saddle point.maxT = Inf: upper bound on the return timeTof the homoclinic orbitfreeparams = ((@optic _.ϵ0), (@optic _.T)): free parameters used to define the homoclinic orbit in parameter spacemesh = nothing: fraction mesh (interval boundaries, lengthNtst + 1) on which the solutionxis defined. Automatically provided whenxis aBK.POSavedSolutionAndState.verbose = false: print some debugging information
The extra kwargs are passed to the constructor of ::HomoclinicHyperbolicProblemPBC.
Output
- returns the tuple
(𝐇𝐨𝐦, xhom, pars, xhom)where𝐇𝐨𝐦::HomoclinicHyperbolicProblemPBCandxhomis the initial guess. In the tutorials, only the first two entries are used.
generate_hom_problem(
coll::Collocation,
x::BifurcationKit.POSavedSolutionAndState,
pars,
lensHom::Union{typeof(identity), IndexLens, PropertyLens, ComposedFunction};
k...
) -> Tuple{Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}, Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}}
Same as generate_hom_problem but x is a BK.POSavedSolutionAndState, as returned on the branch when mesh adaptation is used. The mesh x._mesh on which the solution x.sol is defined is restored in a working copy of coll and the section is updated with the phase x.ϕ before generating the homoclinic problem. The keyword arguments are the same as for the AbstractArray method.
generate_hom_problem(
sh::Shooting,
x::AbstractArray,
pars,
lensHom::Union{typeof(identity), IndexLens, PropertyLens, ComposedFunction};
verbose,
time,
ϵ0,
ϵ1,
t0,
t1,
maxT,
freeparams,
kw...
) -> Tuple{Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}, Any, RecursiveArrayTools.ArrayPartition{_A, S} where {_A, S<:NTuple{5, Any}}}
Generate a HomoclinicHyperbolicProblemPBC functional together with an initial guess, from a periodic orbit computed with the shooting method sh. The periodic orbit is used to locate the saddle point (point of minimal norm of the vector field) and the points x₀, x₁ close to the unstable/stable manifolds of the saddle.
Arguments
sh::Shooting: shooting discretization used to compute the periodic orbit (also provides the number of time slicesM)x::AbstractArray: periodic orbit solution, as stored on a branch (e.g.br.sol[end].x)pars: parameters at which the periodic orbit was computedlensHom::BK.AllOpticTypes: parameter axis (lens) used for the continuation of the homoclinic orbit
Keyword arguments
ϵ0 = 1e-5,ϵ1 = 1e-5: distances ofx₀,x₁to the saddle pointt0 = 0,t1 = 0: times in the periodic orbit corresponding tox₀,x₁. If both are0, they are detected automatically, otherwise they overwriteϵ0, ϵ1maxT = Inf: upper bound on the return timeTof the homoclinic orbitfreeparams = ((@optic _.ϵ0), (@optic _.T)): free parameters used to define the homoclinic orbit in parameter spaceverbose = false: print some debugging information
The extra kwargs are passed to the constructor of ::HomoclinicHyperbolicProblemPBC.
Output
- returns the tuple
(𝐇𝐨𝐦, xhom, pars, xhom)where𝐇𝐨𝐦::HomoclinicHyperbolicProblemPBCandxhomis the initial guess. In the tutorials, only the first two entries are used.
HclinicBifurcationKit.get_homoclinic_orbit — Functionget_homoclinic_orbit(
hom::HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC{Tdisc<:Collocation},
x::RecursiveArrayTools.ArrayPartition,
par;
k...
) -> Any
Reconstruct the homoclinic orbit from a solution x of the homoclinic problem hom, for example a point stored on a branch of homoclinic orbits (br.sol[ind].x). par are the parameters at which the solution was computed (e.g. BK.setparam(br, br.sol[ind].p)).
The extra kwargs (e.g. saveat) are forwarded to the ODE solver used to integrate the orbit.
Output
Returns the homoclinic orbit as a time solution with fields t (time mesh) and u (states), which can be plotted or interpolated in time.