Library

Parameters

Problems

HclinicBifurcationKit.HomoclinicHyperbolicProblemPBCType
mutable struct HomoclinicHyperbolicProblemPBC{Tdisc, Nfree, Tlens, Ty, Tlensfree, Tq, Tt} <: BifurcationKit.AbstractBoundaryValueProblem

Structure 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: Collocation or Shooting.

  • lens::Any: Lens (parameter axis) of the free parameter stored in the state, used to evaluate the vector field.

  • T::Any: Return time T of the homoclinic orbit.

  • ϵ0::Any: Desired distance of the point x₀ (departure from the saddle) to the saddle point.

  • ϵ1::Any: Desired distance of the point x₁ (return to the saddle) to the saddle point.

  • freelens::Any: Lenses (parameter axes) of the free homoclinic parameters (typically T and ϵ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.

source

Continuation

BifurcationKit.continuationMethod
continuation(
    𝐇𝐨𝐦,
    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, see continuation.
  • _contParams::ContinuationPar: the parameters of the continuation.

The additional kwargs are the ones of BifurcationKit.continuation.

source
BifurcationKit.continuationMethod
continuation(
    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::BifurcationProblem contains the vector field
  • bt::BK.BogdanovTakens a Bogdanov–Takens point. For example, you can get this from a call to bt = get_normal_form(br, ind_bt)
  • bvp::BK.AbstractBoundaryValueDiscretization, for example Collocation(50, 4)
  • alg continuation algorithm
  • _contParams::ContinuationPar

Optional arguments

  • ϵ0 = 1e-5 distance of the homoclinic orbit from the saddle point
  • amplitude = 1e-3 amplitude of the homoclinic orbit
  • freeparams = ((@optic _.ϵ0), (@optic _.T)) free parameters used to define the homoclinic orbit in parameter space
  • maxT = Inf limit on the "period" of the homoclinic cycle
  • update_every_step = 1 frequency at which the homoclinic problem is updated during the continuation
  • test_orbit_flip = false set to true to detect orbit flips
  • test_inclination_flip = false set to true to detect inclination flips

You can also pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC and those to continuation from BifurcationKit.

  • kwargs arguments passed to continuation

Output

  • returns a branch of homoclinic orbits together with the Bogdanov–Takens point bt.
source

Utils

HclinicBifurcationKit.generate_hom_problemFunction
generate_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.

Adapted mesh

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 orbit
  • x::AbstractArray: periodic orbit solution, as stored on a branch (e.g. br.sol[end].x)
  • pars: parameters at which the periodic orbit was computed
  • lensHom::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 are 0, 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, ϵ1hom are measured from the first/last kept points to the saddle point.
  • maxT = Inf: upper bound on the return time T of the homoclinic orbit
  • freeparams = ((@optic _.ϵ0), (@optic _.T)): free parameters used to define the homoclinic orbit in parameter space
  • mesh = nothing: fraction mesh (interval boundaries, length Ntst + 1) on which the solution x is defined. Automatically provided when x is a BK.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 𝐇𝐨𝐦::HomoclinicHyperbolicProblemPBC and xhom is the initial guess. In the tutorials, only the first two entries are used.
source
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.

source
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 slices M)
  • x::AbstractArray: periodic orbit solution, as stored on a branch (e.g. br.sol[end].x)
  • pars: parameters at which the periodic orbit was computed
  • lensHom::BK.AllOpticTypes: parameter axis (lens) used for the continuation of the homoclinic orbit

Keyword arguments

  • ϵ0 = 1e-5, ϵ1 = 1e-5: distances of x₀, x₁ to the saddle point
  • t0 = 0, t1 = 0: times in the periodic orbit corresponding to x₀, x₁. If both are 0, they are detected automatically, otherwise they overwrite ϵ0, ϵ1
  • maxT = Inf: upper bound on the return time T of the homoclinic orbit
  • freeparams = ((@optic _.ϵ0), (@optic _.T)): free parameters used to define the homoclinic orbit in parameter space
  • verbose = false: print some debugging information

The extra kwargs are passed to the constructor of ::HomoclinicHyperbolicProblemPBC.

Output

  • returns the tuple (𝐇𝐨𝐦, xhom, pars, xhom) where 𝐇𝐨𝐦::HomoclinicHyperbolicProblemPBC and xhom is the initial guess. In the tutorials, only the first two entries are used.
source
HclinicBifurcationKit.get_homoclinic_orbitFunction
get_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.

source

Misc.