diff --git a/dev/branchswitching/index.html b/dev/branchswitching/index.html index 8900ee2..c2ce5ea 100644 --- a/dev/branchswitching/index.html +++ b/dev/branchswitching/index.html @@ -7,4 +7,4 @@ # PALC, etc alg, _contParams; - kwargs...)

Note that the BT has been detected during Fold or Hopf continuation. More information is available at continuation.

+ kwargs...)

Note that the BT has been detected during Fold or Hopf continuation. More information is available at continuation.

diff --git a/dev/detectionBifurcation/index.html b/dev/detectionBifurcation/index.html index ed9340c..a0486fb 100644 --- a/dev/detectionBifurcation/index.html +++ b/dev/detectionBifurcation/index.html @@ -1,2 +1,2 @@ -Bifurcation detection (codim 1) · Homoclinic / Heteroclinic orbits in Julia

Detection of bifurcation points

The bifurcations are detected during a call to br = continuation(prob, alg, contParams::ContinuationPar;kwargs...) by turning on the following flags:

  • contParams.detect_bifurcation = 2 (for eigenvalues based bifurcations)
  • contParams.detect_event = 2 (for other bifurcations like inclinations)

Precise detection of bifurcation points using Bisection

Note that the bifurcation points detected when detect_bifurcation = 2 can be rather crude localization of the true bifurcation points. Indeed, we only signal that, in between two continuation steps which can be large, a (several) bifurcation has been detected. Hence, we only have a rough idea of where the bifurcation is located, unless your dsmax is very small... This can be improved as follows.

If you choose detect_bifurcation = 3, a bisection algorithm is used to locate the bifurcation points more precisely. It means that we recursively track down the change in stability. Some options in ContinuationPar control this behavior:

  • n_inversion: number of sign inversions in the bisection algorithm
  • max_bisection_steps maximum number of bisection steps
  • tol_bisection_eigenvalue tolerance on real part of eigenvalue to detect bifurcation points in the bisection steps
Bisection mode

During the bisection, the eigensolvers are called like eil(J, nev; bisection = true) in order to be able to adapt the solver precision.

List of detected bifurcation points

You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.

We refer to [DeWitte] for a description of the bifurcations.

Type of bifurcationLabel
Limit cycleLC
Homoclinic to Hyperbolic SaddleHHS
Homoclinic to Saddle-NodeHSN
Neutral saddleNSS
Neutral saddle-focusNSF
Neutral Bi-FocusNFF
Shilnikov-HopfSH
Double Real Stable leading eigenvalueDRS
Double Real Unstable leading eigenvalueDRU
Neutrally-Divergent saddle-focus (Stable)NDS
Neutrally-Divergent saddle-focus (Unstable)NDU
Three Leading eigenvalues (Stable)TLS
Three Leading eigenvalues (Unstable)TLU
Orbit-Flip with respect to the Stable manifoldOFS
Orbit-Flip with respect to the Unstable manifoldOFU
Non-Central Homoclinic to saddle-nodeNCH

Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.

References

  • DeWitte

    De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.

+Bifurcation detection (codim 1) · Homoclinic / Heteroclinic orbits in Julia

Detection of bifurcation points

The bifurcations are detected during a call to br = continuation(prob, alg, contParams::ContinuationPar;kwargs...) by turning on the following flags:

  • contParams.detect_bifurcation = 2 (for eigenvalues based bifurcations)
  • contParams.detect_event = 2 (for other bifurcations like inclinations)

Precise detection of bifurcation points using Bisection

Note that the bifurcation points detected when detect_bifurcation = 2 can be rather crude localization of the true bifurcation points. Indeed, we only signal that, in between two continuation steps which can be large, a (several) bifurcation has been detected. Hence, we only have a rough idea of where the bifurcation is located, unless your dsmax is very small... This can be improved as follows.

If you choose detect_bifurcation = 3, a bisection algorithm is used to locate the bifurcation points more precisely. It means that we recursively track down the change in stability. Some options in ContinuationPar control this behavior:

  • n_inversion: number of sign inversions in the bisection algorithm
  • max_bisection_steps maximum number of bisection steps
  • tol_bisection_eigenvalue tolerance on real part of eigenvalue to detect bifurcation points in the bisection steps
Bisection mode

During the bisection, the eigensolvers are called like eil(J, nev; bisection = true) in order to be able to adapt the solver precision.

List of detected bifurcation points

You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.

We refer to [DeWitte] for a description of the bifurcations.

Type of bifurcationLabel
Limit cycleLC
Homoclinic to Hyperbolic SaddleHHS
Homoclinic to Saddle-NodeHSN
Neutral saddleNSS
Neutral saddle-focusNSF
Neutral Bi-FocusNFF
Shilnikov-HopfSH
Double Real Stable leading eigenvalueDRS
Double Real Unstable leading eigenvalueDRU
Neutrally-Divergent saddle-focus (Stable)NDS
Neutrally-Divergent saddle-focus (Unstable)NDU
Three Leading eigenvalues (Stable)TLS
Three Leading eigenvalues (Unstable)TLU
Orbit-Flip with respect to the Stable manifoldOFS
Orbit-Flip with respect to the Unstable manifoldOFU
Non-Central Homoclinic to saddle-nodeNCH

Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.

References

  • DeWitte

    De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.

diff --git a/dev/faq/index.html b/dev/faq/index.html index 4e59be1..75db2c6 100644 --- a/dev/faq/index.html +++ b/dev/faq/index.html @@ -1,2 +1,2 @@ -Frequently Asked Questions · Homoclinic / Heteroclinic orbits in Julia
+Frequently Asked Questions · Homoclinic / Heteroclinic orbits in Julia
diff --git a/dev/homoHS/index.html b/dev/homoHS/index.html index a454500..2e95921 100644 --- a/dev/homoHS/index.html +++ b/dev/homoHS/index.html @@ -6,4 +6,4 @@ & Q^{S^{\perp}, \mathrm{T}}\left(u(1)-u^s\right)=0 \\ & \left\|u(0)-u^s\right\|-\epsilon_0=0 \\ & \left\|u(1)-u^s\right\|-\epsilon_1=0 \\ -\end{aligned}\right.\]

Basically, we truncate the homoclinic orbit on $[-T,T]$ and we impose that $u(-T),u(T)$ is close to $u^s$ and belong to the stable / unstable subspaces of $u^s$. There are thus at most 3 free parameters and $T,\epsilon_0,\epsilon_1$ and the user can either

Continuation

Please see the tutorials for examples. In a nutshell, you can compute homolinic orbits by setting up a HomoclinicHyperbolicProblemPBC or by branching from a Bogdanov-Takens point.

Detection of codim 2 bifurcation points

You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.

We refer to [DeWitte] for a description of the bifurcations.

Type of bifurcationLabel
Limit cycleLC
Homoclinic to Hyperbolic SaddleHHS
Homoclinic to Saddle-NodeHSN
Neutral saddleNSS
Neutral saddle-focusNSF
Neutral Bi-FocusNFF
Shilnikov-HopfSH
Double Real Stable leading eigenvalueDRS
Double Real Unstable leading eigenvalueDRU
Neutrally-Divergent saddle-focus (Stable)NDS
Neutrally-Divergent saddle-focus (Unstable)NDU
Three Leading eigenvalues (Stable)TLS
Three Leading eigenvalues (Unstable)TLU
Orbit-Flip with respect to the Stable manifoldOFS
Orbit-Flip with respect to the Unstable manifoldOFU
Non-Central Homoclinic to saddle-nodeNCH

Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.

References

+\end{aligned}\right.\]

Basically, we truncate the homoclinic orbit on $[-T,T]$ and we impose that $u(-T),u(T)$ is close to $u^s$ and belong to the stable / unstable subspaces of $u^s$. There are thus at most 3 free parameters and $T,\epsilon_0,\epsilon_1$ and the user can either

Continuation

Please see the tutorials for examples. In a nutshell, you can compute homolinic orbits by setting up a HomoclinicHyperbolicProblemPBC or by branching from a Bogdanov-Takens point.

Detection of codim 2 bifurcation points

You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.

We refer to [DeWitte] for a description of the bifurcations.

Type of bifurcationLabel
Limit cycleLC
Homoclinic to Hyperbolic SaddleHHS
Homoclinic to Saddle-NodeHSN
Neutral saddleNSS
Neutral saddle-focusNSF
Neutral Bi-FocusNFF
Shilnikov-HopfSH
Double Real Stable leading eigenvalueDRS
Double Real Unstable leading eigenvalueDRU
Neutrally-Divergent saddle-focus (Stable)NDS
Neutrally-Divergent saddle-focus (Unstable)NDU
Three Leading eigenvalues (Stable)TLS
Three Leading eigenvalues (Unstable)TLU
Orbit-Flip with respect to the Stable manifoldOFS
Orbit-Flip with respect to the Unstable manifoldOFU
Non-Central Homoclinic to saddle-nodeNCH

Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.

References

diff --git a/dev/index.html b/dev/index.html index 1fbe3c2..ef74448 100644 --- a/dev/index.html +++ b/dev/index.html @@ -10,4 +10,4 @@ PDF = {https://hal.archives-ouvertes.fr/hal-02902346/file/354c9fb0d148262405609eed2cb7927818706f1f.tar.gz}, HAL_ID = {hal-02902346}, HAL_VERSION = {v1}, -}

Capabilities

Other softwares

There are several good softwares already available.

In Julia, the present package seems to be the only one.

+}

Capabilities

Other softwares

There are several good softwares already available.

In Julia, the present package seems to be the only one.

diff --git a/dev/library/index.html b/dev/library/index.html index 59bbac1..1dbb59a 100644 --- a/dev/library/index.html +++ b/dev/library/index.html @@ -1,5 +1,5 @@ -Library · Homoclinic / Heteroclinic orbits in Julia

Library

Parameters

Problems

HclinicBifurcationKit.HomoclinicHyperbolicProblemPBCType

Computation of homoclinic orbit to an hyperbolic saddle based on the projection boundary condition (PBC) method.

  • bvp::Any: Sructure encoding the boundary value problem. For example, you can pass a PeriodicOrbitTrapProblem, a PeriodicOrbitOCollProblem or an AbstractShootingProblem

  • lens::Any: Two lenses which are used to define 2 free parameters.

  • T::Any: Return time T

  • ϵ0::Any: Precision of how far the section is from the homoclinic point

  • ϵ1::Any: Precision of how far the section is from the homoclinic point

  • freelens::Any: Free parameters

  • Qu0::Any: Orthonormal Projector on the unstable subspace orthogonal

  • Qs0::Any: Orthonormal Projector on the stable subspace orthogonal

  • N::Int64: Dimension of phase space

  • updateEveryStep::Int64: updates the section every update_section_every_step step during continuation

  • jacobian::Symbol: How the jacobian of the problem is computed

  • test::Any

  • testOrbitFlip::Bool

  • testInclinationFlip::Bool

  • nUnstable::Int64

  • nStable::Int64

source

Continuation

BifurcationKit.continuationMethod
continuation(
+Library · Homoclinic / Heteroclinic orbits in Julia

Library

Parameters

Problems

HclinicBifurcationKit.HomoclinicHyperbolicProblemPBCType

Computation of homoclinic orbit to an hyperbolic saddle based on the projection boundary condition (PBC) method.

  • bvp::Any: Sructure encoding the boundary value problem. For example, you can pass a PeriodicOrbitTrapProblem, a PeriodicOrbitOCollProblem or an AbstractShootingProblem

  • lens::Any: Two lenses which are used to define 2 free parameters.

  • T::Any: Return time T

  • ϵ0::Any: Precision of how far the section is from the homoclinic point

  • ϵ1::Any: Precision of how far the section is from the homoclinic point

  • freelens::Any: Free parameters

  • Qu0::Any: Orthonormal Projector on the unstable subspace orthogonal

  • Qs0::Any: Orthonormal Projector on the stable subspace orthogonal

  • N::Int64: Dimension of phase space

  • updateEveryStep::Int64: updates the section every update_section_every_step step during continuation

  • jacobian::Symbol: How the jacobian of the problem is computed

  • test::Any

  • testOrbitFlip::Bool

  • testInclinationFlip::Bool

  • nUnstable::Int64

  • nStable::Int64

source

Continuation

BifurcationKit.continuationMethod
continuation(
     𝐇𝐨𝐦,
     homguess,
     lens,
@@ -8,7 +8,7 @@
     plot_solution,
     kwargs...
 )
-

This is the continuation method for computing an homoclinic solution to a hyperbolic saddle. The parameter lens is the one from prob_vf::BifurcationProblem.

Arguments

Similar to continuation except that the problem is a HomoclinicHyperbolicProblemPBC.

source
BifurcationKit.continuationMethod
continuation(
     prob_vf,
     bt,
     bvp,
@@ -23,7 +23,7 @@
     test_inclination_flip,
     kwargs...
 )
-

Perform automatic branch switching to 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.AbstractBoundaryValueProblem, for example PeriodicOrbitOCollProblem(50, 4)
  • alg continuation algorithm
  • _contParams::ContinuationPar

Optional arguments

  • ϵ0 = 1e-5 distance of the homolinic orbit from the saddle point
  • amplitude = 1e-3 amplitude of the homoclinic orbit
  • maxT = Inf limit on the "period" of the homoclinic cycle.

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

  • kwargs arguments passed to continuation
source

Utils

HclinicBifurcationKit.generate_hom_problemFunction
generate_hom_problem(
+

Perform automatic branch switching to 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.AbstractBoundaryValueProblem, for example PeriodicOrbitOCollProblem(50, 4)
  • alg continuation algorithm
  • _contParams::ContinuationPar

Optional arguments

  • ϵ0 = 1e-5 distance of the homolinic orbit from the saddle point
  • amplitude = 1e-3 amplitude of the homoclinic orbit
  • maxT = Inf limit on the "period" of the homoclinic cycle.

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

  • kwargs arguments passed to continuation
source

Utils

HclinicBifurcationKit.generate_hom_problemFunction
generate_hom_problem(
     coll,
     x,
     pars,
@@ -37,7 +37,7 @@
     freeparams,
     kw...
 )
-

Generate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.

Arguments

  • coll a PeriodicOrbitOCollProblem which provide basic information, like the number of time slices M
  • x::AbstractArray initial guess
  • pars parameters
  • lensHom::Lens parameter axis for continuation
  • ϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁
  • t0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.

Optional arguments

You can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.

Output

  • returns a HomoclinicHyperbolicProblemPBC and an initial guess.
source
generate_hom_problem(
+

Generate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.

Arguments

  • coll a PeriodicOrbitOCollProblem which provide basic information, like the number of time slices M
  • x::AbstractArray initial guess
  • pars parameters
  • lensHom::Lens parameter axis for continuation
  • ϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁
  • t0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.

Optional arguments

You can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.

Output

  • returns a HomoclinicHyperbolicProblemPBC and an initial guess.
source
generate_hom_problem(
     sh,
     x,
     pars,
@@ -52,4 +52,4 @@
     freeparams,
     kw...
 )
-

Generate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.

Arguments

  • sh a ShootingProblem which provide basic information, like the number of time slices M
  • x::AbstractArray initial guess
  • pars parameters
  • lensHom::Lens parameter axis for continuation
  • ϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁
  • t0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.

Optional arguments

You can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.

Output

  • returns a HomoclinicHyperbolicProblemPBC and an initial guess.
source
Missing docstring.

Missing docstring for get_homoclinic_orbit. Check Documenter's build log for details.

Misc.

+

Generate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.

Arguments

  • sh a ShootingProblem which provide basic information, like the number of time slices M
  • x::AbstractArray initial guess
  • pars parameters
  • lensHom::Lens parameter axis for continuation
  • ϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁
  • t0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.

Optional arguments

You can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.

Output

  • returns a HomoclinicHyperbolicProblemPBC and an initial guess.
source
Missing docstring.

Missing docstring for get_homoclinic_orbit. Check Documenter's build log for details.

Misc.

diff --git a/dev/periodicOrbitCollocation/index.html b/dev/periodicOrbitCollocation/index.html index edbde8a..1943243 100644 --- a/dev/periodicOrbitCollocation/index.html +++ b/dev/periodicOrbitCollocation/index.html @@ -9,4 +9,4 @@ & \left\|u(0)-u_0\right\|-\epsilon_0=0 \\ & \left\|u(1)-u_0\right\|-\epsilon_1=0 \\ & \int_0^1 \tilde{u}^*(t)[u(t)-\tilde{u}(t)] d t=0, \\ -\end{aligned}\right.\]

Mesh adaptation

The goal of this functionality is to adapt the mesh in order to minimise the error.

Jacobian

The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl

References

+\end{aligned}\right.\]

Mesh adaptation

The goal of this functionality is to adapt the mesh in order to minimise the error.

Jacobian

The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl

References

diff --git a/dev/search/index.html b/dev/search/index.html index dcc4dcc..05b111c 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · Homoclinic / Heteroclinic orbits in Julia

Loading search...

    +Search · Homoclinic / Heteroclinic orbits in Julia

    Loading search...

      diff --git a/dev/search_index.js b/dev/search_index.js index b56ed99..65b206d 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"homoHS/#Homoclinic-to-hyperbolic-saddle","page":"Introduction","title":"Homoclinic to hyperbolic saddle","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Consider the ODE problem written","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"fracdudt=F(u(t)p)tagE","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"where p are parameters. A homoclinic solution u^* to a hyperbolic saddle u^s(p) satisfies limlimits_ttopminftyu^*(t) = u^s and u^*(p) is a hyperbolic saddle of (E).","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"We provide 2 methods for computing such homoclinic orbits","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"one (Collocation) based on orthogonal collocation to discretize the above problem (E), with adaptive mesh \none (Shooting) based on parallel standard shooting","category":"page"},{"location":"homoHS/#General-method","page":"Introduction","title":"General method","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"The general method amounts to solving a boundary value problem which is simplified here for the exposition","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u^s pright)=0 \n Q^U^perp mathrmTleft(u(0)-u^sright)=0 \n Q^S^perp mathrmTleft(u(1)-u^sright)=0 \n leftu(0)-u^sright-epsilon_0=0 \n leftu(1)-u^sright-epsilon_1=0 \nendalignedright","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Basically, we truncate the homoclinic orbit on -TT and we impose that u(-T)u(T) is close to u^s and belong to the stable / unstable subspaces of u^s. There are thus at most 3 free parameters and Tepsilon_0epsilon_1 and the user can either","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"chose one as a free parameter, for example T\nchose two as a free parameters, for example Tepsilon_1","category":"page"},{"location":"homoHS/#Continuation","page":"Introduction","title":"Continuation","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Please see the tutorials for examples. In a nutshell, you can compute homolinic orbits by setting up a HomoclinicHyperbolicProblemPBC or by branching from a Bogdanov-Takens point.","category":"page"},{"location":"homoHS/#Detection-of-codim-2-bifurcation-points","page":"Introduction","title":"Detection of codim 2 bifurcation points","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"We refer to [DeWitte] for a description of the bifurcations.","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Type of bifurcation Label\nLimit cycle LC\nHomoclinic to Hyperbolic Saddle HHS\nHomoclinic to Saddle-Node HSN\nNeutral saddle NSS\nNeutral saddle-focus NSF\nNeutral Bi-Focus NFF\nShilnikov-Hopf SH\nDouble Real Stable leading eigenvalue DRS\nDouble Real Unstable leading eigenvalue DRU\nNeutrally-Divergent saddle-focus (Stable) NDS\nNeutrally-Divergent saddle-focus (Unstable) NDU\nThree Leading eigenvalues (Stable) TLS\nThree Leading eigenvalues (Unstable) TLU\nOrbit-Flip with respect to the Stable manifold OFS\nOrbit-Flip with respect to the Unstable manifold OFU\nNon-Central Homoclinic to saddle-node NCH","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.","category":"page"},{"location":"homoHS/#References","page":"Introduction","title":"References","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"library/#Library","page":"Library","title":"Library","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"Pages = [\"library.md\"]\nDepth = 3","category":"page"},{"location":"library/#Parameters","page":"Library","title":"Parameters","text":"","category":"section"},{"location":"library/#Problems","page":"Library","title":"Problems","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","category":"page"},{"location":"library/#HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","page":"Library","title":"HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","text":"Computation of homoclinic orbit to an hyperbolic saddle based on the projection boundary condition (PBC) method.\n\nbvp::Any: Sructure encoding the boundary value problem. For example, you can pass a PeriodicOrbitTrapProblem, a PeriodicOrbitOCollProblem or an AbstractShootingProblem\nlens::Any: Two lenses which are used to define 2 free parameters.\nT::Any: Return time T\nϵ0::Any: Precision of how far the section is from the homoclinic point\nϵ1::Any: Precision of how far the section is from the homoclinic point\nfreelens::Any: Free parameters\nQu0::Any: Orthonormal Projector on the unstable subspace orthogonal\nQs0::Any: Orthonormal Projector on the stable subspace orthogonal\nN::Int64: Dimension of phase space\nupdateEveryStep::Int64: updates the section every update_section_every_step step during continuation\njacobian::Symbol: How the jacobian of the problem is computed\ntest::Any\ntestOrbitFlip::Bool\ntestInclinationFlip::Bool\nnUnstable::Int64\nnStable::Int64\n\n\n\n\n\n","category":"type"},{"location":"library/#Continuation","page":"Library","title":"Continuation","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"BifurcationKit.continuation(𝐇𝐨𝐦::HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC,homguess,lens::Lens,alg::BifurcationKit.AbstractContinuationAlgorithm,_contParams::ContinuationPar;kwargs...)","category":"page"},{"location":"library/#BifurcationKit.continuation-Tuple{HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC, Any, Lens, BifurcationKit.AbstractContinuationAlgorithm, ContinuationPar}","page":"Library","title":"BifurcationKit.continuation","text":"continuation(\n 𝐇𝐨𝐦,\n homguess,\n lens,\n alg,\n _contParams;\n plot_solution,\n kwargs...\n)\n\n\nThis is the continuation method for computing an homoclinic solution to a hyperbolic saddle. The parameter lens is the one from prob_vf::BifurcationProblem.\n\nArguments\n\nSimilar to continuation except that the problem is a HomoclinicHyperbolicProblemPBC.\n\n\n\n\n\n","category":"method"},{"location":"library/","page":"Library","title":"Library","text":"BifurcationKit.continuation(prob_vf,\n\t\t\tbt::BifurcationKit.BogdanovTakens,\n\t\t\tbvp::BifurcationKit.AbstractBoundaryValueProblem,\n\t\t\talg::BifurcationKit.AbstractContinuationAlgorithm,\n\t\t\t_contParams::ContinuationPar ;\n\t\t\tϵ0 = 1e-5, amplitude = 1e-3,\n\t\t\tfreeparams = ((@lens _.ϵ0), (@lens _.T)),\n\t\t\tmaxT = Inf,\n\t\t\tupdate_every_step = 1,\n\t\t\ttest_orbit_flip = false,\n\t\t\ttest_inclination_flip = false,\n\t\t\tkwargs...\n\t\t\t)","category":"page"},{"location":"library/#BifurcationKit.continuation-Tuple{Any, BifurcationKit.BogdanovTakens, BifurcationKit.AbstractBoundaryValueProblem, BifurcationKit.AbstractContinuationAlgorithm, ContinuationPar}","page":"Library","title":"BifurcationKit.continuation","text":"continuation(\n prob_vf,\n bt,\n bvp,\n alg,\n _contParams;\n ϵ0,\n amplitude,\n freeparams,\n maxT,\n update_every_step,\n test_orbit_flip,\n test_inclination_flip,\n kwargs...\n)\n\n\nPerform automatic branch switching to homoclinic curve from a Bogdanov-Takens bifurcation point. It uses the homoclinic orbit predictor from the Bogdanov-Takens normal form.\n\nArguments\n\nprob::BifurcationProblem contains the vector field\nbt::BK.BogdanovTakens a Bogdanov-takens point. For example, you can get this from a call to bt = get_normal_form(br, ind_bt)\nbvp::BK.AbstractBoundaryValueProblem, for example PeriodicOrbitOCollProblem(50, 4)\nalg continuation algorithm\n_contParams::ContinuationPar\n\nOptional arguments\n\nϵ0 = 1e-5 distance of the homolinic orbit from the saddle point\namplitude = 1e-3 amplitude of the homoclinic orbit\nmaxT = Inf limit on the \"period\" of the homoclinic cycle.\n\nYou can also pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC and those to continuation from BifurcationKit.\n\nkwargs arguments passed to continuation\n\n\n\n\n\n","category":"method"},{"location":"library/#Utils","page":"Library","title":"Utils","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"generate_hom_problem","category":"page"},{"location":"library/#HclinicBifurcationKit.generate_hom_problem","page":"Library","title":"HclinicBifurcationKit.generate_hom_problem","text":"generate_hom_problem(\n coll,\n x,\n pars,\n lensHom;\n verbose,\n ϵ0,\n ϵ1,\n t0,\n t1,\n maxT,\n freeparams,\n kw...\n)\n\n\nGenerate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.\n\nArguments\n\ncoll a PeriodicOrbitOCollProblem which provide basic information, like the number of time slices M\nx::AbstractArray initial guess\npars parameters\nlensHom::Lens parameter axis for continuation\nϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁\nt0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.\n\nOptional arguments\n\nYou can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.\n\nOutput\n\nreturns a HomoclinicHyperbolicProblemPBC and an initial guess.\n\n\n\n\n\ngenerate_hom_problem(\n sh,\n x,\n pars,\n lensHom;\n verbose,\n time,\n ϵ0,\n ϵ1,\n t0,\n t1,\n maxT,\n freeparams,\n kw...\n)\n\n\nGenerate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.\n\nArguments\n\nsh a ShootingProblem which provide basic information, like the number of time slices M\nx::AbstractArray initial guess\npars parameters\nlensHom::Lens parameter axis for continuation\nϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁\nt0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.\n\nOptional arguments\n\nYou can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.\n\nOutput\n\nreturns a HomoclinicHyperbolicProblemPBC and an initial guess.\n\n\n\n\n\n","category":"function"},{"location":"library/","page":"Library","title":"Library","text":"get_homoclinic_orbit","category":"page"},{"location":"library/#Misc.","page":"Library","title":"Misc.","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/#Autonomous-electronic-circuit-(aBS-from-BT)","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Pages = [\"tutorialsFreire.md\"]\nDepth = 3","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"The following model is taken from [Freire]:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"leftbeginaligned\n r dotx=-nu x+beta(y-x)-A_3 x^3+B_3(y-x)^3+epsilon \n doty=-beta(y-x)-z-B_3(y-x)^3 \n dotz=y\nendalignedright","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"This is an example of computing the curve of homoclinics from a Bogdanov-Takens bifurcation point. It is easy to encode the ODE as follows","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"using Revise, Plots\nusing Setfield, LinearAlgebra, Test, ForwardDiff\nusing BifurcationKit, Test\nusing HclinicBifurcationKit\nconst BK = BifurcationKit\n\nrecordFromSolution(x, p) = (x = x[1], y = x[2])\n\nfunction freire!(dz, u, p, t)\n\t(;ν, β, A₃, B₃, r, ϵ) = p\n\tx, y, z = u\n\tdz[1] = (-ν*x + β*(y-x) - A₃*x^3 + B₃*(y-x)^3 + ϵ)/r\n\tdz[2] =\t-β*(y-x) - z - B₃*(y-x)^3\n\tdz[3] = y\n\tdz\nend\n\nfreire(z, p) = freire!(similar(z), z, p, 0)\npar_freire = (ν = -0.75, β = -0.1, A₃ = 0.328578, B₃ = 0.933578, r = 0.6, ϵ = 0.01)\nz0 = [0.7,0.3,0.1]\nz0 = zeros(3)\nprob = BK.BifurcationProblem(freire, z0, par_freire, (@lens _.β); record_from_solution = recordFromSolution)\n\nnothing #hide","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"We first compute the branch of equilibria","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"opts_br = ContinuationPar(p_min = -1.4, p_max = 2.8, ds = 0.001, dsmax = 0.05, n_inversion = 6, detect_bifurcation = 3, max_bisection_steps = 25, nev = 3)\n\nbr = continuation(prob, PALC(tangent = Bordered()), opts_br, normC = norminf)\n\nscene = plot(br, plotfold=true)","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"With detailed information:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"br","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Codimension-2-bifurcations","page":"Autonomous electronic circuit (aBS from BT)","title":"Codimension 2 bifurcations","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"sn_br = continuation(br, 2, (@lens _.ν), ContinuationPar(opts_br, detect_bifurcation = 1, save_sol_every_step = 1, dsmax = 0.01, max_steps = 80) ;\n\talg = PALC(),\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tupdate_minaug_every_step = 1,\n\tbothside = true,\n\t)\n\nhopf_br = continuation(br, 4, (@lens _.ν), ContinuationPar(opts_br, detect_bifurcation = 1, save_sol_every_step = 1, max_steps = 140, dsmax = 0.02, n_inversion = 6),\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tupdate_minaug_every_step = 1,\n\tbothside = true,\n\t)\n\nplot(sn_br, hopf_br, ylims = (-0.1, 1.25))","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Branch-of-homoclinic-orbits-with-Orthogonal-Collocation","page":"Autonomous electronic circuit (aBS from BT)","title":"Branch of homoclinic orbits with Orthogonal Collocation","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Plotting function:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"function plotHom(x,p;k...)\n\t𝐇𝐨𝐦 = p.prob\n\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\tpar0 = set(par0, p.lens, p.p)\n\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\tplot!(sol.t, sol[1:3,:]',subplot=3, markersize = 1, marker=m)\nend","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Branching from BT point","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"# Bogdanov-Takens bifurcation point\nbtpt = get_normal_form(sn_br, 2; nev = 3, autodiff = false)\n\n# curve of homoclinics\nbr_hom_c = continuation(\n\t\t\tprob,\n\t\t\tbtpt,\n\t\t\t# we use mesh adaptation\n\t\t\tPeriodicOrbitOCollProblem(50, 3; meshadapt = false, K = 200),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\tsetproperties(opts_br, max_steps = 30, save_sol_every_step = 1, dsmax = 1e-2, plot_every_step = 1, p_min = -1.01, ds = 0.001, detect_event = 2, detect_bifurcation = 0);\n\tverbosity = 0, plot = false,\n\tϵ0 = 1e-5, amplitude = 2e-3,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),)\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\tfreeparams = ((@lens _.ϵ0), (@lens _.ϵ1)),\n\tnormC = norminf,\n\tupdate_every_step = 4,\n\t)\nplot(sn_br, hopf_br, ylims = (0, 1.25), branchlabel = [\"SN\", \"HOPF\"])\nplot!(br_hom_c, branchlabel = \"Hom\")","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Branch-of-homoclinic-orbits-with-Multiple-Shooting","page":"Autonomous electronic circuit (aBS from BT)","title":"Branch of homoclinic orbits with Multiple Shooting","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"using DifferentialEquations\nprobsh = ODEProblem(freire!, copy(z0), (0., 1000.), par_freire; abstol = 1e-12, reltol = 1e-10)\n\noptn_hom = NewtonPar(verbose = true, tol = 1e-10, max_iterations = 7)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = 1e-4, dsmin = 1e-6, dsmax = 1e-3, plot_every_step = 1,max_steps = 10, detect_bifurcation = 0, save_sol_every_step = 1)\n\nbr_hom_sh = continuation(\n\t\t\tprob,\n\t\t\tbtpt,\n\t\t\tShootingProblem(12, probsh, Rodas5P(); parallel = true, abstol = 1e-13, reltol = 1e-12),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\tsetproperties(optc_hom, max_steps = 200, save_sol_every_step = 1, ds = 1e-3, dsmax = 3e-2, plot_every_step = 50, detect_event = 2, a = 0.9, p_min = -1.01);\n\tverbosity = 1, plot = true,\n\tϵ0 = 1e-6, amplitude = 2e-2,\n\tupdate_every_step = 2,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),),\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\t# freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)),\n\tfreeparams = ((@lens _.T),),\n\tnormC = norminf,\n\tplot_solution = plotHom,\n\tmaxT = 45.,\n\tcallback_newton = BK.cbMaxNorm(1e1),\n\t)\ntitle!(\"\")","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#References","page":"Autonomous electronic circuit (aBS from BT)","title":"References","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"[Freire] :> Freire, E., A.J. Rodríguez-Luis, E. Gamero, and E. Ponce. “A Case Study for Homoclinic Chaos in an Autonomous Electronic Circuit.” Physica D: Nonlinear Phenomena 62, no. 1–4 (January 1993): 230–53. https://doi.org/10.1016/0167-2789(93)90284-8.","category":"page"},{"location":"faq/#FAQ","page":"Frequently Asked Questions","title":"FAQ","text":"","category":"section"},{"location":"faq/","page":"Frequently Asked Questions","title":"Frequently Asked Questions","text":"See also FAQ of BifurcationKit.jl.","category":"page"},{"location":"shooting/#Homoclinic-based-on-parallel-multiple-shooting","page":"Shooting","title":"Homoclinic based on parallel multiple shooting","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"We aim at finding homoclinic orbits for the Cauchy problem ","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"tag1 fracd xd t=f(x)","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"and we write phi^t(x_0) the associated flow (or semigroup of solutions).","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"warning: Large scale\nThe current implementation is not yet optimised for large scale problems. This will be improved in the future. ","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"The general method is explained in BifurcationKit.jl.","category":"page"},{"location":"shooting/#General-method","page":"Shooting","title":"General method","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"It amounts to solving a boundary value problem. See [DeWitte] for description of the equations on the projectors.","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u_0 pright)=0 \n Q^U^perp mathrmTleft(u(0)-u_0right)=0 \n Q^S^perp mathrmTleft(u(1)-u_0right)=0 \n T_22 U Y_U-Y_U T_11 U+T_21 U-Y_U T_12 U Y_U=0 \n T_22 S Y_S-Y_S T_11 S+T_21 S-Y_S T_12 S Y_S=0 \n leftu(0)-u_0right-epsilon_0=0 \n leftu(1)-u_0right-epsilon_1=0 \n int_0^1 tildeu^*(t)u(t)-tildeu(t) d t=0 \nendalignedright","category":"page"},{"location":"shooting/#Jacobian","page":"Shooting","title":"Jacobian","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl","category":"page"},{"location":"shooting/#References","page":"Shooting","title":"References","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"branchswitching/#Branch-switching-page","page":"Branch switching","title":"Branch switching","text":"","category":"section"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"Pages = [\"branchswitching.md\"]\nDepth = 3","category":"page"},{"location":"branchswitching/#Branch-switching-from-Bogdanov-Takens-(BT)-point-to-Homoclinic-curve-curve","page":"Branch switching","title":"Branch switching from Bogdanov-Takens (BT) point to Homoclinic curve curve","text":"","category":"section"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"We provide an automatic branch switching method in this case (see for example Autonomous electronic circuit. Hence, you can perform automatic branch switching by calling continuation with the following options:","category":"page"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"continuation(prob_vf, \n\t# bt point\n\tbt,\n\t# also like ShootingProblem or PeriodicOrbitOCollProblem\n\tbvp, \n\t# PALC, etc\n\talg, \n\t_contParams; \n\tkwargs...)","category":"page"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"Note that the BT has been detected during Fold or Hopf continuation. More information is available at continuation.","category":"page"},{"location":"tutorials/tutorials/#Tutorials","page":"Tutorials","title":"Tutorials","text":"","category":"section"},{"location":"tutorials/tutorials/#Homoclinic-to-hyperbolic-saddle","page":"Tutorials","title":"Homoclinic to hyperbolic saddle","text":"","category":"section"},{"location":"tutorials/tutorials/","page":"Tutorials","title":"Tutorials","text":"Pages = [\"ode/tutorialsFreire.md\", \"ode/OPL.md\"]\nDepth = 1","category":"page"},{"location":"detectionBifurcation/#Detection-of-bifurcation-points","page":"Bifurcation detection (codim 1)","title":"Detection of bifurcation points","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"The bifurcations are detected during a call to br = continuation(prob, alg, contParams::ContinuationPar;kwargs...) by turning on the following flags:","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"contParams.detect_bifurcation = 2 (for eigenvalues based bifurcations)\ncontParams.detect_event = 2 (for other bifurcations like inclinations)","category":"page"},{"location":"detectionBifurcation/#Precise-detection-of-bifurcation-points-using-Bisection","page":"Bifurcation detection (codim 1)","title":"Precise detection of bifurcation points using Bisection","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Note that the bifurcation points detected when detect_bifurcation = 2 can be rather crude localization of the true bifurcation points. Indeed, we only signal that, in between two continuation steps which can be large, a (several) bifurcation has been detected. Hence, we only have a rough idea of where the bifurcation is located, unless your dsmax is very small... This can be improved as follows.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"If you choose detect_bifurcation = 3, a bisection algorithm is used to locate the bifurcation points more precisely. It means that we recursively track down the change in stability. Some options in ContinuationPar control this behavior:","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"n_inversion: number of sign inversions in the bisection algorithm\nmax_bisection_steps maximum number of bisection steps\ntol_bisection_eigenvalue tolerance on real part of eigenvalue to detect bifurcation points in the bisection steps","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"tip: Bisection mode\nDuring the bisection, the eigensolvers are called like eil(J, nev; bisection = true) in order to be able to adapt the solver precision.","category":"page"},{"location":"detectionBifurcation/#List-of-detected-bifurcation-points","page":"Bifurcation detection (codim 1)","title":"List of detected bifurcation points","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"We refer to [DeWitte] for a description of the bifurcations.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Type of bifurcation Label\nLimit cycle LC\nHomoclinic to Hyperbolic Saddle HHS\nHomoclinic to Saddle-Node HSN\nNeutral saddle NSS\nNeutral saddle-focus NSF\nNeutral Bi-Focus NFF\nShilnikov-Hopf SH\nDouble Real Stable leading eigenvalue DRS\nDouble Real Unstable leading eigenvalue DRU\nNeutrally-Divergent saddle-focus (Stable) NDS\nNeutrally-Divergent saddle-focus (Unstable) NDU\nThree Leading eigenvalues (Stable) TLS\nThree Leading eigenvalues (Unstable) TLU\nOrbit-Flip with respect to the Stable manifold OFS\nOrbit-Flip with respect to the Unstable manifold OFU\nNon-Central Homoclinic to saddle-node NCH","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.","category":"page"},{"location":"detectionBifurcation/#References","page":"Bifurcation detection (codim 1)","title":"References","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"periodicOrbitCollocation/#Homoclinic-based-on-orthogonal-collocation","page":"Collocation","title":"Homoclinic based on orthogonal collocation","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"We compute Ntst time slices of a periodic orbit using orthogonal collocation. This is implemented in the structure BifurcationKit.PeriodicOrbitOCollProblem.","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"warning: Large scale\nThe current implementation is not yet optimised for large scale problems. This will be improved in the future. ","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The general method is explained in BifurcationKit.jl.","category":"page"},{"location":"periodicOrbitCollocation/#General-method","page":"Collocation","title":"General method","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"Please see [DeWitte] for a thorough description of the method. It amounts to solving a boundary value problem.","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u_0 pright)=0 \n Q^U^perp mathrmTleft(u(0)-u_0right)=0 \n Q^S^perp mathrmTleft(u(1)-u_0right)=0 \n T_22 U Y_U-Y_U T_11 U+T_21 U-Y_U T_12 U Y_U=0 \n T_22 S Y_S-Y_S T_11 S+T_21 S-Y_S T_12 S Y_S=0 \n leftu(0)-u_0right-epsilon_0=0 \n leftu(1)-u_0right-epsilon_1=0 \n int_0^1 tildeu^*(t)u(t)-tildeu(t) d t=0 \nendalignedright","category":"page"},{"location":"periodicOrbitCollocation/#Mesh-adaptation","page":"Collocation","title":"Mesh adaptation","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The goal of this functionality is to adapt the mesh in order to minimise the error.","category":"page"},{"location":"periodicOrbitCollocation/#Jacobian","page":"Collocation","title":"Jacobian","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl","category":"page"},{"location":"periodicOrbitCollocation/#References","page":"Collocation","title":"References","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"tutorials/ode/OPL/#Nonlinear-laser-model","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"Pages = [\"OPL.md\"]\nDepth = 3","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"The following model is taken from [Pusuluri]:","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"leftbeginaligned\ndotbeta =-sigma beta+g p_23 \ndotp_21 =-p_21-beta p_31+a D_21 \ndotp_23 =-p_23+beta D_23-a p_31 \ndotp_31 =-p_31+beta p_21+a p_23 \ndotD_21 =-bleft(D_21-D_21^0right)-4 a p_21-2 beta p_23 \ndotD_23 =-bleft(D_23-D_23^0right)-2 a p_21-4 beta p_23\nendalignedright","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"It is easy to encode the ODE as follows","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"using Revise, Plots\nusing Setfield, LinearAlgebra, Test, ForwardDiff\nusing BifurcationKit, Test\nusing HclinicBifurcationKit\nconst BK = BifurcationKit\n\nrecordFromSolution(x, p) = (D₂₃ = x[6], β = x[1],)\n####################################################################################################\nfunction OPL!(dz, u, p, t)\n\t(;b, σ, g, a, D₂₁⁰, D₂₃⁰) = p\n\tβ, p₂₁, p₂₃, p₃₁, D₂₁, D₂₃ = u\n\tdz[1] = -σ * β + g * p₂₃\n\tdz[2] =\t-p₂₁ - β * p₃₁ + a * D₂₁\n\tdz[3] = -p₂₃ + β * D₂₃ - a * p₃₁\n\tdz[4] = -p₃₁ + β * p₂₁ + a * p₂₃\n\tdz[5] = -b * (D₂₁ - D₂₁⁰) - 4a * p₂₁ - 2β * p₂₃\n\tdz[6] = -b * (D₂₃ - D₂₃⁰) - 2a * p₂₁ - 4β * p₂₃\n\tdz\nend\n\nOPL(z, p) = OPL!(similar(z), z, p, 0)\npar_OPL = (b = 1.2, σ = 2.0, g=50., a = 1., D₂₁⁰ = -1., D₂₃⁰ = 0.)\nz0 = zeros(6)\nprob = BK.BifurcationProblem(OPL, z0, par_OPL, (@lens _.a); record_from_solution = recordFromSolution)\n\nnothing #hide","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"We first compute the branch of equilibria","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"opts_br = ContinuationPar(p_min = -1., p_max = 8., ds = 0.001, dsmax = 0.06, n_inversion = 6, nev = 6, plot_every_step = 20, max_steps = 100)\nbr = continuation(prob, PALC(tangent = Secant()), opts_br;\n\tbothside = false, normC = norminf)\n\nplot(br, plotfold=true)\n\nbr2 = continuation(re_make(prob; u0 = [1.6931472491037485, -0.17634826359471437, 0.06772588996414994, -0.23085768742546342, -0.5672243219935907, -0.09634826359471438]), PALC(tangent = Secant()), opts_br; verbosity = 0, bothside = false, normC = norminf)\nscene = plot(br, br2)","category":"page"},{"location":"tutorials/ode/OPL/#Codimension-2-bifurcations","page":"Nonlinear laser model","title":"Codimension 2 bifurcations","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"sn_br = continuation(br, 1, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 80) ;\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tbothside = true,\n\t)\n\nhopf_br = continuation(br, 2, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 140),\n\tdetect_codim2_bifurcation = 2,\n\tbothside = true,\n\t)\n\nhopf_br2 = continuation(br2, 1, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 140),\n\tdetect_codim2_bifurcation = 2,\n\tbothside = true,\n\t)\n\nplot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"Hopf\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"Hopf\", vars = (:a, :b))\nylims!(0,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#Branch-of-homoclinic-orbits-with-Orthogonal-Collocation","page":"Nonlinear laser model","title":"Branch of homoclinic orbits with Orthogonal Collocation","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"# plotting function\nfunction plotPO(x, p; k...)\n\txtt = BK.get_periodic_orbit(p.prob, x, set(getparams(p.prob), BK.getlens(p.prob), p.p))\n\tplot!(xtt.t, xtt[1,:]; markersize = 2, k...)\n\tplot!(xtt.t, xtt[6,:]; k...)\n\tscatter!(xtt.t, xtt[1,:]; markersize = 1, legend = false, k...)\nend\n\n# record function\nfunction recordPO(x, p)\n\txtt = BK.get_periodic_orbit(p.prob, x, set(getparams(p.prob), BK.getlens(p.prob), p.p))\n\tperiod = BK.getperiod(p.prob, x, p.p)\n\treturn (max = maximum(xtt[6,:]), min = minimum(xtt[6,:]), period = period, )\nend\n\n# newton parameters\noptn_po = NewtonPar(verbose = true, tol = 1e-8, max_iterations = 25)\n\n# continuation parameters\nopts_po_cont = ContinuationPar(dsmax = 0.05, ds= 0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 100, newton_options = (@set optn_po.tol = 1e-8), detect_bifurcation = 0, plot_every_step = 3, save_sol_every_step=1,)\n\nbr_coll = continuation(\n\t# br, 2,\n\tbr2, 1,\n\topts_po_cont,\n\tPeriodicOrbitOCollProblem(20, 4; meshadapt = true, update_section_every_step = 2);\n\tampfactor = 1., δp = 0.0015,\n\tverbosity = 2,\tplot = true,\n\talg = PALC(tangent = Bordered()),\n\trecord_from_solution = recordPO,\n\tplot_solution = (x, p; k...) -> begin\n\t\tplotPO(x, p; k...)\n\t\t## add previous branch\n\t\tplot!(br, subplot=1, putbifptlegend = false)\n\t\tplot!(br2, subplot=1, putbifptlegend = false)\n\t\tend,\n\tfinalise_solution = (z, tau, step, contResult; prob = nothing, kwargs...) -> begin\n\t\t# limit the period\n\t\t\treturn z.u[end] < 150\n\t\t\ttrue\n\t\tend,\n\tnormC = norminf)\n\t\n_sol = get_periodic_orbit(br_coll, length(br_coll))\nBK.plot(_sol.t, _sol.u'; marker = :d, markersize = 1,title = \"Last periodic orbit on branch\")","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"probhom, solh = generate_hom_problem(\n setproperties(br_coll.prob.prob, meshadapt=true, K = 100),\n br_coll.sol[end].x.sol,\n BK.setparam(br_coll, br_coll.sol[end].p),\n BK.getlens(br_coll);\n update_every_step = 4,\n verbose = true,\n # ϵ0 = 1e-7, ϵ1 = 1e-7, # WORK BEST\n # ϵ0 = 1e-8, ϵ1 = 1e-5, # maxT = 70,\n t0 = 0., t1 = 120.,\n # freeparams = ((@lens _.T), (@lens _.ϵ1),)\n # freeparams = ((@lens _.T), (@lens _.ϵ0)),\n freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)), # WORK BEST\n # freeparams = ((@lens _.T),),\n testOrbitFlip = false,\n testInclinationFlip = false\n )\n#####\n\n_sol = get_homoclinic_orbit(probhom, solh, BK.getparams(probhom);)\nBK.plot(_sol.t, _sol.u'; marker = :d, markersize = 1,title = \"Guess for homoclinic orbit\")","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"optn_hom = NewtonPar(verbose = true, tol = 1e-10, max_iterations = 5)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = -0.0001, dsmin = 1e-5, plot_every_step = 10, max_steps = 100, detect_bifurcation = 0, detect_event = 2, save_sol_every_step = 1, p_min = -1.01)\n\nbr_hom_c = continuation(\n\t\t\tdeepcopy(probhom), solh, (@lens _.b),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\t# PALC(),\n\t\t\t# MoorePenrose(),\n\t\t\tsetproperties(optc_hom, max_steps = 100, save_sol_every_step = 1, dsmax = 4e-2, plot_every_step = 10, p_max = 1.5);\n\tverbosity = 1, plot = true,\n\t# callback_newton = BK.cbMaxNorm(1e1),\n\t# bothside = true,\n\tnormC = norminf,\n\tplot_solution = (x,p;k...) -> begin\n\t\t𝐇𝐨𝐦 = p.prob\n\t\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\t\tpar0 = set(par0, (@lens _.b), p.p)\n\t\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\t\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\t\tplot!(sol.t, sol[:,:]',subplot=3, markersize = 1, marker=m)\n\tend,\n\t)\n\nplot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"AH₀\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"AH₁₂\", vars = (:a, :b))\nplot!(br_hom_c, branchlabel = \"H₀\", vars = (:a, :b))\nylims!(0,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#Branch-of-homoclinic-orbits-with-Multiple-Shooting","page":"Nonlinear laser model","title":"Branch of homoclinic orbits with Multiple Shooting","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"using DifferentialEquations\nprobsh = ODEProblem(OPL!, copy(z0), (0., 1000.), par_OPL; abstol = 1e-12, reltol = 1e-10)\n\n# newton parameters\noptn_po = NewtonPar(verbose = true, tol = 1e-8, max_iterations = 25)\n\n# continuation parameters\nopts_po_cont = ContinuationPar(dsmax = 0.075, ds= -0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 130, newton_options = (@set optn_po.tol = 1e-8), tol_stability = 1e-4, detect_bifurcation = 0, plot_every_step = 10, save_sol_every_step=1)\n\nbr_sh = continuation(\n\t# br, 2,\n\tbr2, 1,\n\topts_po_cont,\n\tShootingProblem(8, probsh, Rodas5P(); parallel = true, abstol = 1e-13, reltol = 1e-11);\n\tampfactor = 1., δp = 0.0015,\n\tverbosity = 2,\tplot = true,\n\trecord_from_solution = recordPO,\n\tcallback_newton = BK.cbMaxNorm(1e0),\n\tplot_solution = (x, p; k...) -> begin\n\t\tplotPO(x, p; k...)\n\t\t## add previous branch\n\t\t# plot!(br, subplot=1, putbifptlegend = false)\n\t\tend,\n\tfinalise_solution = (z, tau, step, contResult; prob = nothing, kwargs...) -> begin\n\t\t# limit the period\n\t\t\treturn z.u[end] < 100\n\t\t\ttrue\n\t\tend,\n\tnormC = norminf)\n\n_sol = get_periodic_orbit(br_sh.prob.prob, br_sh.sol[end].x, BK.setparam(br_sh, br_sh.sol[end].p))\nplot(_sol.t, _sol[:,:]')","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"# homoclinic\nprobhom, solh = generate_hom_problem(\n\tbr_sh.prob.prob, br_sh.sol[end].x,\n\tBK.setparam(br_sh, br_sh.sol[end].p),\n\tBK.getlens(br_sh);\n\tverbose = true,\n\tupdate_every_step = 4,\n\t# ϵ0 = 1e-6, ϵ1 = 1e-5,\n\tt0 = 75, t1 = 25,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),)\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\t# freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)), # WORK BEST\n\tfreeparams = ((@lens _.T),),\n\t)\n\n_sol = get_homoclinic_orbit(probhom, solh, BK.getparams(probhom); saveat=.1)\nplot(plot(_sol[1,:], _sol[2,:]), plot(_sol.t, _sol[1:4,:]'))\n\noptn_hom = NewtonPar(verbose = true, tol = 1e-9, max_iterations = 7)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = -1e-4, dsmin = 1e-6, dsmax = 1e-3, plot_every_step = 1, max_steps = 10, detect_bifurcation = 0, save_sol_every_step = 1)\n\nbr_hom_sh = continuation(\n\t\t\tdeepcopy(probhom), solh, (@lens _.b),\n\t\t\tPALC(),\n\t\t\tsetproperties(optc_hom, max_steps = 600, save_sol_every_step = 1, dsmax = 12e-2, plot_every_step = 3, p_max = 7., detect_event = 2, a = 0.9);\n\tverbosity = 3, plot = true,\n\tcallback_newton = BK.cbMaxNorm(1e0),\n\tnormC = norminf,\n\tplot_solution = (x,p;k...) -> begin\n\t\t𝐇𝐨𝐦 = p.prob\n\t\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\t\tpar0 = set(par0, (@lens _.b), p.p)\n\t\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\t\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\t\tplot!(sol.t, sol[1:6,:]',subplot=3, markersize = 1, marker=m)\n\tend,\n\t)\n\n_sol = get_homoclinic_orbit(probhom, br_hom_sh.sol[end].x, BK.setparam(br_hom_sh, br_hom_sh.sol[end].p); saveat=.1)\nplot(_sol.t, _sol[1:6,:]')","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"plot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"AH₀\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"AH₁₂\", vars = (:a, :b))\nplot!(br_hom_c, branchlabel = \"Hc₀\", vars = (:a, :b))\nplot!(br_hom_sh, branchlabel = \"Hsh₀\", vars = (:a, :b), linewidth = 3)\nylims!(0,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#References","page":"Nonlinear laser model","title":"References","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"[Pusuluri]: Pusuluri, K, H G E Meijer, and A L Shilnikov. “Homoclinic Puzzles and Chaos in a Nonlinear Laser Model,” n.d.","category":"page"},{"location":"#HclinicBifurcationKit.jl","page":"Home","title":"HclinicBifurcationKit.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This Julia package aims at performing bifurcation analysis of Homoclinic / Heteroclinic orbits of Cauchy problems.","category":"page"},{"location":"","page":"Home","title":"Home","text":"It builds upon BifurcationKit.jl with version > 0.2 to perform continuation and numerical bifurcation analysis.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Assuming that you already have Julia correctly installed, it suffices to import HclinicBifurcationKit.jl in the standard way:","category":"page"},{"location":"","page":"Home","title":"Home","text":"import Pkg; Pkg.add(\"https://github.com/bifurcationkit/HclinicBifurcationKit.jl\")","category":"page"},{"location":"#Citing-this-work","page":"Home","title":"Citing this work","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you use this package for your work, we ask that you cite the following paper!! Open source development strongly depends on this. It is referenced on HAL-Inria as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@misc{veltz:hal-02902346,\n TITLE = {{BifurcationKit.jl}},\n AUTHOR = {Veltz, Romain},\n URL = {https://hal.archives-ouvertes.fr/hal-02902346},\n INSTITUTION = {{Inria Sophia-Antipolis}},\n YEAR = {2020},\n MONTH = Jul,\n KEYWORDS = {pseudo-arclength-continuation ; periodic-orbits ; floquet ; gpu ; bifurcation-diagram ; deflation ; newton-krylov},\n PDF = {https://hal.archives-ouvertes.fr/hal-02902346/file/354c9fb0d148262405609eed2cb7927818706f1f.tar.gz},\n HAL_ID = {hal-02902346},\n HAL_VERSION = {v1},\n}","category":"page"},{"location":"#Capabilities","page":"Home","title":"Capabilities","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"compute Homoclinic to Hyperbolic Saddle Orbits (HomHS) using Orthogonal collocation or Standard shooting\ncompute bifurcation of HomHS\nstart HomHS from a direct simulation\nautomatic branch switching to HomHS from Bogdanov-Takens bifurcation point","category":"page"},{"location":"#Other-softwares","page":"Home","title":"Other softwares","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"There are several good softwares already available.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For continuation in small dimension, most softwares are listed on DSWeb. One can mention the widely used AUTO-07p and MATCONT. All these are very reliable and some address high codimension bifurcations.\nFor large scale problems, there is none.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In Julia, the present package seems to be the only one.","category":"page"}] +[{"location":"homoHS/#Homoclinic-to-hyperbolic-saddle","page":"Introduction","title":"Homoclinic to hyperbolic saddle","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Consider the ODE problem written","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"fracdudt=F(u(t)p)tagE","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"where p are parameters. A homoclinic solution u^* to a hyperbolic saddle u^s(p) satisfies limlimits_ttopminftyu^*(t) = u^s and u^*(p) is a hyperbolic saddle of (E).","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"We provide 2 methods for computing such homoclinic orbits","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"one (Collocation) based on orthogonal collocation to discretize the above problem (E), with adaptive mesh \none (Shooting) based on parallel standard shooting","category":"page"},{"location":"homoHS/#General-method","page":"Introduction","title":"General method","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"The general method amounts to solving a boundary value problem which is simplified here for the exposition","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u^s pright)=0 \n Q^U^perp mathrmTleft(u(0)-u^sright)=0 \n Q^S^perp mathrmTleft(u(1)-u^sright)=0 \n leftu(0)-u^sright-epsilon_0=0 \n leftu(1)-u^sright-epsilon_1=0 \nendalignedright","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Basically, we truncate the homoclinic orbit on -TT and we impose that u(-T)u(T) is close to u^s and belong to the stable / unstable subspaces of u^s. There are thus at most 3 free parameters and Tepsilon_0epsilon_1 and the user can either","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"chose one as a free parameter, for example T\nchose two as a free parameters, for example Tepsilon_1","category":"page"},{"location":"homoHS/#Continuation","page":"Introduction","title":"Continuation","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Please see the tutorials for examples. In a nutshell, you can compute homolinic orbits by setting up a HomoclinicHyperbolicProblemPBC or by branching from a Bogdanov-Takens point.","category":"page"},{"location":"homoHS/#Detection-of-codim-2-bifurcation-points","page":"Introduction","title":"Detection of codim 2 bifurcation points","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"We refer to [DeWitte] for a description of the bifurcations.","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Type of bifurcation Label\nLimit cycle LC\nHomoclinic to Hyperbolic Saddle HHS\nHomoclinic to Saddle-Node HSN\nNeutral saddle NSS\nNeutral saddle-focus NSF\nNeutral Bi-Focus NFF\nShilnikov-Hopf SH\nDouble Real Stable leading eigenvalue DRS\nDouble Real Unstable leading eigenvalue DRU\nNeutrally-Divergent saddle-focus (Stable) NDS\nNeutrally-Divergent saddle-focus (Unstable) NDU\nThree Leading eigenvalues (Stable) TLS\nThree Leading eigenvalues (Unstable) TLU\nOrbit-Flip with respect to the Stable manifold OFS\nOrbit-Flip with respect to the Unstable manifold OFU\nNon-Central Homoclinic to saddle-node NCH","category":"page"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.","category":"page"},{"location":"homoHS/#References","page":"Introduction","title":"References","text":"","category":"section"},{"location":"homoHS/","page":"Introduction","title":"Introduction","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"library/#Library","page":"Library","title":"Library","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"Pages = [\"library.md\"]\nDepth = 3","category":"page"},{"location":"library/#Parameters","page":"Library","title":"Parameters","text":"","category":"section"},{"location":"library/#Problems","page":"Library","title":"Problems","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","category":"page"},{"location":"library/#HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","page":"Library","title":"HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC","text":"Computation of homoclinic orbit to an hyperbolic saddle based on the projection boundary condition (PBC) method.\n\nbvp::Any: Sructure encoding the boundary value problem. For example, you can pass a PeriodicOrbitTrapProblem, a PeriodicOrbitOCollProblem or an AbstractShootingProblem\nlens::Any: Two lenses which are used to define 2 free parameters.\nT::Any: Return time T\nϵ0::Any: Precision of how far the section is from the homoclinic point\nϵ1::Any: Precision of how far the section is from the homoclinic point\nfreelens::Any: Free parameters\nQu0::Any: Orthonormal Projector on the unstable subspace orthogonal\nQs0::Any: Orthonormal Projector on the stable subspace orthogonal\nN::Int64: Dimension of phase space\nupdateEveryStep::Int64: updates the section every update_section_every_step step during continuation\njacobian::Symbol: How the jacobian of the problem is computed\ntest::Any\ntestOrbitFlip::Bool\ntestInclinationFlip::Bool\nnUnstable::Int64\nnStable::Int64\n\n\n\n\n\n","category":"type"},{"location":"library/#Continuation","page":"Library","title":"Continuation","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"BifurcationKit.continuation(𝐇𝐨𝐦::HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC,homguess,lens::Lens,alg::BifurcationKit.AbstractContinuationAlgorithm,_contParams::ContinuationPar;kwargs...)","category":"page"},{"location":"library/#BifurcationKit.continuation-Tuple{HclinicBifurcationKit.HomoclinicHyperbolicProblemPBC, Any, Lens, BifurcationKit.AbstractContinuationAlgorithm, ContinuationPar}","page":"Library","title":"BifurcationKit.continuation","text":"continuation(\n 𝐇𝐨𝐦,\n homguess,\n lens,\n alg,\n _contParams;\n plot_solution,\n kwargs...\n)\n\n\nThis is the continuation method for computing an homoclinic solution to a hyperbolic saddle. The parameter lens is the one from prob_vf::BifurcationProblem.\n\nArguments\n\nSimilar to continuation except that the problem is a HomoclinicHyperbolicProblemPBC.\n\n\n\n\n\n","category":"method"},{"location":"library/","page":"Library","title":"Library","text":"BifurcationKit.continuation(prob_vf,\n\t\t\tbt::BifurcationKit.BogdanovTakens,\n\t\t\tbvp::BifurcationKit.AbstractBoundaryValueProblem,\n\t\t\talg::BifurcationKit.AbstractContinuationAlgorithm,\n\t\t\t_contParams::ContinuationPar ;\n\t\t\tϵ0 = 1e-5, amplitude = 1e-3,\n\t\t\tfreeparams = ((@lens _.ϵ0), (@lens _.T)),\n\t\t\tmaxT = Inf,\n\t\t\tupdate_every_step = 1,\n\t\t\ttest_orbit_flip = false,\n\t\t\ttest_inclination_flip = false,\n\t\t\tkwargs...\n\t\t\t)","category":"page"},{"location":"library/#BifurcationKit.continuation-Tuple{Any, BifurcationKit.BogdanovTakens, BifurcationKit.AbstractBoundaryValueProblem, BifurcationKit.AbstractContinuationAlgorithm, ContinuationPar}","page":"Library","title":"BifurcationKit.continuation","text":"continuation(\n prob_vf,\n bt,\n bvp,\n alg,\n _contParams;\n ϵ0,\n amplitude,\n freeparams,\n maxT,\n update_every_step,\n test_orbit_flip,\n test_inclination_flip,\n kwargs...\n)\n\n\nPerform automatic branch switching to homoclinic curve from a Bogdanov-Takens bifurcation point. It uses the homoclinic orbit predictor from the Bogdanov-Takens normal form.\n\nArguments\n\nprob::BifurcationProblem contains the vector field\nbt::BK.BogdanovTakens a Bogdanov-takens point. For example, you can get this from a call to bt = get_normal_form(br, ind_bt)\nbvp::BK.AbstractBoundaryValueProblem, for example PeriodicOrbitOCollProblem(50, 4)\nalg continuation algorithm\n_contParams::ContinuationPar\n\nOptional arguments\n\nϵ0 = 1e-5 distance of the homolinic orbit from the saddle point\namplitude = 1e-3 amplitude of the homoclinic orbit\nmaxT = Inf limit on the \"period\" of the homoclinic cycle.\n\nYou can also pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC and those to continuation from BifurcationKit.\n\nkwargs arguments passed to continuation\n\n\n\n\n\n","category":"method"},{"location":"library/#Utils","page":"Library","title":"Utils","text":"","category":"section"},{"location":"library/","page":"Library","title":"Library","text":"generate_hom_problem","category":"page"},{"location":"library/#HclinicBifurcationKit.generate_hom_problem","page":"Library","title":"HclinicBifurcationKit.generate_hom_problem","text":"generate_hom_problem(\n coll,\n x,\n pars,\n lensHom;\n verbose,\n ϵ0,\n ϵ1,\n t0,\n t1,\n maxT,\n freeparams,\n kw...\n)\n\n\nGenerate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.\n\nArguments\n\ncoll a PeriodicOrbitOCollProblem which provide basic information, like the number of time slices M\nx::AbstractArray initial guess\npars parameters\nlensHom::Lens parameter axis for continuation\nϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁\nt0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.\n\nOptional arguments\n\nYou can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.\n\nOutput\n\nreturns a HomoclinicHyperbolicProblemPBC and an initial guess.\n\n\n\n\n\ngenerate_hom_problem(\n sh,\n x,\n pars,\n lensHom;\n verbose,\n time,\n ϵ0,\n ϵ1,\n t0,\n t1,\n maxT,\n freeparams,\n kw...\n)\n\n\nGenerate a homoclinic to hyperbolic saddle problem from a periodic solution obtained with problem pb.\n\nArguments\n\nsh a ShootingProblem which provide basic information, like the number of time slices M\nx::AbstractArray initial guess\npars parameters\nlensHom::Lens parameter axis for continuation\nϵ0, ϵ1: specify the distance to the saddle point of x₀, x₁\nt0, t1: specify the time corresponding to x₀, x₁. Overwrite the part with ϵ0, ϵ1 if set.\n\nOptional arguments\n\nYou can pass the same arguments to the constructor of ::HomoclinicHyperbolicProblemPBC.\n\nOutput\n\nreturns a HomoclinicHyperbolicProblemPBC and an initial guess.\n\n\n\n\n\n","category":"function"},{"location":"library/","page":"Library","title":"Library","text":"get_homoclinic_orbit","category":"page"},{"location":"library/#Misc.","page":"Library","title":"Misc.","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/#Autonomous-electronic-circuit-(aBS-from-BT)","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Pages = [\"tutorialsFreire.md\"]\nDepth = 3","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"The following model is taken from [Freire]:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"leftbeginaligned\n r dotx=-nu x+beta(y-x)-A_3 x^3+B_3(y-x)^3+epsilon \n doty=-beta(y-x)-z-B_3(y-x)^3 \n dotz=y\nendalignedright","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"This is an example of computing the curve of homoclinics from a Bogdanov-Takens bifurcation point. It is easy to encode the ODE as follows","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"using Revise, Plots\nusing Setfield, LinearAlgebra, Test, ForwardDiff\nusing BifurcationKit, Test\nusing HclinicBifurcationKit\nconst BK = BifurcationKit\n\nrecordFromSolution(x, p) = (x = x[1], y = x[2])\n\nfunction freire!(dz, u, p, t)\n\t(;ν, β, A₃, B₃, r, ϵ) = p\n\tx, y, z = u\n\tdz[1] = (-ν*x + β*(y-x) - A₃*x^3 + B₃*(y-x)^3 + ϵ)/r\n\tdz[2] =\t-β*(y-x) - z - B₃*(y-x)^3\n\tdz[3] = y\n\tdz\nend\n\nfreire(z, p) = freire!(similar(z), z, p, 0)\npar_freire = (ν = -0.75, β = -0.1, A₃ = 0.328578, B₃ = 0.933578, r = 0.6, ϵ = 0.01)\nz0 = [0.7,0.3,0.1]\nz0 = zeros(3)\nprob = BK.BifurcationProblem(freire, z0, par_freire, (@lens _.β); record_from_solution = recordFromSolution)\n\nnothing #hide","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"We first compute the branch of equilibria","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"opts_br = ContinuationPar(p_min = -1.4, p_max = 2.8, ds = 0.001, dsmax = 0.05, n_inversion = 6, detect_bifurcation = 3, max_bisection_steps = 25, nev = 3)\n\nbr = continuation(prob, PALC(tangent = Bordered()), opts_br, normC = norminf)\n\nscene = plot(br, plotfold=true)","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"With detailed information:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"br","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Codimension-2-bifurcations","page":"Autonomous electronic circuit (aBS from BT)","title":"Codimension 2 bifurcations","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"sn_br = continuation(br, 2, (@lens _.ν), ContinuationPar(opts_br, detect_bifurcation = 1, save_sol_every_step = 1, dsmax = 0.01, max_steps = 80) ;\n\talg = PALC(),\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tupdate_minaug_every_step = 1,\n\tbothside = true,\n\t)\n\nhopf_br = continuation(br, 4, (@lens _.ν), ContinuationPar(opts_br, detect_bifurcation = 1, save_sol_every_step = 1, max_steps = 140, dsmax = 0.02, n_inversion = 6),\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tupdate_minaug_every_step = 1,\n\tbothside = true,\n\t)\n\nplot(sn_br, hopf_br, ylims = (-0.1, 1.25))","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Branch-of-homoclinic-orbits-with-Orthogonal-Collocation","page":"Autonomous electronic circuit (aBS from BT)","title":"Branch of homoclinic orbits with Orthogonal Collocation","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Plotting function:","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"function plotHom(x,p;k...)\n\t𝐇𝐨𝐦 = p.prob\n\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\tpar0 = set(par0, p.lens, p.p)\n\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\tplot!(sol.t, sol[1:3,:]',subplot=3, markersize = 1, marker=m)\nend","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"Branching from BT point","category":"page"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"# Bogdanov-Takens bifurcation point\nbtpt = get_normal_form(sn_br, 2; nev = 3, autodiff = false)\n\n# curve of homoclinics\nbr_hom_c = continuation(\n\t\t\tprob,\n\t\t\tbtpt,\n\t\t\t# we use mesh adaptation\n\t\t\tPeriodicOrbitOCollProblem(50, 3; meshadapt = false, K = 200),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\tsetproperties(opts_br, max_steps = 30, save_sol_every_step = 1, dsmax = 1e-2, plot_every_step = 1, p_min = -1.01, ds = 0.001, detect_event = 2, detect_bifurcation = 0);\n\tverbosity = 0, plot = false,\n\tϵ0 = 1e-5, amplitude = 2e-3,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),)\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\tfreeparams = ((@lens _.ϵ0), (@lens _.ϵ1)),\n\tnormC = norminf,\n\tupdate_every_step = 4,\n\t)\nplot(sn_br, hopf_br, ylims = (0, 1.25), branchlabel = [\"SN\", \"HOPF\"])\nplot!(br_hom_c, branchlabel = \"Hom\")","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#Branch-of-homoclinic-orbits-with-Multiple-Shooting","page":"Autonomous electronic circuit (aBS from BT)","title":"Branch of homoclinic orbits with Multiple Shooting","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"using DifferentialEquations\nprobsh = ODEProblem(freire!, copy(z0), (0., 1000.), par_freire; abstol = 1e-12, reltol = 1e-10)\n\noptn_hom = NewtonPar(verbose = true, tol = 1e-10, max_iterations = 7)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = 1e-4, dsmin = 1e-6, dsmax = 1e-3, plot_every_step = 1,max_steps = 10, detect_bifurcation = 0, save_sol_every_step = 1)\n\nbr_hom_sh = continuation(\n\t\t\tprob,\n\t\t\tbtpt,\n\t\t\tShootingProblem(12, probsh, Rodas5P(); parallel = true, abstol = 1e-13, reltol = 1e-12),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\tsetproperties(optc_hom, max_steps = 200, save_sol_every_step = 1, ds = 1e-3, dsmax = 3e-2, plot_every_step = 50, detect_event = 2, a = 0.9, p_min = -1.01);\n\tverbosity = 1, plot = true,\n\tϵ0 = 1e-6, amplitude = 2e-2,\n\tupdate_every_step = 2,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),),\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\t# freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)),\n\tfreeparams = ((@lens _.T),),\n\tnormC = norminf,\n\tplot_solution = plotHom,\n\tmaxT = 45.,\n\tcallback_newton = BK.cbMaxNorm(1e1),\n\t)\ntitle!(\"\")","category":"page"},{"location":"tutorials/ode/tutorialsFreire/#References","page":"Autonomous electronic circuit (aBS from BT)","title":"References","text":"","category":"section"},{"location":"tutorials/ode/tutorialsFreire/","page":"Autonomous electronic circuit (aBS from BT)","title":"Autonomous electronic circuit (aBS from BT)","text":"[Freire] :> Freire, E., A.J. Rodríguez-Luis, E. Gamero, and E. Ponce. “A Case Study for Homoclinic Chaos in an Autonomous Electronic Circuit.” Physica D: Nonlinear Phenomena 62, no. 1–4 (January 1993): 230–53. https://doi.org/10.1016/0167-2789(93)90284-8.","category":"page"},{"location":"faq/#FAQ","page":"Frequently Asked Questions","title":"FAQ","text":"","category":"section"},{"location":"faq/","page":"Frequently Asked Questions","title":"Frequently Asked Questions","text":"See also FAQ of BifurcationKit.jl.","category":"page"},{"location":"shooting/#Homoclinic-based-on-parallel-multiple-shooting","page":"Shooting","title":"Homoclinic based on parallel multiple shooting","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"We aim at finding homoclinic orbits for the Cauchy problem ","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"tag1 fracd xd t=f(x)","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"and we write phi^t(x_0) the associated flow (or semigroup of solutions).","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"warning: Large scale\nThe current implementation is not yet optimised for large scale problems. This will be improved in the future. ","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"The general method is explained in BifurcationKit.jl.","category":"page"},{"location":"shooting/#General-method","page":"Shooting","title":"General method","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"It amounts to solving a boundary value problem. See [DeWitte] for description of the equations on the projectors.","category":"page"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u_0 pright)=0 \n Q^U^perp mathrmTleft(u(0)-u_0right)=0 \n Q^S^perp mathrmTleft(u(1)-u_0right)=0 \n T_22 U Y_U-Y_U T_11 U+T_21 U-Y_U T_12 U Y_U=0 \n T_22 S Y_S-Y_S T_11 S+T_21 S-Y_S T_12 S Y_S=0 \n leftu(0)-u_0right-epsilon_0=0 \n leftu(1)-u_0right-epsilon_1=0 \n int_0^1 tildeu^*(t)u(t)-tildeu(t) d t=0 \nendalignedright","category":"page"},{"location":"shooting/#Jacobian","page":"Shooting","title":"Jacobian","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl","category":"page"},{"location":"shooting/#References","page":"Shooting","title":"References","text":"","category":"section"},{"location":"shooting/","page":"Shooting","title":"Shooting","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"branchswitching/#Branch-switching-page","page":"Branch switching","title":"Branch switching","text":"","category":"section"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"Pages = [\"branchswitching.md\"]\nDepth = 3","category":"page"},{"location":"branchswitching/#Branch-switching-from-Bogdanov-Takens-(BT)-point-to-Homoclinic-curve-curve","page":"Branch switching","title":"Branch switching from Bogdanov-Takens (BT) point to Homoclinic curve curve","text":"","category":"section"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"We provide an automatic branch switching method in this case (see for example Autonomous electronic circuit. Hence, you can perform automatic branch switching by calling continuation with the following options:","category":"page"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"continuation(prob_vf, \n\t# bt point\n\tbt,\n\t# also like ShootingProblem or PeriodicOrbitOCollProblem\n\tbvp, \n\t# PALC, etc\n\talg, \n\t_contParams; \n\tkwargs...)","category":"page"},{"location":"branchswitching/","page":"Branch switching","title":"Branch switching","text":"Note that the BT has been detected during Fold or Hopf continuation. More information is available at continuation.","category":"page"},{"location":"tutorials/tutorials/#Tutorials","page":"Tutorials","title":"Tutorials","text":"","category":"section"},{"location":"tutorials/tutorials/#Homoclinic-to-hyperbolic-saddle","page":"Tutorials","title":"Homoclinic to hyperbolic saddle","text":"","category":"section"},{"location":"tutorials/tutorials/","page":"Tutorials","title":"Tutorials","text":"Pages = [\"ode/tutorialsFreire.md\", \"ode/OPL.md\"]\nDepth = 1","category":"page"},{"location":"detectionBifurcation/#Detection-of-bifurcation-points","page":"Bifurcation detection (codim 1)","title":"Detection of bifurcation points","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"The bifurcations are detected during a call to br = continuation(prob, alg, contParams::ContinuationPar;kwargs...) by turning on the following flags:","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"contParams.detect_bifurcation = 2 (for eigenvalues based bifurcations)\ncontParams.detect_event = 2 (for other bifurcations like inclinations)","category":"page"},{"location":"detectionBifurcation/#Precise-detection-of-bifurcation-points-using-Bisection","page":"Bifurcation detection (codim 1)","title":"Precise detection of bifurcation points using Bisection","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Note that the bifurcation points detected when detect_bifurcation = 2 can be rather crude localization of the true bifurcation points. Indeed, we only signal that, in between two continuation steps which can be large, a (several) bifurcation has been detected. Hence, we only have a rough idea of where the bifurcation is located, unless your dsmax is very small... This can be improved as follows.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"If you choose detect_bifurcation = 3, a bisection algorithm is used to locate the bifurcation points more precisely. It means that we recursively track down the change in stability. Some options in ContinuationPar control this behavior:","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"n_inversion: number of sign inversions in the bisection algorithm\nmax_bisection_steps maximum number of bisection steps\ntol_bisection_eigenvalue tolerance on real part of eigenvalue to detect bifurcation points in the bisection steps","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"tip: Bisection mode\nDuring the bisection, the eigensolvers are called like eil(J, nev; bisection = true) in order to be able to adapt the solver precision.","category":"page"},{"location":"detectionBifurcation/#List-of-detected-bifurcation-points","page":"Bifurcation detection (codim 1)","title":"List of detected bifurcation points","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"You can detect the following codim 2 bifurcation points by using the option detect_codim2_bifurcation in the method continuation. Under the hood, the detection of these bifurcations is done by using Event detection as explained in Event Handling.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"We refer to [DeWitte] for a description of the bifurcations.","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Type of bifurcation Label\nLimit cycle LC\nHomoclinic to Hyperbolic Saddle HHS\nHomoclinic to Saddle-Node HSN\nNeutral saddle NSS\nNeutral saddle-focus NSF\nNeutral Bi-Focus NFF\nShilnikov-Hopf SH\nDouble Real Stable leading eigenvalue DRS\nDouble Real Unstable leading eigenvalue DRU\nNeutrally-Divergent saddle-focus (Stable) NDS\nNeutrally-Divergent saddle-focus (Unstable) NDU\nThree Leading eigenvalues (Stable) TLS\nThree Leading eigenvalues (Unstable) TLU\nOrbit-Flip with respect to the Stable manifold OFS\nOrbit-Flip with respect to the Unstable manifold OFU\nNon-Central Homoclinic to saddle-node NCH","category":"page"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"Inclination-Flip with respect to the Stable / Unstable manifold is not yet detected.","category":"page"},{"location":"detectionBifurcation/#References","page":"Bifurcation detection (codim 1)","title":"References","text":"","category":"section"},{"location":"detectionBifurcation/","page":"Bifurcation detection (codim 1)","title":"Bifurcation detection (codim 1)","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"periodicOrbitCollocation/#Homoclinic-based-on-orthogonal-collocation","page":"Collocation","title":"Homoclinic based on orthogonal collocation","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"We compute Ntst time slices of a periodic orbit using orthogonal collocation. This is implemented in the structure BifurcationKit.PeriodicOrbitOCollProblem.","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"warning: Large scale\nThe current implementation is not yet optimised for large scale problems. This will be improved in the future. ","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The general method is explained in BifurcationKit.jl.","category":"page"},{"location":"periodicOrbitCollocation/#General-method","page":"Collocation","title":"General method","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"Please see [DeWitte] for a thorough description of the method. It amounts to solving a boundary value problem.","category":"page"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"leftbeginaligned\n dotu(t)-2 Tcdot F(u(t) p)=0 \n Fleft(u_0 pright)=0 \n Q^U^perp mathrmTleft(u(0)-u_0right)=0 \n Q^S^perp mathrmTleft(u(1)-u_0right)=0 \n T_22 U Y_U-Y_U T_11 U+T_21 U-Y_U T_12 U Y_U=0 \n T_22 S Y_S-Y_S T_11 S+T_21 S-Y_S T_12 S Y_S=0 \n leftu(0)-u_0right-epsilon_0=0 \n leftu(1)-u_0right-epsilon_1=0 \n int_0^1 tildeu^*(t)u(t)-tildeu(t) d t=0 \nendalignedright","category":"page"},{"location":"periodicOrbitCollocation/#Mesh-adaptation","page":"Collocation","title":"Mesh adaptation","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The goal of this functionality is to adapt the mesh in order to minimise the error.","category":"page"},{"location":"periodicOrbitCollocation/#Jacobian","page":"Collocation","title":"Jacobian","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl","category":"page"},{"location":"periodicOrbitCollocation/#References","page":"Collocation","title":"References","text":"","category":"section"},{"location":"periodicOrbitCollocation/","page":"Collocation","title":"Collocation","text":"[DeWitte]: De Witte, Virginie, Willy Govaerts, Yuri A. Kuznetsov, and Mark Friedman. “Interactive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in MATLAB.” ACM Transactions on Mathematical Software 38, no. 3 (April 2012): 1–34. https://doi.org/10.1145/2168773.2168776.","category":"page"},{"location":"tutorials/ode/OPL/#Nonlinear-laser-model","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"Pages = [\"OPL.md\"]\nDepth = 3","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"The following model is taken from [Pusuluri]:","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"leftbeginaligned\ndotbeta =-sigma beta+g p_23 \ndotp_21 =-p_21-beta p_31+a D_21 \ndotp_23 =-p_23+beta D_23-a p_31 \ndotp_31 =-p_31+beta p_21+a p_23 \ndotD_21 =-bleft(D_21-D_21^0right)-4 a p_21-2 beta p_23 \ndotD_23 =-bleft(D_23-D_23^0right)-2 a p_21-4 beta p_23\nendalignedright","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"It is easy to encode the ODE as follows","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"using Revise, Plots\nusing Setfield\nusing BifurcationKit\nusing HclinicBifurcationKit\nconst BK = BifurcationKit\n\nrecord_from_solution(x, p) = (D₂₃ = x[6], β = x[1],)\n####################################################################################################\nfunction OPL!(dz, u, p, t = 0)\n\t(;b, σ, g, a, D₂₁⁰, D₂₃⁰) = p\n\tβ, p₂₁, p₂₃, p₃₁, D₂₁, D₂₃ = u\n\tdz[1] = -σ * β + g * p₂₃\n\tdz[2] =\t-p₂₁ - β * p₃₁ + a * D₂₁\n\tdz[3] = -p₂₃ + β * D₂₃ - a * p₃₁\n\tdz[4] = -p₃₁ + β * p₂₁ + a * p₂₃\n\tdz[5] = -b * (D₂₁ - D₂₁⁰) - 4a * p₂₁ - 2β * p₂₃\n\tdz[6] = -b * (D₂₃ - D₂₃⁰) - 2a * p₂₁ - 4β * p₂₃\n\tdz\nend\n\npar_OPL = (b = 1.2, σ = 2.0, g=50., a = 1., D₂₁⁰ = -1., D₂₃⁰ = 0.)\nz0 = zeros(6)\nprob = BK.BifurcationProblem(OPL!, z0, par_OPL, (@lens _.a); record_from_solution)\n\nnothing #hide","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"We first compute the branch of equilibria","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"opts_br = ContinuationPar(p_min = -1., p_max = 8., ds = 0.001, dsmax = 0.06, n_inversion = 6, nev = 6, plot_every_step = 20, max_steps = 100)\nbr = continuation(prob, PALC(), opts_br;\n\tbothside = false, normC = norminf)\n\nplot(br, plotfold=true)\n\nbr2 = continuation(re_make(prob; u0 = [1.6931472491037485, -0.17634826359471437, 0.06772588996414994, -0.23085768742546342, -0.5672243219935907, -0.09634826359471438]), PALC(), opts_br; verbosity = 0, bothside = false, normC = norminf)\nscene = plot(br, br2)","category":"page"},{"location":"tutorials/ode/OPL/#Codimension-2-bifurcations","page":"Nonlinear laser model","title":"Codimension 2 bifurcations","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"sn_br = continuation(br, 1, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 80) ;\n\tdetect_codim2_bifurcation = 2,\n\tstart_with_eigen = true,\n\tbothside = true,\n\t)\n\nhopf_br = continuation(br, 2, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 140),\n\tdetect_codim2_bifurcation = 2,\n\tbothside = true,\n\t)\n\nhopf_br2 = continuation(br2, 1, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 140),\n\tdetect_codim2_bifurcation = 2,\n\tbothside = true,\n\t)\n\nplot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"Hopf\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"Hopf\", vars = (:a, :b))\nylims!(0,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#Branch-of-homoclinic-orbits-with-Orthogonal-Collocation","page":"Nonlinear laser model","title":"Branch of homoclinic orbits with Orthogonal Collocation","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"# plotting function\nfunction plotPO(x, p; k...)\n\txtt = BK.get_periodic_orbit(p.prob, x, set(getparams(p.prob), BK.getlens(p.prob), p.p))\n\tplot!(xtt.t, xtt[1,:]; markersize = 2, k...)\n\tplot!(xtt.t, xtt[6,:]; k...)\n\tscatter!(xtt.t, xtt[1,:]; markersize = 1, legend = false, k...)\nend\n\n# record function\nfunction recordPO(x, p)\n\txtt = BK.get_periodic_orbit(p.prob, x, set(getparams(p.prob), BK.getlens(p.prob), p.p))\n\tperiod = BK.getperiod(p.prob, x, p.p)\n\treturn (max = maximum(xtt[6,:]), min = minimum(xtt[6,:]), period = period, )\nend\n\n# newton parameters\noptn_po = NewtonPar(verbose = true, tol = 1e-8, max_iterations = 25)\n\n# continuation parameters\nopts_po_cont = ContinuationPar(dsmax = 0.05, ds= 0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 100, newton_options = (@set optn_po.tol = 1e-8), detect_bifurcation = 0, plot_every_step = 3)\n\nbr_coll = continuation(\n\t# br, 2,\n\tbr2, 1,\n\topts_po_cont,\n\tPeriodicOrbitOCollProblem(20, 4; meshadapt = true, update_section_every_step = 2);\n\tampfactor = 1., δp = 0.0015,\n\tverbosity = 2,\tplot = true,\n\talg = PALC(tangent = Bordered()),\n\trecord_from_solution = recordPO,\n\tplot_solution = (x, p; k...) -> begin\n\t\tplotPO(x, p; k...)\n\t\t## add previous branch\n\t\tplot!(br, subplot=1, putbifptlegend = false)\n\t\tplot!(br2, subplot=1, putbifptlegend = false)\n\t\tend,\n\tfinalise_solution = (z, tau, step, contResult; prob = nothing, kwargs...) -> begin\n\t\t# limit the period\n\t\t\treturn z.u[end] < 150\n\t\t\ttrue\n\t\tend,\n\tnormC = norminf)\n\t\n_sol = get_periodic_orbit(br_coll, length(br_coll))\nBK.plot(_sol.t, _sol.u'; marker = :d, markersize = 1,title = \"Last periodic orbit on branch\")","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"probhom, solh = generate_hom_problem(\n setproperties(br_coll.prob.prob, meshadapt=true, K = 100),\n br_coll.sol[end].x.sol,\n BK.setparam(br_coll, br_coll.sol[end].p),\n BK.getlens(br_coll);\n update_every_step = 4,\n verbose = true,\n # ϵ0 = 1e-7, ϵ1 = 1e-7, # WORK BEST\n # ϵ0 = 1e-8, ϵ1 = 1e-5, # maxT = 70,\n t0 = 0., t1 = 120.,\n # freeparams = ((@lens _.T), (@lens _.ϵ1),)\n # freeparams = ((@lens _.T), (@lens _.ϵ0)),\n freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)), # WORK BEST\n # freeparams = ((@lens _.T),),\n testOrbitFlip = false,\n testInclinationFlip = false\n )\n#####\n\n_sol = get_homoclinic_orbit(probhom, solh, BK.getparams(probhom);)\nBK.plot(_sol.t, _sol.u'; marker = :d, markersize = 1,title = \"Guess for homoclinic orbit\")","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"optn_hom = NewtonPar(verbose = true, tol = 1e-10, max_iterations = 5)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = -0.0001, dsmin = 1e-5, plot_every_step = 10, max_steps = 100, detect_bifurcation = 0, detect_event = 2, save_sol_every_step = 1, p_min = -1.01)\n\nbr_hom_c = continuation(\n\t\t\tdeepcopy(probhom), solh, (@lens _.b),\n\t\t\tPALC(tangent = Bordered()),\n\t\t\t# PALC(),\n\t\t\t# MoorePenrose(),\n\t\t\tsetproperties(optc_hom, max_steps = 100, save_sol_every_step = 1, dsmax = 4e-2, plot_every_step = 10, p_max = 1.5);\n\tverbosity = 1, plot = true,\n\t# callback_newton = BK.cbMaxNorm(1e1),\n\t# bothside = true,\n\tnormC = norminf,\n\tplot_solution = (x,p;k...) -> begin\n\t\t𝐇𝐨𝐦 = p.prob\n\t\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\t\tpar0 = set(par0, (@lens _.b), p.p)\n\t\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\t\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\t\tplot!(sol.t, sol[:,:]',subplot=3, markersize = 1, marker=m)\n\tend,\n\t)\n\nplot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"AH₀\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"AH₁₂\", vars = (:a, :b))\nplot!(br_hom_c, branchlabel = \"H₀\", vars = (:a, :b))\nylims!(0.1,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#Branch-of-homoclinic-orbits-with-Multiple-Shooting","page":"Nonlinear laser model","title":"Branch of homoclinic orbits with Multiple Shooting","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"using DifferentialEquations\nprobsh = ODEProblem(OPL!, copy(z0), (0., 1000.), par_OPL; abstol = 1e-12, reltol = 1e-10)\n\n# newton parameters\noptn_po = NewtonPar(verbose = true, tol = 1e-8, max_iterations = 25)\n\n# continuation parameters\nopts_po_cont = ContinuationPar(dsmax = 0.075, ds= -0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 130, newton_options = (@set optn_po.tol = 1e-8), tol_stability = 1e-4, detect_bifurcation = 0)\n\nbr_sh = continuation(\n\t# br, 2,\n\tbr2, 1,\n\topts_po_cont,\n\tShootingProblem(8, probsh, Rodas5P(); parallel = true, abstol = 1e-13, reltol = 1e-11);\n\tampfactor = 1., δp = 0.0015,\n\tverbosity = 2,\tplot = true,\n\trecord_from_solution = recordPO,\n\tcallback_newton = BK.cbMaxNorm(1e0),\n\tplot_solution = (x, p; k...) -> begin\n\t\tplotPO(x, p; k...)\n\t\t## add previous branch\n\t\t# plot!(br, subplot=1, putbifptlegend = false)\n\t\tend,\n\tfinalise_solution = (z, tau, step, contResult; prob = nothing, kwargs...) -> begin\n\t\t# limit the period\n\t\t\treturn z.u[end] < 100\n\t\t\ttrue\n\t\tend,\n\tnormC = norminf)\n\n_sol = get_periodic_orbit(br_sh.prob.prob, br_sh.sol[end].x, BK.setparam(br_sh, br_sh.sol[end].p))\nplot(_sol.t, _sol[1:3,:]')","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"# homoclinic\nprobhom, solh = generate_hom_problem(\n\tbr_sh.prob.prob, br_sh.sol[end].x,\n\tBK.setparam(br_sh, br_sh.sol[end].p),\n\tBK.getlens(br_sh);\n\tverbose = true,\n\tupdate_every_step = 4,\n\t# ϵ0 = 1e-6, ϵ1 = 1e-5,\n\tt0 = 75, t1 = 25,\n\t# freeparams = ((@lens _.T), (@lens _.ϵ1),)\n\t# freeparams = ((@lens _.T), (@lens _.ϵ0)),\n\t# freeparams = ((@lens _.ϵ0), (@lens _.ϵ1)), # WORK BEST\n\tfreeparams = ((@lens _.T),),\n\t)\n\n_sol = get_homoclinic_orbit(probhom, solh, BK.getparams(probhom); saveat=.1)\nplot(plot(_sol[1,:], _sol[2,:]), plot(_sol.t, _sol[1:4,:]'))\n\noptn_hom = NewtonPar(verbose = true, tol = 1e-9, max_iterations = 7)\noptc_hom = ContinuationPar(newton_options = optn_hom, ds = -1e-4, dsmin = 1e-6, dsmax = 1e-3, plot_every_step = 1, max_steps = 10, detect_bifurcation = 0)\n\nbr_hom_sh = continuation(\n\t\t\tdeepcopy(probhom), solh, (@lens _.b),\n\t\t\tPALC(),\n\t\t\tsetproperties(optc_hom, max_steps = 300, save_sol_every_step = 1, dsmax = 12e-2, plot_every_step = 3, p_max = 7., detect_event = 2, a = 0.9);\n\tverbosity = 3, plot = true,\n\tcallback_newton = BK.cbMaxNorm(1e0),\n\tnormC = norminf,\n\tplot_solution = (x,p;k...) -> begin\n\t\t𝐇𝐨𝐦 = p.prob\n\t\tpar0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])\n\t\tpar0 = set(par0, (@lens _.b), p.p)\n\t\tsol = get_homoclinic_orbit(𝐇𝐨𝐦, x, par0)\n\t\tm = (𝐇𝐨𝐦.bvp isa PeriodicOrbitOCollProblem && 𝐇𝐨𝐦.bvp.meshadapt) ? :d : :none\n\t\tplot!(sol.t, sol[1:6,:]',subplot=3, markersize = 1, marker=m)\n\tend,\n\t)\n\n_sol = get_homoclinic_orbit(probhom, br_hom_sh.sol[end].x, BK.setparam(br_hom_sh, br_hom_sh.sol[end].p); saveat=.1)\nplot(_sol.t, _sol[1:6,:]')","category":"page"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"plot(sn_br, vars = (:a, :b), branchlabel = \"SN\", )\nplot!(hopf_br, branchlabel = \"AH₀\", vars = (:a, :b))\nplot!(hopf_br2, branchlabel = \"AH₁₂\", vars = (:a, :b))\nplot!(br_hom_c, branchlabel = \"Hc₀\", vars = (:a, :b))\nplot!(br_hom_sh, branchlabel = \"Hsh₀\", vars = (:a, :b), linewidth = 3)\nylims!(0,1.5)","category":"page"},{"location":"tutorials/ode/OPL/#References","page":"Nonlinear laser model","title":"References","text":"","category":"section"},{"location":"tutorials/ode/OPL/","page":"Nonlinear laser model","title":"Nonlinear laser model","text":"[Pusuluri]: Pusuluri, K, H G E Meijer, and A L Shilnikov. “Homoclinic Puzzles and Chaos in a Nonlinear Laser Model,” n.d.","category":"page"},{"location":"#HclinicBifurcationKit.jl","page":"Home","title":"HclinicBifurcationKit.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This Julia package aims at performing bifurcation analysis of Homoclinic / Heteroclinic orbits of Cauchy problems.","category":"page"},{"location":"","page":"Home","title":"Home","text":"It builds upon BifurcationKit.jl with version > 0.2 to perform continuation and numerical bifurcation analysis.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Assuming that you already have Julia correctly installed, it suffices to import HclinicBifurcationKit.jl in the standard way:","category":"page"},{"location":"","page":"Home","title":"Home","text":"import Pkg; Pkg.add(\"https://github.com/bifurcationkit/HclinicBifurcationKit.jl\")","category":"page"},{"location":"#Citing-this-work","page":"Home","title":"Citing this work","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you use this package for your work, we ask that you cite the following paper!! Open source development strongly depends on this. It is referenced on HAL-Inria as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@misc{veltz:hal-02902346,\n TITLE = {{BifurcationKit.jl}},\n AUTHOR = {Veltz, Romain},\n URL = {https://hal.archives-ouvertes.fr/hal-02902346},\n INSTITUTION = {{Inria Sophia-Antipolis}},\n YEAR = {2020},\n MONTH = Jul,\n KEYWORDS = {pseudo-arclength-continuation ; periodic-orbits ; floquet ; gpu ; bifurcation-diagram ; deflation ; newton-krylov},\n PDF = {https://hal.archives-ouvertes.fr/hal-02902346/file/354c9fb0d148262405609eed2cb7927818706f1f.tar.gz},\n HAL_ID = {hal-02902346},\n HAL_VERSION = {v1},\n}","category":"page"},{"location":"#Capabilities","page":"Home","title":"Capabilities","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"compute Homoclinic to Hyperbolic Saddle Orbits (HomHS) using Orthogonal collocation or Standard shooting\ncompute bifurcation of HomHS\nstart HomHS from a direct simulation\nautomatic branch switching to HomHS from Bogdanov-Takens bifurcation point","category":"page"},{"location":"#Other-softwares","page":"Home","title":"Other softwares","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"There are several good softwares already available.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For continuation in small dimension, most softwares are listed on DSWeb. One can mention the widely used AUTO-07p and MATCONT. All these are very reliable and some address high codimension bifurcations.\nFor large scale problems, there is none.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In Julia, the present package seems to be the only one.","category":"page"}] } diff --git a/dev/shooting/index.html b/dev/shooting/index.html index fa7c77e..c1c8c7b 100644 --- a/dev/shooting/index.html +++ b/dev/shooting/index.html @@ -9,4 +9,4 @@ & \left\|u(0)-u_0\right\|-\epsilon_0=0 \\ & \left\|u(1)-u_0\right\|-\epsilon_1=0 \\ & \int_0^1 \tilde{u}^*(t)[u(t)-\tilde{u}(t)] d t=0, \\ -\end{aligned}\right.\]

      Jacobian

      The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl

      References

      +\end{aligned}\right.\]

      Jacobian

      The jacobian is computed with automatic differentiation e.g. ForwardDiff.jl

      References

      diff --git a/dev/tutorials/ode/OPL/index.html b/dev/tutorials/ode/OPL/index.html index eb7327a..486e56f 100644 --- a/dev/tutorials/ode/OPL/index.html +++ b/dev/tutorials/ode/OPL/index.html @@ -7,14 +7,14 @@ \dot{D}_{21} & =-b\left(D_{21}-D_{21}^0\right)-4 a p_{21}-2 \beta p_{23}, \\ \dot{D}_{23} & =-b\left(D_{23}-D_{23}^0\right)-2 a p_{21}-4 \beta p_{23}, \end{aligned}\right.\]

      It is easy to encode the ODE as follows

      using Revise, Plots
      -using Setfield, LinearAlgebra, Test, ForwardDiff
      -using BifurcationKit, Test
      +using Setfield
      +using BifurcationKit
       using HclinicBifurcationKit
       const BK = BifurcationKit
       
      -recordFromSolution(x, p) = (D₂₃ = x[6], β = x[1],)
      +record_from_solution(x, p) = (D₂₃ = x[6], β = x[1],)
       ####################################################################################################
      -function OPL!(dz, u, p, t)
      +function OPL!(dz, u, p, t = 0)
       	(;b, σ, g, a, D₂₁⁰, D₂₃⁰)  = p
       	β, p₂₁, p₂₃, p₃₁, D₂₁, D₂₃ = u
       	dz[1] = -σ * β + g * p₂₃
      @@ -26,263 +26,262 @@
       	dz
       end
       
      -OPL(z, p) = OPL!(similar(z), z, p, 0)
       par_OPL = (b = 1.2, σ = 2.0, g=50., a = 1., D₂₁⁰ = -1., D₂₃⁰ = 0.)
       z0 = zeros(6)
      -prob = BK.BifurcationProblem(OPL, z0, par_OPL, (@lens _.a); record_from_solution = recordFromSolution)

      We first compute the branch of equilibria

      opts_br = ContinuationPar(p_min = -1., p_max = 8., ds = 0.001, dsmax = 0.06, n_inversion = 6, nev = 6, plot_every_step = 20, max_steps = 100)
      -br = continuation(prob, PALC(tangent = Secant()), opts_br;
      +prob = BK.BifurcationProblem(OPL!, z0, par_OPL, (@lens _.a); record_from_solution)

      We first compute the branch of equilibria

      opts_br = ContinuationPar(p_min = -1., p_max = 8., ds = 0.001, dsmax = 0.06, n_inversion = 6, nev = 6, plot_every_step = 20, max_steps = 100)
      +br = continuation(prob, PALC(), opts_br;
       	bothside = false, normC = norminf)
       
       plot(br, plotfold=true)
       
      -br2 = continuation(re_make(prob; u0 = [1.6931472491037485, -0.17634826359471437, 0.06772588996414994, -0.23085768742546342, -0.5672243219935907, -0.09634826359471438]), PALC(tangent = Secant()), opts_br; verbosity = 0, bothside = false, normC = norminf)
      +br2 = continuation(re_make(prob; u0 = [1.6931472491037485, -0.17634826359471437, 0.06772588996414994, -0.23085768742546342, -0.5672243219935907, -0.09634826359471438]), PALC(), opts_br; verbosity = 0, bothside = false, normC = norminf)
       scene = plot(br, br2)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Codimension 2 bifurcations

      sn_br = continuation(br, 1, (@lens _.b), ContinuationPar(opts_br, detect_bifurcation = 1, max_steps = 80) ;
       	detect_codim2_bifurcation = 2,
       	start_with_eigen = true,
      @@ -321,7 +320,7 @@ 

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      probhom, solh = generate_hom_problem(
           setproperties(br_coll.prob.prob, meshadapt=true, K = 100),
           br_coll.sol[end].x.sol,
      @@ -915,551 +914,551 @@ 

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      optn_hom = NewtonPar(verbose = true, tol = 1e-10, max_iterations = 5)
       optc_hom = ContinuationPar(newton_options = optn_hom, ds = -0.0001, dsmin = 1e-5, plot_every_step = 10, max_steps = 100, detect_bifurcation = 0, detect_event = 2, save_sol_every_step = 1, p_min = -1.01)
       
      @@ -1484,17 +1483,17 @@ 

      Branch of homoclinic orbits with Multiple Shooting

      using DifferentialEquations
      +plot!(br_hom_c, branchlabel = "H₀",   vars = (:a, :b))
      +ylims!(0.1,1.5)

      Branch of homoclinic orbits with Multiple Shooting

      using DifferentialEquations
       probsh = ODEProblem(OPL!, copy(z0), (0., 1000.), par_OPL; abstol = 1e-12, reltol = 1e-10)
       
       # newton parameters
       optn_po = NewtonPar(verbose = true, tol = 1e-8,  max_iterations = 25)
       
       # continuation parameters
      -opts_po_cont = ContinuationPar(dsmax = 0.075, ds= -0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 130, newton_options = (@set optn_po.tol = 1e-8), tol_stability = 1e-4, detect_bifurcation = 0, plot_every_step = 10, save_sol_every_step=1)
      +opts_po_cont = ContinuationPar(dsmax = 0.075, ds= -0.001, dsmin = 1e-4, p_max = 6.8, p_min=-5., max_steps = 130, newton_options = (@set optn_po.tol = 1e-8), tol_stability = 1e-4, detect_bifurcation = 0)
       
       br_sh = continuation(
       	# br, 2,
      @@ -1518,7 +1517,57 @@ 

      # homoclinic +plot(_sol.t, _sol[1:3,:]')

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      # homoclinic
       probhom, solh = generate_hom_problem(
       	br_sh.prob.prob, br_sh.sol[end].x,
       	BK.setparam(br_sh, br_sh.sol[end].p),
      @@ -1537,12 +1586,12 @@ 

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      plot(sn_br, vars = (:a, :b), branchlabel = "SN", )
       plot!(hopf_br, branchlabel = "AH₀", vars = (:a, :b))
       plot!(hopf_br2, branchlabel = "AH₁₂", vars = (:a, :b))
       plot!(br_hom_c, branchlabel = "Hc₀", vars = (:a, :b))
       plot!(br_hom_sh, branchlabel = "Hsh₀", vars = (:a, :b), linewidth = 3)
      -ylims!(0,1.5)

      References

      • Pusuluri

        Pusuluri, K, H G E Meijer, and A L Shilnikov. “Homoclinic Puzzles and Chaos in a Nonlinear Laser Model,” n.d.

      +ylims!(0,1.5)

      References

      • Pusuluri

        Pusuluri, K, H G E Meijer, and A L Shilnikov. “Homoclinic Puzzles and Chaos in a Nonlinear Laser Model,” n.d.

      diff --git a/dev/tutorials/ode/tutorialsFreire/index.html b/dev/tutorials/ode/tutorialsFreire/index.html index 2686269..8850883 100644 --- a/dev/tutorials/ode/tutorialsFreire/index.html +++ b/dev/tutorials/ode/tutorialsFreire/index.html @@ -31,111 +31,111 @@ scene = plot(br, plotfold=true)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 55
        ├─ Type of vectors: Vector{Float64}
      @@ -166,63 +166,63 @@
       plot(sn_br, hopf_br, ylims = (-0.1, 1.25))
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Branch of homoclinic orbits with Orthogonal Collocation

      Plotting function:

      function plotHom(x,p;k...)
       	𝐇𝐨𝐦 = p.prob
       	par0 = set(BK.getparams(𝐇𝐨𝐦), BK.getlens(𝐇𝐨𝐦), x.x[end][1])
      @@ -253,70 +253,70 @@ 

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Branch of homoclinic orbits with Multiple Shooting

      using DifferentialEquations
       probsh = ODEProblem(freire!, copy(z0), (0., 1000.), par_freire; abstol = 1e-12, reltol = 1e-10)
       
      @@ -344,115 +344,115 @@ 

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      References

      [Freire] :> Freire, E., A.J. Rodríguez-Luis, E. Gamero, and E. Ponce. “A Case Study for Homoclinic Chaos in an Autonomous Electronic Circuit.” Physica D: Nonlinear Phenomena 62, no. 1–4 (January 1993): 230–53. https://doi.org/10.1016/0167-2789(93)90284-8.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      References

      [Freire] :> Freire, E., A.J. Rodríguez-Luis, E. Gamero, and E. Ponce. “A Case Study for Homoclinic Chaos in an Autonomous Electronic Circuit.” Physica D: Nonlinear Phenomena 62, no. 1–4 (January 1993): 230–53. https://doi.org/10.1016/0167-2789(93)90284-8.

      diff --git a/dev/tutorials/tutorials/index.html b/dev/tutorials/tutorials/index.html index ec872fc..0cef7ff 100644 --- a/dev/tutorials/tutorials/index.html +++ b/dev/tutorials/tutorials/index.html @@ -1,2 +1,2 @@ -Tutorials · Homoclinic / Heteroclinic orbits in Julia +Tutorials · Homoclinic / Heteroclinic orbits in Julia