diff --git a/dev/ANM/index.html b/dev/ANM/index.html index aa7e3676..871297d9 100644 --- a/dev/ANM/index.html +++ b/dev/ANM/index.html @@ -24,7 +24,7 @@ ├─ 15 series of degree 20, tol = 1.0e-8 ├─ Number of points: 301 ├─ Type of vectors: Vector{Float64} - ├─ Parameter α starts at 6.666666666666667e-5, ends at 8.416497683441511e-12 + ├─ Parameter α starts at 6.666666666666667e-5, ends at 2.8846411103238873e-12 ├─ Algo: ANM └─ Special points: @@ -32,709 +32,701 @@ ind_ev = index of the bifurcating eigenvalue e.g. `br.eig[idx].eigenvals[ind_ev]` - # 1, bp at α ≈ +0.36763519 ∈ (+0.36787944, +0.36787944), |δp|=2e-11, [converged], δ = ( 1, 0), step = 27, eigenelements in eig[ 28], ind_ev = 1 -- # 2, bp at α ≈ +0.14889474 ∈ (+0.14936120, +0.14936124), |δp|=4e-08, [converged], δ = ( 1, 0), step = 68, eigenelements in eig[ 69], ind_ev = 2 +- # 2, bp at α ≈ +0.14909301 ∈ (+0.14936117, +0.14936132), |δp|=1e-07, [converged], δ = ( 1, 0), step = 68, eigenelements in eig[ 69], ind_ev = 2

You can plot the result as usual:

plot(branm)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

You can also show the radius of convergence of each series:

plot(branm, plotseries = true)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Finally, for each series, we ca evaluate the residual norm:

plot()
 for ii in eachindex(branm.polU)
@@ -744,56 +736,56 @@
 title!("")
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -

References

+

References

diff --git a/dev/BifProblem/index.html b/dev/BifProblem/index.html index 72ab50e2..77622eec 100644 --- a/dev/BifProblem/index.html +++ b/dev/BifProblem/index.html @@ -29,4 +29,4 @@ prob2 = BifurcationKit.re_make(prob, u0 = rand(3))
┌─ Bifurcation Problem with uType Vector{Float64}
 ├─ Inplace:  false
 ├─ Symmetric: false
-└─ Parameter: a
+└─ Parameter: a diff --git a/dev/BifurcationDiagram/index.html b/dev/BifurcationDiagram/index.html index b1321ebb..332447d2 100644 --- a/dev/BifurcationDiagram/index.html +++ b/dev/BifurcationDiagram/index.html @@ -37,350 +37,350 @@ plot(diagram; putspecialptlegend=false, markersize=2, plotfold=false, title = "#branches = $(size(diagram))") - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This gives

diagram
[Bifurcation diagram]
  ┌─ From 0-th bifurcation point.
@@ -487,4 +487,4 @@
 graphplot(_g, 
 	node_weights = ones(nv(_g)).*10, 
 	names=[props(_g, ve)[:code] for ve in vertices(_g)], 
-	curvature_scalar=0.)
+ curvature_scalar=0.) diff --git a/dev/Borderedarrays/index.html b/dev/Borderedarrays/index.html index d7d8cf60..a7589951 100644 --- a/dev/Borderedarrays/index.html +++ b/dev/Borderedarrays/index.html @@ -1,2 +1,2 @@ -Bordered arrays · Bifurcation Analysis in Julia

Bordered Arrays

Here are some informations on a composite type which is used all over the package to hold a couple (array, array) or (array, scalar) while implementing the methods described in Requested methods for Custom State.

BifurcationKit.BorderedArrayType
x = BorderedArray(vec1, vec2)

This defines an array (although not <: AbstractArray) to hold two arrays or an array and a scalar. This is useful when one wants to add constraints (phase, ...) to a functional for example. It is used throughout the package for the Pseudo Arc Length Continuation, for the continuation of Fold / Hopf points, for periodic orbits... It is also used to define periodic orbits as (orbit, period). As such, it is a convenient alternative to cat, vcat and friends. We chose not to make it a subtype of AbstractArray as we wish to apply the current package to general "arrays", see Requested methods for Custom State. Finally, it proves useful for the GPU where the operation x[end] can be slow.

+Bordered arrays · Bifurcation Analysis in Julia

Bordered Arrays

Here are some informations on a composite type which is used all over the package to hold a couple (array, array) or (array, scalar) while implementing the methods described in Requested methods for Custom State.

BifurcationKit.BorderedArrayType
x = BorderedArray(vec1, vec2)

This defines an array (although not <: AbstractArray) to hold two arrays or an array and a scalar. This is useful when one wants to add constraints (phase, ...) to a functional for example. It is used throughout the package for the Pseudo Arc Length Continuation, for the continuation of Fold / Hopf points, for periodic orbits... It is also used to define periodic orbits as (orbit, period). As such, it is a convenient alternative to cat, vcat and friends. We chose not to make it a subtype of AbstractArray as we wish to apply the current package to general "arrays", see Requested methods for Custom State. Finally, it proves useful for the GPU where the operation x[end] can be slow.

diff --git a/dev/DeflatedContinuation/index.html b/dev/DeflatedContinuation/index.html index e8d203ef..12004e36 100644 --- a/dev/DeflatedContinuation/index.html +++ b/dev/DeflatedContinuation/index.html @@ -49,1310 +49,1317 @@ plot(brdc) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/dev/EventCallback/index.html b/dev/EventCallback/index.html index 4877c204..e2d47b23 100644 --- a/dev/EventCallback/index.html +++ b/dev/EventCallback/index.html @@ -52,56 +52,56 @@

This shows for example that the first component of the event was detected userC-1 first. This yields

plot(br)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

You can also name the events as follows

 br = continuation(args...; kwargs...,
  	event = BK.ContinuousEvent(2,
  		(iter, state) -> (getp(state)+2, getx(state)[1]-1),
@@ -126,56 +126,56 @@
 
plot(br)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Example of discrete event

You can also use discrete events to detect a change. For example, the following detect when the parameter value equals -2:

br = continuation(args...; kwargs...,
 	event = BK.DiscreteEvent(1,
 		(iter, state) -> getp(state)>-2))
 ┌─ Curve type: EquilibriumCont
@@ -243,198 +243,198 @@ 

plot(br)

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/FoldContinuationPO/index.html b/dev/FoldContinuationPO/index.html index f24b1444..93db04c4 100644 --- a/dev/FoldContinuationPO/index.html +++ b/dev/FoldContinuationPO/index.html @@ -10,4 +10,4 @@ detect_codim2_bifurcation, kwargs... ) -

Codimension 2 continuation of Fold / Hopf points. This function turns an initial guess for a Fold / Hopf point into a curve of Fold / Hopf points based on a Minimally Augmented formulation. The arguments are as follows

  • br results returned after a call to continuation
  • ind_bif bifurcation index in br
  • lens2 second parameter used for the continuation, the first one is the one used to compute br, e.g. getlens(br)
  • options_cont = br.contparams arguments to be passed to the regular continuation

Optional arguments:

  • bdlinsolver bordered linear solver for the constraint equation
  • update_minaug_every_step update vectors a, b in Minimally Formulation every update_minaug_every_step steps
  • start_with_eigen = false whether to start the Minimally Augmented problem with information from eigen elements
  • detect_codim2_bifurcation ∈ {0,1,2} whether to detect Bogdanov-Takens, Bautin and Cusp. If equals 1 non precise detection is used. If equals 2, a bisection method is used to locate the bifurcations.
  • kwargs keywords arguments to be passed to the regular continuation

where the parameters are as above except that you have to pass the branch br from the result of a call to continuation with detection of bifurcations enabled and index is the index of Hopf point in br you want to refine.

ODE problems

For ODE problems, it is more efficient to use the Matrix based Bordered Linear Solver passing the option bdlinsolver = MatrixBLS()

start_with_eigen

It is recommended that you use the option start_with_eigen = true

where br is a branch of periodic orbits and the options are as above except with have an additional parameter axis lens2 which is used to locate the bifurcation points.

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

+

Codimension 2 continuation of Fold / Hopf points. This function turns an initial guess for a Fold / Hopf point into a curve of Fold / Hopf points based on a Minimally Augmented formulation. The arguments are as follows

  • br results returned after a call to continuation
  • ind_bif bifurcation index in br
  • lens2 second parameter used for the continuation, the first one is the one used to compute br, e.g. getlens(br)
  • options_cont = br.contparams arguments to be passed to the regular continuation

Optional arguments:

  • bdlinsolver bordered linear solver for the constraint equation
  • update_minaug_every_step update vectors a, b in Minimally Formulation every update_minaug_every_step steps
  • start_with_eigen = false whether to start the Minimally Augmented problem with information from eigen elements
  • detect_codim2_bifurcation ∈ {0,1,2} whether to detect Bogdanov-Takens, Bautin and Cusp. If equals 1 non precise detection is used. If equals 2, a bisection method is used to locate the bifurcations.
  • kwargs keywords arguments to be passed to the regular continuation

where the parameters are as above except that you have to pass the branch br from the result of a call to continuation with detection of bifurcations enabled and index is the index of Hopf point in br you want to refine.

ODE problems

For ODE problems, it is more efficient to use the Matrix based Bordered Linear Solver passing the option bdlinsolver = MatrixBLS()

start_with_eigen

It is recommended that you use the option start_with_eigen = true

where br is a branch of periodic orbits and the options are as above except with have an additional parameter axis lens2 which is used to locate the bifurcation points.

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

diff --git a/dev/IntroContinuation/index.html b/dev/IntroContinuation/index.html index 1d343141..223db763 100644 --- a/dev/IntroContinuation/index.html +++ b/dev/IntroContinuation/index.html @@ -1,2 +1,2 @@ -Introduction · Bifurcation Analysis in Julia

Continuation methods: introduction

The goal of these methods[Kuz],[Govaerts],[Rabinowitz],[Mei],[Keller] is to find solutions $x\in\mathbb R^n$ to nonlinear equations

\[\mathbb R^n\ni F(x,p) = 0 \quad\tag{E}\]

as function of a real parameter $p$. Given a known solution $(x_0,p_0)$, we can, under reasonable assumptions, continue it by computing a 1d curve of solutions $\gamma = (x(s),p(s))_{s\in I}$ passing through $(x_0,p_0)$.

For the sequel, it is convenient to use the following formalism [Kuz]

  1. prediction of the next point
  2. correction
  3. step size control.

Natural continuation

More information is available at Predictors - Correctors

We just use this simple continuation method to give a trivial example of the formalism. Knowing $(x_0, p_0)$, we form the predictor $(x_0, p_0+ds)$ for some $ds$ and use it as a guess for a Newton corrector applied to $x\to F(x, p_0+ds)$. The corrector is thus the newton algorithm.

This continuation method is continuation(prob, Natural(), options).

Usage

You should almost never use this predictor for computations. It fails at turning points, is not adaptive, ...

Step size control

Each time the corrector phase failed, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size can be controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Kuz

    Kuznetsov, Elements of Applied Bifurcation Theory.

  • Govaerts

    Govaerts, Numerical Methods for Bifurcations of Dynamical Equilibria; Allgower and Georg, Numerical Continuation Methods

  • Rabinowitz

    Rabinowitz, Applications of Bifurcation Theory; Dankowicz and Schilder, Recipes for Continuation

  • Mei

    Mei, Numerical Bifurcation Analysis for Reaction-Diffusion Equations

  • Keller

    Keller, Lectures on Numerical Methods in Bifurcation Problems

+Introduction · Bifurcation Analysis in Julia

Continuation methods: introduction

The goal of these methods[Kuz],[Govaerts],[Rabinowitz],[Mei],[Keller] is to find solutions $x\in\mathbb R^n$ to nonlinear equations

\[\mathbb R^n\ni F(x,p) = 0 \quad\tag{E}\]

as function of a real parameter $p$. Given a known solution $(x_0,p_0)$, we can, under reasonable assumptions, continue it by computing a 1d curve of solutions $\gamma = (x(s),p(s))_{s\in I}$ passing through $(x_0,p_0)$.

For the sequel, it is convenient to use the following formalism [Kuz]

  1. prediction of the next point
  2. correction
  3. step size control.

Natural continuation

More information is available at Predictors - Correctors

We just use this simple continuation method to give a trivial example of the formalism. Knowing $(x_0, p_0)$, we form the predictor $(x_0, p_0+ds)$ for some $ds$ and use it as a guess for a Newton corrector applied to $x\to F(x, p_0+ds)$. The corrector is thus the newton algorithm.

This continuation method is continuation(prob, Natural(), options).

Usage

You should almost never use this predictor for computations. It fails at turning points, is not adaptive, ...

Step size control

Each time the corrector phase failed, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size can be controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Kuz

    Kuznetsov, Elements of Applied Bifurcation Theory.

  • Govaerts

    Govaerts, Numerical Methods for Bifurcations of Dynamical Equilibria; Allgower and Georg, Numerical Continuation Methods

  • Rabinowitz

    Rabinowitz, Applications of Bifurcation Theory; Dankowicz and Schilder, Recipes for Continuation

  • Mei

    Mei, Numerical Bifurcation Analysis for Reaction-Diffusion Equations

  • Keller

    Keller, Lectures on Numerical Methods in Bifurcation Problems

diff --git a/dev/ModulatedTW/index.html b/dev/ModulatedTW/index.html index a0788e52..04e468d4 100644 --- a/dev/ModulatedTW/index.html +++ b/dev/ModulatedTW/index.html @@ -1,2 +1,2 @@ -Modulated Travelling waves · Bifurcation Analysis in Julia

Modulated travelling wave (MTW), $N_g=1$

This is work in progress

A modulated travelling wave with period $T$ satisfies $q(x,t+T) = q(x-s T,t)$. Equivalently, using a moving frame to freeze the wave $\xi=x-st$, it holds that $\tilde q(\xi,t+T) = \tilde q(\xi,t)$ where $\tilde q(\xi,t):=q(\xi+st,t)$. Hence, $\tilde q$ is a periodic solution to

\[\partial_t\tilde q = -sT\cdot\tilde q+F(\tilde q,p).\tag{eqMWP}\]

Stability of the MTW is determined by the spectrum of the linearized time-$T$ map associated with (eqMWP).

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

  • Sandstede

    Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

+Modulated Travelling waves · Bifurcation Analysis in Julia

Modulated travelling wave (MTW), $N_g=1$

This is work in progress

A modulated travelling wave with period $T$ satisfies $q(x,t+T) = q(x-s T,t)$. Equivalently, using a moving frame to freeze the wave $\xi=x-st$, it holds that $\tilde q(\xi,t+T) = \tilde q(\xi,t)$ where $\tilde q(\xi,t):=q(\xi+st,t)$. Hence, $\tilde q$ is a periodic solution to

\[\partial_t\tilde q = -sT\cdot\tilde q+F(\tilde q,p).\tag{eqMWP}\]

Stability of the MTW is determined by the spectrum of the linearized time-$T$ map associated with (eqMWP).

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

  • Sandstede

    Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

diff --git a/dev/MooreSpence/index.html b/dev/MooreSpence/index.html index bbc0e5db..6ef5ae3b 100644 --- a/dev/MooreSpence/index.html +++ b/dev/MooreSpence/index.html @@ -14,4 +14,4 @@ 0 \\ 1 \end{array}\right), \quad j=0,1,2, \ldots -\end{array}\right.\]

We initialise $\phi_1^0$ with the tangent.

Step size control

Each time the corrector fails, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size is controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Meijer

    Meijer, Dercole, and Oldeman, “Numerical Bifurcation Analysis.”

+\end{array}\right.\]

We initialise $\phi_1^0$ with the tangent.

Step size control

Each time the corrector fails, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size is controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Meijer

    Meijer, Dercole, and Oldeman, “Numerical Bifurcation Analysis.”

diff --git a/dev/NSContinuationPO/index.html b/dev/NSContinuationPO/index.html index 9c95821e..1b16c639 100644 --- a/dev/NSContinuationPO/index.html +++ b/dev/NSContinuationPO/index.html @@ -18,4 +18,4 @@ \partial_{u}F_{po} & \partial_pF_{po} & 0 \\ \partial_u\sigma_r & \partial_p\sigma_r & \partial_\omega\sigma_r\\ \partial_u\sigma_i & \partial_p\sigma_i & \partial_\omega\sigma_i -\end{array}\right].\]

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

+\end{array}\right].\]

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

diff --git a/dev/PALC/index.html b/dev/PALC/index.html index 6af9f22f..07c3e489 100644 --- a/dev/PALC/index.html +++ b/dev/PALC/index.html @@ -1,2 +1,2 @@ -PALC · Bifurcation Analysis in Julia

Pseudo arclength continuation

This is one of the continuation methods implemented in the package. It is set by the option PALC(tangent = Bordered()) or PALC(tangent = Secant()) in continuation. See also PALC for more information.

For solving

\[\mathbb R^n\ni F(x,p) = 0 \quad\tag{E}\]

using a Newton algorithm, we miss an equation. The simplest way is to select an hyperplane in the space $\mathbb R^n\times \mathbb R$ passing through $(x_0,p_0)$:

\[N(x, p) := \frac{\theta}{n} \langle x - x_0, dx_0\rangle + (1 - \theta)\cdot(p - p_0)\cdot dp_0 - ds = 0\tag{N}\]

with $\theta\in[0,1]$ and where $ds$ is the pseudo arclength (see [Keller]).

Parameter `θ`

The parameter θ in ContinuationPar is very important. It should be tuned for continuation to work properly especially in the case of large problems where the $\langle x - x_0, dx_0\rangle$ component in the constraint might be favored too much. Also, large θs favour p as the corresponding term in the constraint $N$ involves the term $1-θ$.

Predictor

The possible predictors are listed in Predictors - Correctors.

Corrector

The corrector is the newton algorithm for finding the roots $(x,p)$ of

\[\begin{bmatrix} F(x,p) \\ N(x,p)\end{bmatrix} = 0\tag{PALC}\]

Linear Algebra

Norm

First, the option normC continuation specifies the norm used to evaluate the residual in the following way:

\[max(normC(F(x,p)), |N(x,p)|)<tol.\]

It is thus used as a stopping criterion for the corrector. The dot product (resp. norm) used in $N$ and in the (iterative) linear solvers is LinearAlgebra.dot (resp. LinearAlgebra.norm). It can be changed by importing these functions and redefining it. Note that by default, the $\mathcal L^2$ norm is used.

These details are important because the constraint $N$ incorporates the factor length. For some custom type implementing a Vector space, the dot product could already incorporates the length factor in which case you should either redefine the dot product or change $\theta$.

Dot product

In the constraint $N$ above, the scalar product is in fact saved in BifurcationKit.jl as dotp(x,y) -> dot(x,y)/length(y). This is used in the bordered linear solvers associated to PALC. If you want to use your own dot product, you can pass

dotPALC = BK.DotTheta(mydot),

to continuation. Additionally, you may want to provide the linear operator P such that mydot(x,y) = dot(x, A*y), especially if you intend too use the linear solver MatrixBLS. We refer to BifurcationKit.DotTheta for more details.

Linear problem

Pseudo arclength continuation is based on a newton solver applied to the enlarged problem (PALC). We thus need to solve a linear system of size $n+1$ whereas the user passed a linear solver (in ContinuationPar().newton_options) for a system of size $n$.

The linear solver for the linear problem associated to (PALC) is set by the option linear_algo in continuation: it is one of Bordered linear solvers (BLS).

Step size control

Each time the corrector fails, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size is controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Keller

    Keller, Herbert B. Lectures on Numerical Methods in Bifurcation Problems. Springer, 1988

+PALC · Bifurcation Analysis in Julia

Pseudo arclength continuation

This is one of the continuation methods implemented in the package. It is set by the option PALC(tangent = Bordered()) or PALC(tangent = Secant()) in continuation. See also PALC for more information.

For solving

\[\mathbb R^n\ni F(x,p) = 0 \quad\tag{E}\]

using a Newton algorithm, we miss an equation. The simplest way is to select an hyperplane in the space $\mathbb R^n\times \mathbb R$ passing through $(x_0,p_0)$:

\[N(x, p) := \frac{\theta}{n} \langle x - x_0, dx_0\rangle + (1 - \theta)\cdot(p - p_0)\cdot dp_0 - ds = 0\tag{N}\]

with $\theta\in[0,1]$ and where $ds$ is the pseudo arclength (see [Keller]).

Parameter `θ`

The parameter θ in ContinuationPar is very important. It should be tuned for continuation to work properly especially in the case of large problems where the $\langle x - x_0, dx_0\rangle$ component in the constraint might be favored too much. Also, large θs favour p as the corresponding term in the constraint $N$ involves the term $1-θ$.

Predictor

The possible predictors are listed in Predictors - Correctors.

Corrector

The corrector is the newton algorithm for finding the roots $(x,p)$ of

\[\begin{bmatrix} F(x,p) \\ N(x,p)\end{bmatrix} = 0\tag{PALC}\]

Linear Algebra

Norm

First, the option normC continuation specifies the norm used to evaluate the residual in the following way:

\[max(normC(F(x,p)), |N(x,p)|)<tol.\]

It is thus used as a stopping criterion for the corrector. The dot product (resp. norm) used in $N$ and in the (iterative) linear solvers is LinearAlgebra.dot (resp. LinearAlgebra.norm). It can be changed by importing these functions and redefining it. Note that by default, the $\mathcal L^2$ norm is used.

These details are important because the constraint $N$ incorporates the factor length. For some custom type implementing a Vector space, the dot product could already incorporates the length factor in which case you should either redefine the dot product or change $\theta$.

Dot product

In the constraint $N$ above, the scalar product is in fact saved in BifurcationKit.jl as dotp(x,y) -> dot(x,y)/length(y). This is used in the bordered linear solvers associated to PALC. If you want to use your own dot product, you can pass

dotPALC = BK.DotTheta(mydot),

to continuation. Additionally, you may want to provide the linear operator P such that mydot(x,y) = dot(x, A*y), especially if you intend too use the linear solver MatrixBLS. We refer to BifurcationKit.DotTheta for more details.

Linear problem

Pseudo arclength continuation is based on a newton solver applied to the enlarged problem (PALC). We thus need to solve a linear system of size $n+1$ whereas the user passed a linear solver (in ContinuationPar().newton_options) for a system of size $n$.

The linear solver for the linear problem associated to (PALC) is set by the option linear_algo in continuation: it is one of Bordered linear solvers (BLS).

Step size control

Each time the corrector fails, the step size $ds$ is halved. This has the disadvantage of having lost Newton iterations (which costs time) and imposing small steps (which can be slow as well). To prevent this, the step size is controlled internally with the idea of having a constant number of Newton iterations per point. This is in part controlled by the aggressiveness factor a in ContinuationPar.

References

  • Keller

    Keller, Herbert B. Lectures on Numerical Methods in Bifurcation Problems. Springer, 1988

diff --git a/dev/PDContinuationPO/index.html b/dev/PDContinuationPO/index.html index 230f2c01..311660ad 100644 --- a/dev/PDContinuationPO/index.html +++ b/dev/PDContinuationPO/index.html @@ -17,4 +17,4 @@ \end{array}\right).\]

The jacobian of the PD functional to use for the Newton algorithm

\[\left[\begin{array}{cc} \partial_{u}F_{po} & \partial_pF_{po} \\ \partial_u\sigma & \partial_p\sigma -\end{array}\right].\]

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

+\end{array}\right].\]

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

diff --git a/dev/Predictors/index.html b/dev/Predictors/index.html index aa53669a..159d425a 100644 --- a/dev/Predictors/index.html +++ b/dev/Predictors/index.html @@ -1,2 +1,2 @@ -Predictors / correctors · Bifurcation Analysis in Julia

Predictors - Correctors

The continuation method works with the following pattern (see [Allgower1990]):

  1. compute tangent
  2. call predictor (based on tangent, mostly)
  3. call corrector

There are several couples predictor-tangent/corrector which can be used in BifurcationKit.jl as we now explain. The tangent computation is formally included in the predictor whereas it is a distinct function in the code.

Corrector

Note that setting the predictor also sets the corresponding corrector: it selects the couple predictor-corrector. You don't have (in fact cannot) set them independently.

1. Natural, zeroth order predictor

This is the dumbest predictor based on the formula $(x_1,p_1) = (x_0, p_0 + ds)$ with Newton corrector ; it fails at Turning points. This is set by the algorithm Natural() in continuation. For matrix based jacobian, it is not faster than the pseudo-arclength predictor because the factorisation of the jacobian is cached. For Matrix-free methods, this predictor can be faster than the following ones until it hits a Turning point.

2. First order predictor

This predictor is based on a computation of the tangent $\tau = (dx,dp)$ to the curve of solutions, it is given by $(x_1,p_1) = (x_0,p_0) + ds\cdot \tau$. This predictor passes Turning points when used with PALC Newton corrector. BifurcationKit.jl provides two ways to compute the tangent $(dx, dp)$.

2a. Secant predictor

This predictor is called secant and is parametrized by the algorithm PALC(tangent = Secant()) in continuation with Secant . It is computed by $(dx, dp) = (z_1, p_1) - (z_0, p_0)$ and normalized by the norm $\|(x, p)\|^2_\theta = \frac{\theta}{length(x)} \langle x,x\rangle + (1 - \theta)\cdot p^2$.

Parameter `θ`

The parameter θ in the struct ContinuationParis very important. It should be tuned for the continuation to work properly especially in the case of large problems where the $\langle x - x_0, dx_0\rangle$ component in the constraint might be favored too much. Also, large θs favour p as the corresponding term in the constraint $N$ involves the term $1-θ$.

2b. Bordered predictor

This predictor departs from the previous one in the way the tangent is estimated. It computes $(dx, dp)$ by solving solving the bordered linear system $\begin{bmatrix} F_x & F_p \\ \frac{\theta}{length(x)}dx_0 & (1-\theta)dp_0\end{bmatrix}\begin{bmatrix}dx \\ dp\end{bmatrix} =\begin{bmatrix}0 \\ 1\end{bmatrix}$.

It is set by the algorithm PALC(tangent = Bordered()) in continuation with Bordered. The linear solver for the linear problem in $(dx, dp)$ is set by the option bls in PALC: it is one of Bordered linear solvers (BLS).

3. Polynomial predictor

The polynomial predictor is based on a fit (least square regression) of an $n$th-order polynomial $P$ on the last $k$ solution vectors, where $n < k$. The arclength $s$ is used for the polynomial which then fits the solution $(x_i,p_i,s_i)$ as $P(s_i)\approx (x_i,p_i)$. To keep $s$ in suitable range (see [Waugh]), we rescale it as $s\to \frac{s-\bar s}{\sigma}$ where $\sigma$ is the standard deviation of the $s_i$.

This algorithm is parametrized by alg = Polynomial(Fred, n, k, v0) where pred::AbstractTangentComputation is the tangent predictor used only for the first $k$ solutions before the polynomial predictor is operational and v0 is an example of guess. More information is available in Polynomial.

4. Multiple predictor (aka pmcont in pde2path)

The predictor is designed [Uecker2014] to avoid spurious branch switching and pass singular points especially in PDE where branch point density can be quite high. It is based on the use of many predictors with increasing "jumps" $(x_i,p_i) = (x_0,p_0) + i\cdot ds\cdot \tau,\ i\leq nb$ and use a corrector (PALC Newton) with the following twist. The criterion is that in each Newton step, the residual has to decrease by a factor $0<\alpha<1$:

\[\| F(u_n,p_n)\|\leq \alpha \| F(u_{n-1},p_{n-1}) \|\]

otherwise the corrector fails. The solution that is returned is the one for the highest $i$. We refer to [Uecker2014] for an exposition of the step size adaption strategy.

This algorithm is parametrized by alg = Multiple(pred, x0, α, nb) where τ is an initial tangent vector (used to set the types) and pred::PALC is a predictor. The default value is pred = PALC(). More information is available in Multiple.

  • Allgower1990

    Allgower and Georg, Numerical Continuation Methods, 1990

  • Waugh

    Waugh, Illingworth, and Juniper, “Matrix-Free Continuation of Limit Cycles for Bifurcation Analysis of Large Thermoacoustic Systems.”

  • Uecker2014

    1.Uecker, H. pde2path - A Matlab Package for Continuation and Bifurcation in 2D Elliptic Systems. NMTMA 7, 58–106 (2014).

+Predictors / correctors · Bifurcation Analysis in Julia

Predictors - Correctors

The continuation method works with the following pattern (see [Allgower1990]):

  1. compute tangent
  2. call predictor (based on tangent, mostly)
  3. call corrector

There are several couples predictor-tangent/corrector which can be used in BifurcationKit.jl as we now explain. The tangent computation is formally included in the predictor whereas it is a distinct function in the code.

Corrector

Note that setting the predictor also sets the corresponding corrector: it selects the couple predictor-corrector. You don't have (in fact cannot) set them independently.

1. Natural, zeroth order predictor

This is the dumbest predictor based on the formula $(x_1,p_1) = (x_0, p_0 + ds)$ with Newton corrector ; it fails at Turning points. This is set by the algorithm Natural() in continuation. For matrix based jacobian, it is not faster than the pseudo-arclength predictor because the factorisation of the jacobian is cached. For Matrix-free methods, this predictor can be faster than the following ones until it hits a Turning point.

2. First order predictor

This predictor is based on a computation of the tangent $\tau = (dx,dp)$ to the curve of solutions, it is given by $(x_1,p_1) = (x_0,p_0) + ds\cdot \tau$. This predictor passes Turning points when used with PALC Newton corrector. BifurcationKit.jl provides two ways to compute the tangent $(dx, dp)$.

2a. Secant predictor

This predictor is called secant and is parametrized by the algorithm PALC(tangent = Secant()) in continuation with Secant . It is computed by $(dx, dp) = (z_1, p_1) - (z_0, p_0)$ and normalized by the norm $\|(x, p)\|^2_\theta = \frac{\theta}{length(x)} \langle x,x\rangle + (1 - \theta)\cdot p^2$.

Parameter `θ`

The parameter θ in the struct ContinuationParis very important. It should be tuned for the continuation to work properly especially in the case of large problems where the $\langle x - x_0, dx_0\rangle$ component in the constraint might be favored too much. Also, large θs favour p as the corresponding term in the constraint $N$ involves the term $1-θ$.

2b. Bordered predictor

This predictor departs from the previous one in the way the tangent is estimated. It computes $(dx, dp)$ by solving solving the bordered linear system $\begin{bmatrix} F_x & F_p \\ \frac{\theta}{length(x)}dx_0 & (1-\theta)dp_0\end{bmatrix}\begin{bmatrix}dx \\ dp\end{bmatrix} =\begin{bmatrix}0 \\ 1\end{bmatrix}$.

It is set by the algorithm PALC(tangent = Bordered()) in continuation with Bordered. The linear solver for the linear problem in $(dx, dp)$ is set by the option bls in PALC: it is one of Bordered linear solvers (BLS).

3. Polynomial predictor

The polynomial predictor is based on a fit (least square regression) of an $n$th-order polynomial $P$ on the last $k$ solution vectors, where $n < k$. The arclength $s$ is used for the polynomial which then fits the solution $(x_i,p_i,s_i)$ as $P(s_i)\approx (x_i,p_i)$. To keep $s$ in suitable range (see [Waugh]), we rescale it as $s\to \frac{s-\bar s}{\sigma}$ where $\sigma$ is the standard deviation of the $s_i$.

This algorithm is parametrized by alg = Polynomial(Fred, n, k, v0) where pred::AbstractTangentComputation is the tangent predictor used only for the first $k$ solutions before the polynomial predictor is operational and v0 is an example of guess. More information is available in Polynomial.

4. Multiple predictor (aka pmcont in pde2path)

The predictor is designed [Uecker2014] to avoid spurious branch switching and pass singular points especially in PDE where branch point density can be quite high. It is based on the use of many predictors with increasing "jumps" $(x_i,p_i) = (x_0,p_0) + i\cdot ds\cdot \tau,\ i\leq nb$ and use a corrector (PALC Newton) with the following twist. The criterion is that in each Newton step, the residual has to decrease by a factor $0<\alpha<1$:

\[\| F(u_n,p_n)\|\leq \alpha \| F(u_{n-1},p_{n-1}) \|\]

otherwise the corrector fails. The solution that is returned is the one for the highest $i$. We refer to [Uecker2014] for an exposition of the step size adaption strategy.

This algorithm is parametrized by alg = Multiple(pred, x0, α, nb) where τ is an initial tangent vector (used to set the types) and pred::PALC is a predictor. The default value is pred = PALC(). More information is available in Multiple.

  • Allgower1990

    Allgower and Georg, Numerical Continuation Methods, 1990

  • Waugh

    Waugh, Illingworth, and Juniper, “Matrix-Free Continuation of Limit Cycles for Bifurcation Analysis of Large Thermoacoustic Systems.”

  • Uecker2014

    1.Uecker, H. pde2path - A Matlab Package for Continuation and Bifurcation in 2D Elliptic Systems. NMTMA 7, 58–106 (2014).

diff --git a/dev/abs-from-codim2-eq/index.html b/dev/abs-from-codim2-eq/index.html index 39ae211e..6098443c 100644 --- a/dev/abs-from-codim2-eq/index.html +++ b/dev/abs-from-codim2-eq/index.html @@ -24,4 +24,4 @@ autodiff = false, Teigvec = getvectortype(br), scaleζ = norm, - kwargs...)

where ind_HH is the index of the HH point in br. Note that the HH has been detected during Hopf continuation. Calling the above method thus switches from Hopf continuation to another Hopf branch automatically with the same parameter axis.

Check the docs of Fold / Hopf Continuation and particularly Setting the jacobian for improving the speed of computation for large scale systems.

+ kwargs...)

where ind_HH is the index of the HH point in br. Note that the HH has been detected during Hopf continuation. Calling the above method thus switches from Hopf continuation to another Hopf branch automatically with the same parameter axis.

Check the docs of Fold / Hopf Continuation and particularly Setting the jacobian for improving the speed of computation for large scale systems.

diff --git a/dev/abs-from-codim2-po/index.html b/dev/abs-from-codim2-po/index.html index 8dc3877f..7993952b 100644 --- a/dev/abs-from-codim2-po/index.html +++ b/dev/abs-from-codim2-po/index.html @@ -10,4 +10,4 @@ prob::AbstractPeriodicOrbitProblem ; δp = nothing, ampfactor = 1, whichns = 1, - kwargs...)

where prob is a method to compute periodic orbits (see From Hopf point to periodic orbits for more information). The option whichns which belongs to {1,2} controls which NS curve you want to compute.

Note that the two parameters in br will be used for the continuation of NS points of periodic orbits.

See ODE for an example of use.

+ kwargs...)

where prob is a method to compute periodic orbits (see From Hopf point to periodic orbits for more information). The option whichns which belongs to {1,2} controls which NS curve you want to compute.

Note that the two parameters in br will be used for the continuation of NS points of periodic orbits.

See ODE for an example of use.

diff --git a/dev/abs-from-eq/index.html b/dev/abs-from-eq/index.html index 2beb52c3..3aa41bb2 100644 --- a/dev/abs-from-eq/index.html +++ b/dev/abs-from-eq/index.html @@ -20,97 +20,97 @@ scene = plot(br, br1; branchlabel = ["br", "br1"], legend = :topleft) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Simple example: pitchfork bifurcation

using BifurcationKit, Setfield, Plots
 
 # vector field of pitchfork bifurcation
@@ -133,100 +133,100 @@ 

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

Algorithm

  • the normal form is computed and non-trivial zeros are used to produce guesses for points on the bifurcated branch.

From non simple branch point to equilibria

We provide an automatic branch switching method in this case. The underlying method is to first compute the reduced equation (see Non-simple branch point) and its zeros. These zeros are then seeded as initial guess for continuation. Hence, you can perform automatic branch switching by calling continuation with the following options:

continuation(br::ContResult, 
 	ind_bif::Int,
 	optionsCont::ContinuationPar;
@@ -274,175 +274,173 @@ 

Algorithm

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

Assisted branching from non-simple bifurcation point

It may happen that the general procedure fails. We thus expose the procedure multicontinuation in order to let the user tune it to its need.

The first step is to compute the reduced equation, say of the first bifurcation point in br.

bp = get_normal_form(br, 1)
Non simple bifurcation point at μ ≈ 8.912198888088785e-5. 
 Kernel dimension = 3
 Normal form:
@@ -451,13 +449,13 @@ 

δp = 0.005 -pred = predictor(bp, δp)

(before = [[0.0, 0.0, 0.0]], after = [[0.0, 0.0, 0.0], [1.8976221993401863e-22, -1.2459948188527875e-22, -0.057735026918947635], [1.8367099231598242e-39, -0.057735026918947635, -1.8367099231598242e-39], [0.0, 9.4039548065783e-38, 0.057735026918947635], [-1.925929944387236e-34, 0.057735026918947635, 3.611118645726067e-35]])

which returns zeros of bp before and after the bifurcation point. You could also use your preferred procedure from Roots.jl (or other) to find the zeros of the polynomials bp(Val(:reducedForm), z, p).

We can use these zeros to form guesses to apply Newton for the full functional:

pts = BifurcationKit.get_first_points_on_branch(br, bp, pred, opts_br; δp =  δp)
(before = ┌─ Deflation operator with 1 root(s)
+pred = predictor(bp, δp)
(before = [[0.0, 0.0, 0.0]], after = [[0.0, 0.0, 0.0], [0.05382180219586075, 0.05382180219586075, 0.05382180219586075], [0.057735026918947635, 1.6195251275314955e-24, 1.4196214632612493e-24], [3.009265538105056e-36, 0.057735026918947635, 3.76158192263132e-36], [1.504632769052528e-36, -0.057735026918947635, -1.504632769052528e-36]])

which returns zeros of bp before and after the bifurcation point. You could also use your preferred procedure from Roots.jl (or other) to find the zeros of the polynomials bp(Val(:reducedForm), z, p).

We can use these zeros to form guesses to apply Newton for the full functional:

pts = BifurcationKit.get_first_points_on_branch(br, bp, pred, opts_br; δp =  δp)
(before = ┌─ Deflation operator with 1 root(s)
 ├─ eltype   = Float64
 ├─ power    = 2
 ├─ α        = 1.0
 ├─ dist     = dot
 └─ autodiff = true
-, after = ┌─ Deflation operator with 5 root(s)
+, after = ┌─ Deflation operator with 4 root(s)
 ├─ eltype   = Float64
 ├─ power    = 2
 ├─ α        = 1.0
@@ -468,173 +466,151 @@ 

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

Note that you can chose another predictor which uses all vertices of the cube as initial guesses

pred = predictor(bp, Val(:exhaustive), δp)
 pts = BifurcationKit.get_first_points_on_branch(br, bp, pred, opts_br; δp =  δp)
(before = ┌─ Deflation operator with 1 root(s)
 ├─ eltype   = Float64
@@ -653,271 +629,271 @@ 

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

predictors @docsBifurcationKit.predictor(bp::BifurcationKit.NdBranchPoint, δp::T; k...) where T@docsBifurcationKit.predictor(bp::BifurcationKit.NdBranchPoint, algo::Val{:exhaustive}, δp::T;k...) where T

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

predictors @docsBifurcationKit.predictor(bp::BifurcationKit.NdBranchPoint, δp::T; k...) where T@docsBifurcationKit.predictor(bp::BifurcationKit.NdBranchPoint, algo::Val{:exhaustive}, δp::T;k...) where T

diff --git a/dev/abs-from-hopf/index.html b/dev/abs-from-hopf/index.html index efd83e76..bee330a6 100644 --- a/dev/abs-from-hopf/index.html +++ b/dev/abs-from-hopf/index.html @@ -36,92 +36,92 @@ plot(br, br_po)

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

From Period-doubling point to curve of periodic orbits

Case of Shooting and Collocation

We provide an automatic branching procedure in this case. In essence, all you have to do is to call

continuation(br::ContResult, ind_PD::Int, _contParams::ContinuationPar;
     prm = true, detailed = true,
     kwargs...)

The option prm = true enforces that the period-doubling normal form is computed using the Poincaré return map ; this is only necessary in case of use of the collocation method. Indeed, in the case of the collocation method, an automatic procedure based on the Iooss normal form has yet to be implemented.

Case of Trapezoid method

We do not provide (for now) the automatic branching procedure for these bifurcations of periodic orbits. As a consequence, the user is asked to provide the amplitude of the bifurcated solution.

The call is as follows. Please note that a deflation is included in this method to simplify branch switching.

continuation(br::AbstractBranchResult, ind_PD::Int, contParams::ContinuationPar;
 	δp = 0.1, ampfactor = 1, 
 	usedeflation = false,
 	kwargs...)

An example of use is provided in Lur'e problem.

Algorithm

The algorithm proceeds as follows. The normal form of the Period-doubling bifurcation is first computed. Then a predictor for the bifurcated branch of periodic orbits is generated from the normal form. Finally, this predictor is used as a guess for the computation of periodic orbits.

From Branch point to curve of periodic orbits

We do not provide (for now) the automatic branching procedure for these bifurcations of periodic orbits. As a consequence, the user is asked to provide the amplitude of the bifurcated solution.

We provide the branching method for the following methods to compute periodic orbits: PeriodicOrbitTrapProblem, PeriodicOrbitOCollProblem, ShootingProblem and PoincareShootingProblem. The call is as follows. Please note that a deflation is included in this method to simplify branch switching.

An example of use is provided in Lur'e problem.

continuation(br::AbstractBranchResult, ind_PD::Int, contParams::ContinuationPar;
-	δp = 0.1, ampfactor = 1, usedeflation = false, kwargs...)
+ δp = 0.1, ampfactor = 1, usedeflation = false, kwargs...)

diff --git a/dev/bautin/index.html b/dev/bautin/index.html index 7bdf55ad..4576d71c 100644 --- a/dev/bautin/index.html +++ b/dev/bautin/index.html @@ -3,4 +3,4 @@ verbose = false, ζs = nothing, lens = getlens(br), - kwargs...)

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type Bautin.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

+ kwargs...)

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type Bautin.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

diff --git a/dev/borderedlinearsolver/index.html b/dev/borderedlinearsolver/index.html index 11481bdb..31bb51d7 100644 --- a/dev/borderedlinearsolver/index.html +++ b/dev/borderedlinearsolver/index.html @@ -9,4 +9,4 @@ {u_2} \end{array}\right)$ to $(E)$ when $A$ is non singular is

\[\begin{array}{l} u_2 = \frac{1}{d - c\cdot x_2}(v_2 - c\cdot x_1) \\ u_1=x_1-u_2x_2 -\end{array}\]

where $x_1=A^{-1}v_1, x_2=A^{-1}b$.

It is very efficient for large scale problems because it is entirely Matrix-Free and one can use preconditioners. You can create such bordered linear solver using bls = BorderingBLS(ls) where ls::AbstractLinearSolver is a linear solver which defaults to \. The intermediate solutions $x_1=A^{-1}v_1, x_2=A^{-1}b$ are formed using ls.

  1. In the case where ls = DefaultLS(), the factorisation of A is cached so the second linear solve is very fast

There are more options to BorderingBLS. First, the residual can be checked using the option check_precision = true. If the residual is above a prescribed tolerance, an iterative method is used based on several bordering transformations. This is the BEC+k algorithm in [Govaerts].

Full Matrix-Free MatrixFreeBLS

In cases where $A$ is singular but $J$ is not, the bordering method may fail. It can thus be advantageous to form the Matrix-Free version of $J$ and call a generic linear solver to find the solution to $(E)$. You can create such bordered linear solver using bls = MatrixFreeBLS(ls) where ls::AbstractLinearSolver is a (Matrix Free) linear solver which is used to invert J.

For now, this linear solver only works with AbstractArray

References

  • Govaerts

    Govaerts, W. “Stable Solvers and Block Elimination for Bordered Systems.” SIAM Journal on Matrix Analysis and Applications 12, no. 3 (July 1, 1991): 469–83. https://doi.org/10.1137/0612034.

+\end{array}\]

where $x_1=A^{-1}v_1, x_2=A^{-1}b$.

It is very efficient for large scale problems because it is entirely Matrix-Free and one can use preconditioners. You can create such bordered linear solver using bls = BorderingBLS(ls) where ls::AbstractLinearSolver is a linear solver which defaults to \. The intermediate solutions $x_1=A^{-1}v_1, x_2=A^{-1}b$ are formed using ls.

  1. In the case where ls = DefaultLS(), the factorisation of A is cached so the second linear solve is very fast

There are more options to BorderingBLS. First, the residual can be checked using the option check_precision = true. If the residual is above a prescribed tolerance, an iterative method is used based on several bordering transformations. This is the BEC+k algorithm in [Govaerts].

Full Matrix-Free MatrixFreeBLS

In cases where $A$ is singular but $J$ is not, the bordering method may fail. It can thus be advantageous to form the Matrix-Free version of $J$ and call a generic linear solver to find the solution to $(E)$. You can create such bordered linear solver using bls = MatrixFreeBLS(ls) where ls::AbstractLinearSolver is a (Matrix Free) linear solver which is used to invert J.

For now, this linear solver only works with AbstractArray

References

  • Govaerts

    Govaerts, W. “Stable Solvers and Block Elimination for Bordered Systems.” SIAM Journal on Matrix Analysis and Applications 12, no. 3 (July 1, 1991): 469–83. https://doi.org/10.1137/0612034.

diff --git a/dev/bt/index.html b/dev/bt/index.html index e75062b9..01774daa 100644 --- a/dev/bt/index.html +++ b/dev/bt/index.html @@ -16,4 +16,4 @@ ζs = nothing, autodiff = true, detailed = true, - kwargs...)

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The option detailed controls the computation of a simplified version of the normal form. autodiff controls the use of ForwardDiff during the normal form computation.

The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type BogdanovTakens.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Haragus

    Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

  • AlHdaibat

    Al-Hdaibat, B., W. Govaerts, Yu. A. Kuznetsov, and H. G. E. Meijer. “Initialization of Homoclinic Solutions near Bogdanov–Takens Points: Lindstedt–Poincaré Compared with Regular Perturbation Method.” SIAM Journal on Applied Dynamical Systems 15, no. 2 (January 2016): 952–80. https://doi.org/10.1137/15M1017491.

+ kwargs...)

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The option detailed controls the computation of a simplified version of the normal form. autodiff controls the use of ForwardDiff during the normal form computation.

The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type BogdanovTakens.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Haragus

    Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

  • AlHdaibat

    Al-Hdaibat, B., W. Govaerts, Yu. A. Kuznetsov, and H. G. E. Meijer. “Initialization of Homoclinic Solutions near Bogdanov–Takens Points: Lindstedt–Poincaré Compared with Regular Perturbation Method.” SIAM Journal on Applied Dynamical Systems 15, no. 2 (January 2016): 952–80. https://doi.org/10.1137/15M1017491.

diff --git a/dev/capabilities/index.html b/dev/capabilities/index.html index dafff7e1..1cdf5c42 100644 --- a/dev/capabilities/index.html +++ b/dev/capabilities/index.html @@ -1,2 +1,2 @@ -Overview of capabilities · Bifurcation Analysis in Julia

Overview of capabilities

Main features

  • Newton-Krylov solver with generic linear / eigen preconditioned solver. Idem for the arc-length continuation.
  • Newton-Krylov solver with nonlinear deflation and preconditioner. It can be used for branch switching for example. It is used for deflated continuation.
  • Continuation written as an iterator
  • Monitoring user functions along curves computed by continuation, see events
  • Continuation methods: PALC, Moore Penrose, Multiple, Polynomial, Deflated continuation, ANM, ...
  • Bifurcation points located with bisection
  • compatible with GPU
  • Detection of Branch, Fold, Hopf bifurcation points of stationary solutions and computation of their normal form.
  • Automatic branch switching at branch points (whatever the dimension of the kernel) to equilibria
  • Automatic computation of bifurcation diagrams of equilibria
  • Fold / Hopf continuation based on Minimally Augmented formulation, with Matrix Free / Sparse / Dense Jacobian.
  • Detection of all codim 2 bifurcations of equilibria and computation of the normal forms of Bogdanov-Takens, Bautin and Cusp
  • Branching from Bogdanov-Takens / Zero-Hopf / Hopf-Hopf points to Fold / Hopf curve
  • continuation of fixed points of maps
  • computation of normal form of Period-doubling and Neimark-Sacker bifurcations.

Note that you can combine most solvers, like use Deflation for Periodic orbit computation or Fold of periodic orbits family.

Custom state means, we can use something else than AbstractArray, for example your own struct.

FeaturesMatrix FreeCustom stateTutorialGPU
(Deflated) Krylov-NewtonYesYeslinkYes
Continuation PALC (Natural, Secant, Tangent, Polynomial)YesYesAllYes
Deflated ContinuationYesYeslinkYes
Bifurcation / Fold / Hopf point detectionYesYesAll / All / linkYes
Fold Point continuationYesYesPDE, PDE, ODEYes
Hopf Point continuationYesAbstractArrayODE
Branch point / Fold / Hopf normal formYesYesYes
Branch switching at Branch pointsYesAbstractArraylinkYes
Automatic bifurcation diagram computation of equilibriaYesAbstractArraylink
Bogdanov-Takens / Bautin / Cusp / Zero-Hopf / Hopf-Hopf point detectionYesYesODE
Bogdanov-Takens / Bautin / Cusp normal formsYesAbstractArrayODEYes
Branching from Bogdanov-Takens / Zero-Hopf / Hopf-Hopf to Fold / Hopf curveYesAbstractArrayODE
  • PO computation and continuation using parallel (Standard or Poincaré) Shooting, Finite Differences or Orthogonal Collocation (mesh adaptive).
  • Automatic branch switching from simple Hopf points to PO
  • Automatic branch switching from simple Period-Doubling points to PO
  • Assisted branch switching from simple Branch points to PO
  • Detection of Branch, Fold, Neimark-Sacker (NS), Period Doubling (PD) bifurcation points of PO.
  • Fold / PD / NS continuation based on Minimally Augmented formulation (for shooting and collocation). Trapezoid method only allows continuing Fold of PO.
  • Detection of all codim 2 bifurcations of PO (R1, R2, R3, R4, GPD, NS-NS, Chenciner, Fold-Flip, Fold-NS, PD-NS)
  • Computation of the normal forms of PD, NS (for shooting and collocation) using the method based on Poincaré return map or the Iooss normal form (more precise).
  • automatic branching from Bautin to curve of Fold of PO
  • automatic branching from Zero-Hopf to curve of NS of PO
  • automatic branching from Hopf-Hopf to curve of NS of PO

Legend for the table: Standard shooting (SS), Poincaré shooting (PS), Orthogonal collocation (OC), trapezoid (T).

FeaturesMethodMatrix FreeCustom stateTutorialGPU
Branch switching at Hopf pointsSS/PS/OC/TSee eachODE
Newton / continuationTYesAbstractVectorPDE, PDEYes
Newton / continuationOCAbstractVectorODE
Newton / continuationSSYesAbstractArrayODEYes
Newton / continuationPSYesAbstractArrayPDEYes
Fold, Neimark-Sacker, Period doubling detectionSS/PS/OC/TSee eachAbstractVectorlink
Branch switching at Branch pointSS/PS/OC/TSee eachODE
Branch switching at PD pointSS/PS/OC/TSee eachODE
Continuation of Fold pointsSS/PS/OC/TSee eachAbstractVectorODE PDEYes
Continuation of Period-doubling pointsSS/OCAbstractVectorODE
Continuation of Neimark-Sacker pointsSS/OCAbstractVectorODE
detection of codim 2 bifurcations of periodic orbitsSS/OCAbstractVectorODE
Branch switching at Bautin point to curve of Fold of periodic orbitsSS/OCAbstractVectorODE
Branch switching at ZH/HH point to curve of NS of periodic orbitsSS/OCAbstractVectorODE

This is available through the plugin HclinicBifurcationKit.jl. Please see the specific docs for more information.

  • compute Homoclinic to Hyperbolic Saddle Orbits (HomHS) using Orthogonal collocation or Standard shooting
  • compute bifurcation of HomHS
  • start HomHS from a direct simulation
  • automatic branch switching to HomHS from Bogdanov-Takes bifurcation point
+Overview of capabilities · Bifurcation Analysis in Julia

Overview of capabilities

Main features

  • Newton-Krylov solver with generic linear / eigen preconditioned solver. Idem for the arc-length continuation.
  • Newton-Krylov solver with nonlinear deflation and preconditioner. It can be used for branch switching for example. It is used for deflated continuation.
  • Continuation written as an iterator
  • Monitoring user functions along curves computed by continuation, see events
  • Continuation methods: PALC, Moore Penrose, Multiple, Polynomial, Deflated continuation, ANM, ...
  • Bifurcation points located with bisection
  • compatible with GPU
  • Detection of Branch, Fold, Hopf bifurcation points of stationary solutions and computation of their normal form.
  • Automatic branch switching at branch points (whatever the dimension of the kernel) to equilibria
  • Automatic computation of bifurcation diagrams of equilibria
  • Fold / Hopf continuation based on Minimally Augmented formulation, with Matrix Free / Sparse / Dense Jacobian.
  • Detection of all codim 2 bifurcations of equilibria and computation of the normal forms of Bogdanov-Takens, Bautin and Cusp
  • Branching from Bogdanov-Takens / Zero-Hopf / Hopf-Hopf points to Fold / Hopf curve
  • continuation of fixed points of maps
  • computation of normal form of Period-doubling and Neimark-Sacker bifurcations.

Note that you can combine most solvers, like use Deflation for Periodic orbit computation or Fold of periodic orbits family.

Custom state means, we can use something else than AbstractArray, for example your own struct.

FeaturesMatrix FreeCustom stateTutorialGPU
(Deflated) Krylov-NewtonYesYeslinkYes
Continuation PALC (Natural, Secant, Tangent, Polynomial)YesYesAllYes
Deflated ContinuationYesYeslinkYes
Bifurcation / Fold / Hopf point detectionYesYesAll / All / linkYes
Fold Point continuationYesYesPDE, PDE, ODEYes
Hopf Point continuationYesAbstractArrayODE
Branch point / Fold / Hopf normal formYesYesYes
Branch switching at Branch pointsYesAbstractArraylinkYes
Automatic bifurcation diagram computation of equilibriaYesAbstractArraylink
Bogdanov-Takens / Bautin / Cusp / Zero-Hopf / Hopf-Hopf point detectionYesYesODE
Bogdanov-Takens / Bautin / Cusp normal formsYesAbstractArrayODEYes
Branching from Bogdanov-Takens / Zero-Hopf / Hopf-Hopf to Fold / Hopf curveYesAbstractArrayODE
  • PO computation and continuation using parallel (Standard or Poincaré) Shooting, Finite Differences or Orthogonal Collocation (mesh adaptive).
  • Automatic branch switching from simple Hopf points to PO
  • Automatic branch switching from simple Period-Doubling points to PO
  • Assisted branch switching from simple Branch points to PO
  • Detection of Branch, Fold, Neimark-Sacker (NS), Period Doubling (PD) bifurcation points of PO.
  • Fold / PD / NS continuation based on Minimally Augmented formulation (for shooting and collocation). Trapezoid method only allows continuing Fold of PO.
  • Detection of all codim 2 bifurcations of PO (R1, R2, R3, R4, GPD, NS-NS, Chenciner, Fold-Flip, Fold-NS, PD-NS)
  • Computation of the normal forms of PD, NS (for shooting and collocation) using the method based on Poincaré return map or the Iooss normal form (more precise).
  • automatic branching from Bautin to curve of Fold of PO
  • automatic branching from Zero-Hopf to curve of NS of PO
  • automatic branching from Hopf-Hopf to curve of NS of PO

Legend for the table: Standard shooting (SS), Poincaré shooting (PS), Orthogonal collocation (OC), trapezoid (T).

FeaturesMethodMatrix FreeCustom stateTutorialGPU
Branch switching at Hopf pointsSS/PS/OC/TSee eachODE
Newton / continuationTYesAbstractVectorPDE, PDEYes
Newton / continuationOCAbstractVectorODE
Newton / continuationSSYesAbstractArrayODEYes
Newton / continuationPSYesAbstractArrayPDEYes
Fold, Neimark-Sacker, Period doubling detectionSS/PS/OC/TSee eachAbstractVectorlink
Branch switching at Branch pointSS/PS/OC/TSee eachODE
Branch switching at PD pointSS/PS/OC/TSee eachODE
Continuation of Fold pointsSS/PS/OC/TSee eachAbstractVectorODE PDEYes
Continuation of Period-doubling pointsSS/OCAbstractVectorODE
Continuation of Neimark-Sacker pointsSS/OCAbstractVectorODE
detection of codim 2 bifurcations of periodic orbitsSS/OCAbstractVectorODE
Branch switching at Bautin point to curve of Fold of periodic orbitsSS/OCAbstractVectorODE
Branch switching at ZH/HH point to curve of NS of periodic orbitsSS/OCAbstractVectorODE

This is available through the plugin HclinicBifurcationKit.jl. Please see the specific docs for more information.

  • compute Homoclinic to Hyperbolic Saddle Orbits (HomHS) using Orthogonal collocation or Standard shooting
  • compute bifurcation of HomHS
  • start HomHS from a direct simulation
  • automatic branch switching to HomHS from Bogdanov-Takes bifurcation point
diff --git a/dev/codim2Continuation/index.html b/dev/codim2Continuation/index.html index dd6ca052..c64a9011 100644 --- a/dev/codim2Continuation/index.html +++ b/dev/codim2Continuation/index.html @@ -80,4 +80,4 @@ \partial_{u}F & \partial_pF & 0 \\ \partial_x\sigma_r & \partial_p\sigma_r & \partial_\omega\sigma_r\\ \partial_x\sigma_i & \partial_p\sigma_i & \partial_\omega\sigma_i -\end{array}\right]\]

using a similar formula for $\partial\sigma$ as in the Fold case.

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

  • Blank

    Blank, H. J. de, Yu. A. Kuznetsov, M. J. Pekkér, and D. W. M. Veldman. “Degenerate Bogdanov–Takens Bifurcations in a One-Dimensional Transport Model of a Fusion Plasma.” Physica D: Nonlinear Phenomena 331 (September 15, 2016): 13–26. https://doi.org/10.1016/j.physd.2016.05.008.

  • Bindel

    Bindel, D., M. Friedman, W. Govaerts, J. Hughes, and Yu.A. Kuznetsov. “Numerical Computation of Bifurcations in Large Equilibrium Systems in Matlab.” Journal of Computational and Applied Mathematics 261 (May 2014): 232–48. https://doi.org/10.1016/j.cam.2013.10.034.

+\end{array}\right]\]

using a similar formula for $\partial\sigma$ as in the Fold case.

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

  • Blank

    Blank, H. J. de, Yu. A. Kuznetsov, M. J. Pekkér, and D. W. M. Veldman. “Degenerate Bogdanov–Takens Bifurcations in a One-Dimensional Transport Model of a Fusion Plasma.” Physica D: Nonlinear Phenomena 331 (September 15, 2016): 13–26. https://doi.org/10.1016/j.physd.2016.05.008.

  • Bindel

    Bindel, D., M. Friedman, W. Govaerts, J. Hughes, and Yu.A. Kuznetsov. “Numerical Computation of Bifurcations in Large Equilibrium Systems in Matlab.” Journal of Computational and Applied Mathematics 261 (May 2014): 232–48. https://doi.org/10.1016/j.cam.2013.10.034.

diff --git a/dev/codim3Continuation/index.html b/dev/codim3Continuation/index.html index 8942dff3..7ddeeb39 100644 --- a/dev/codim3Continuation/index.html +++ b/dev/codim3Continuation/index.html @@ -71,4 +71,4 @@ bdlinsolver_adjoint, kwargs... ) -

This function turns an initial guess for a Bogdanov-Takens point into a solution to the Bogdanov-Takens problem based on a Minimally Augmented formulation.

Arguments

  • br results returned after a call to continuation
  • ind_bif bifurcation index in br

Optional arguments:

  • options::NewtonPar, default value br.contparams.newton_options
  • normN = norm
  • options You can pass newton parameters different from the ones stored in br by using this argument options.
  • jacobian_ma::Symbol = true specify the way the (newton) linear system is solved. Can be (:autodiff, :finitedifferences, :minaug)
  • bdlinsolver bordered linear solver for the constraint equation
  • start_with_eigen = false whether to start the Minimally Augmented problem with information from eigen elements.
  • kwargs keywords arguments to be passed to the regular Newton-Krylov solver
ODE problems

For ODE problems, it is more efficient to pass the option jacobian = :autodiff

start_with_eigen

For ODE problems, it is more efficient to pass the option start_with_eigen = true

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

  • Blank

    Blank, H. J. de, Yu. A. Kuznetsov, M. J. Pekkér, and D. W. M. Veldman. “Degenerate Bogdanov–Takens Bifurcations in a One-Dimensional Transport Model of a Fusion Plasma.” Physica D: Nonlinear Phenomena 331 (September 15, 2016): 13–26. https://doi.org/10.1016/j.physd.2016.05.008.

  • Bindel

    Bindel, D., M. Friedman, W. Govaerts, J. Hughes, and Yu.A. Kuznetsov. “Numerical Computation of Bifurcations in Large Equilibrium Systems in Matlab.” Journal of Computational and Applied Mathematics 261 (May 2014): 232–48. https://doi.org/10.1016/j.cam.2013.10.034.

+

This function turns an initial guess for a Bogdanov-Takens point into a solution to the Bogdanov-Takens problem based on a Minimally Augmented formulation.

Arguments

  • br results returned after a call to continuation
  • ind_bif bifurcation index in br

Optional arguments:

  • options::NewtonPar, default value br.contparams.newton_options
  • normN = norm
  • options You can pass newton parameters different from the ones stored in br by using this argument options.
  • jacobian_ma::Symbol = true specify the way the (newton) linear system is solved. Can be (:autodiff, :finitedifferences, :minaug)
  • bdlinsolver bordered linear solver for the constraint equation
  • start_with_eigen = false whether to start the Minimally Augmented problem with information from eigen elements.
  • kwargs keywords arguments to be passed to the regular Newton-Krylov solver
ODE problems

For ODE problems, it is more efficient to pass the option jacobian = :autodiff

start_with_eigen

For ODE problems, it is more efficient to pass the option start_with_eigen = true

References

  • Govaerts

    Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

  • Blank

    Blank, H. J. de, Yu. A. Kuznetsov, M. J. Pekkér, and D. W. M. Veldman. “Degenerate Bogdanov–Takens Bifurcations in a One-Dimensional Transport Model of a Fusion Plasma.” Physica D: Nonlinear Phenomena 331 (September 15, 2016): 13–26. https://doi.org/10.1016/j.physd.2016.05.008.

  • Bindel

    Bindel, D., M. Friedman, W. Govaerts, J. Hughes, and Yu.A. Kuznetsov. “Numerical Computation of Bifurcations in Large Equilibrium Systems in Matlab.” Journal of Computational and Applied Mathematics 261 (May 2014): 232–48. https://doi.org/10.1016/j.cam.2013.10.034.

diff --git a/dev/constrainedproblem/index.html b/dev/constrainedproblem/index.html index dcd4c7f6..9412e2b5 100644 --- a/dev/constrainedproblem/index.html +++ b/dev/constrainedproblem/index.html @@ -7,4 +7,4 @@ \begin{array}{l} F(x) + p\cdot T\cdot x=0 \\ \langle T\cdot x_{ref},x-x_{ref}\rangle=0 -\end{array}\right.\]

where $T$ is a generator of the Lie algebra associated to $G$ and $x_{ref}$ is a reference solution. This is known as the freezing method.

Reference

See Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation. for more information on the freezing method.

+\end{array}\right.\]

where $T$ is a generator of the Lie algebra associated to $G$ and $x_{ref}$ is a reference solution. This is known as the freezing method.

Reference

See Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation. for more information on the freezing method.

diff --git a/dev/cusp/index.html b/dev/cusp/index.html index be4f298f..057776d3 100644 --- a/dev/cusp/index.html +++ b/dev/cusp/index.html @@ -2,4 +2,4 @@ Cusp · Bifurcation Analysis in Julia

Normal form of the Cusp bifurcation

We follow the paper[Kuznetsov] and consider a Cauchy problem

\[\dot x=\mathbf F(x,p).\]

We denote by $\mathbf L$ the jacobian of $\mathbf F$ at the bifurcation point $(x_0,p_0)$. We choose a basis such that:

\[\mathbf L q=0, \quad \mathbf L^{T} p=0, \quad \langle p, q\rangle=1.\]

Under some conditions, $x(t)\approx x_0+ w(t)q$ where $w$ satisfies the normal form:

\[\dot{w}=c w^{3}+O\left(w^{4}\right).\tag{E}\]

Normal form computation

The normal form (E) can be automatically computed as follows

get_normal_form(br::ContResult, ind_bif::Int ; 
     ζs = nothing,
     lens = getlens(br)
-    )

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type Cusp.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

+ )

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type Cusp.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

diff --git a/dev/deflatedproblem/index.html b/dev/deflatedproblem/index.html index d1f296fb..612c7210 100644 --- a/dev/deflatedproblem/index.html +++ b/dev/deflatedproblem/index.html @@ -12,4 +12,4 @@ prob = BifurcationProblem(F, rand(1), nothing) # call deflated newton sol = newton(prob, deflationOp, NewtonPar()) -println("We found the additional root: ", sol.u)
We found the additional root: [1.999999999999999]
Tip

You can use this method for periodic orbits as well by passing the deflation operator M to the newton method

+println("We found the additional root: ", sol.u)
We found the additional root: [2.0]
Tip

You can use this method for periodic orbits as well by passing the deflation operator M to the newton method

diff --git a/dev/detectionBifurcation/index.html b/dev/detectionBifurcation/index.html index c6206dbc..8ffc07c8 100644 --- a/dev/detectionBifurcation/index.html +++ b/dev/detectionBifurcation/index.html @@ -1,2 +1,2 @@ -Bifurcation detection (1 param) · Bifurcation Analysis in Julia

Detection of bifurcation points of Equilibria

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

The bifurcation points are located by looking at the spectrum e.g. by monitoring the unstable eigenvalues. The eigenvalue λ is declared unstable if real(λ) > contParams.tol_stability. The located bifurcation points are then returned in br.specialpoint.

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

If this is still not enough, you can use a Newton solver to locate them very precisely. See Fold / Hopf Continuation.

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.

Large scale computations

The user must specify the number of eigenvalues to be computed (like nev = 10) in the parameters ::ContinuationPar passed to continuation. Note that nev is automatically incremented whenever a bifurcation point is detected [1]. Also, there is an option in ::ContinuationPar to save (or not) the eigenvectors. This can be useful in memory limited environments (like on GPUs).

List of detected bifurcation points

Bifurcationindex used
Foldfold
Hopfhopf
Bifurcation point (single eigenvalue stability change, Fold or branch point)bp
Not documentednd

Eigensolver

The user must provide an eigensolver by setting NewtonOptions.eigsolver where newton_options is located in the parameter ::ContinuationPar passed to continuation. See NewtonPar and ContinuationPar for more information on the composite type of the options passed to newton and continuation.

The eigensolver is highly problem dependent and this is why the user should implement / parametrize its own eigensolver through the abstract type AbstractEigenSolver or select one among List of implemented eigen solvers.

Generic bifurcation

By this we mean a change in the dimension of the Jacobian kernel. The detection of Branch point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation.

Fold bifurcation

The detection of Fold point is done by monitoring the monotonicity of the parameter.

The detection is triggered by setting detect_fold = true in the parameter ::ContinuationPar passed to continuation. When a Fold is detected on a branch br, a point is added to br.foldpoint allowing for later refinement using the function newton_fold.

Hopf bifurcation

The detection of Hopf point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Hopf point is detected, a point is added to br.specialpoint allowing for later refinement using the function newton_hopf.

  • 1In this case, the Krylov dimension is not increased because the eigensolver could be a direct solver. You might want to increase this dimension using the callbacks in continuation.
+Bifurcation detection (1 param) · Bifurcation Analysis in Julia

Detection of bifurcation points of Equilibria

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

The bifurcation points are located by looking at the spectrum e.g. by monitoring the unstable eigenvalues. The eigenvalue λ is declared unstable if real(λ) > contParams.tol_stability. The located bifurcation points are then returned in br.specialpoint.

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

If this is still not enough, you can use a Newton solver to locate them very precisely. See Fold / Hopf Continuation.

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.

Large scale computations

The user must specify the number of eigenvalues to be computed (like nev = 10) in the parameters ::ContinuationPar passed to continuation. Note that nev is automatically incremented whenever a bifurcation point is detected [1]. Also, there is an option in ::ContinuationPar to save (or not) the eigenvectors. This can be useful in memory limited environments (like on GPUs).

List of detected bifurcation points

Bifurcationindex used
Foldfold
Hopfhopf
Bifurcation point (single eigenvalue stability change, Fold or branch point)bp
Not documentednd

Eigensolver

The user must provide an eigensolver by setting NewtonOptions.eigsolver where newton_options is located in the parameter ::ContinuationPar passed to continuation. See NewtonPar and ContinuationPar for more information on the composite type of the options passed to newton and continuation.

The eigensolver is highly problem dependent and this is why the user should implement / parametrize its own eigensolver through the abstract type AbstractEigenSolver or select one among List of implemented eigen solvers.

Generic bifurcation

By this we mean a change in the dimension of the Jacobian kernel. The detection of Branch point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation.

Fold bifurcation

The detection of Fold point is done by monitoring the monotonicity of the parameter.

The detection is triggered by setting detect_fold = true in the parameter ::ContinuationPar passed to continuation. When a Fold is detected on a branch br, a point is added to br.foldpoint allowing for later refinement using the function newton_fold.

Hopf bifurcation

The detection of Hopf point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Hopf point is detected, a point is added to br.specialpoint allowing for later refinement using the function newton_hopf.

  • 1In this case, the Krylov dimension is not increased because the eigensolver could be a direct solver. You might want to increase this dimension using the callbacks in continuation.
diff --git a/dev/detectionBifurcationPO/index.html b/dev/detectionBifurcationPO/index.html index 084e3ac3..64a615af 100644 --- a/dev/detectionBifurcationPO/index.html +++ b/dev/detectionBifurcationPO/index.html @@ -1,2 +1,2 @@ -Bifurcation detection (1 param) · Bifurcation Analysis in Julia

Detection of bifurcation points of periodic orbits

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

The bifurcation points are located by looking at the spectrum e.g. by monitoring the unstable eigenvalues. The Floquet exponent λ is declared unstable if real(λ) > contParams.tol_stability. The located bifurcation points are then returned in br.specialpoint.

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 Floquet exponent 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.

Large scale computations

The user must specify the number of eigenvalues to be computed (like nev = 10) in the parameters ::ContinuationPar passed to continuation. Note that nev is automatically incremented whenever a bifurcation point is detected [1]. Also, there is an option in ::ContinuationPar to save (or not) the eigenvectors. This can be useful in memory limited environments (like on GPUs).

List of detected bifurcation points

Bifurcationindex used
Bifurcation point (single eigenvalue stability change, Fold or branch point)bp
Neimark-Sackerns
Period doublingpd
Not documentednd

Eigensolver

The user must provide an eigensolver by setting NewtonOptions.eigsolver where newton_options is located in the parameter ::ContinuationPar passed to continuation. See NewtonPar and ContinuationPar for more information on the composite type of the options passed to newton and continuation.

The eigensolver is highly problem dependent and this is why the user should implement / parametrize its own eigensolver through the abstract type AbstractEigenSolver or select one among List of implemented eigen solvers.

Floquet multipliers computation

The computation of Floquet multipliers is necessary for the detection of bifurcations of periodic orbits (which is done by analyzing the Floquet exponents obtained from the Floquet multipliers). Hence, the eigensolver needs to compute the eigenvalues with largest modulus (and not with largest real part which is their default behavior). This can be done by changing the option which = :LM of the eigensolver. Nevertheless, note that for most implemented eigensolvers in BifurcationKit, the proper option is automatically set.

Generic bifurcation

By this we mean a change in the dimension of the Jacobian kernel. The detection of Branch point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation.

Fold bifurcation

The detection of Fold point is done by monitoring the monotonicity of the parameter.

The detection is triggered by setting detect_fold = true in the parameter ::ContinuationPar passed to continuation. When a Fold is detected on a branch br, a point is added to br.foldpoint allowing for later refinement using the function newton_fold.

Neimark-Sacker bifurcation

The detection of Neimark-Sacker point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Neimark-Sacker point is detected, a point is added to br.specialpoint.

Period-doubling bifurcation

The detection of Period-doubling point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Period-doubling point is detected, a point is added to br.specialpoint.

  • 1In this case, the Krylov dimension is not increased because the eigensolver could be a direct solver. You might want to increase this dimension using the callbacks in continuation.
+Bifurcation detection (1 param) · Bifurcation Analysis in Julia

Detection of bifurcation points of periodic orbits

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

The bifurcation points are located by looking at the spectrum e.g. by monitoring the unstable eigenvalues. The Floquet exponent λ is declared unstable if real(λ) > contParams.tol_stability. The located bifurcation points are then returned in br.specialpoint.

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 Floquet exponent 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.

Large scale computations

The user must specify the number of eigenvalues to be computed (like nev = 10) in the parameters ::ContinuationPar passed to continuation. Note that nev is automatically incremented whenever a bifurcation point is detected [1]. Also, there is an option in ::ContinuationPar to save (or not) the eigenvectors. This can be useful in memory limited environments (like on GPUs).

List of detected bifurcation points

Bifurcationindex used
Bifurcation point (single eigenvalue stability change, Fold or branch point)bp
Neimark-Sackerns
Period doublingpd
Not documentednd

Eigensolver

The user must provide an eigensolver by setting NewtonOptions.eigsolver where newton_options is located in the parameter ::ContinuationPar passed to continuation. See NewtonPar and ContinuationPar for more information on the composite type of the options passed to newton and continuation.

The eigensolver is highly problem dependent and this is why the user should implement / parametrize its own eigensolver through the abstract type AbstractEigenSolver or select one among List of implemented eigen solvers.

Floquet multipliers computation

The computation of Floquet multipliers is necessary for the detection of bifurcations of periodic orbits (which is done by analyzing the Floquet exponents obtained from the Floquet multipliers). Hence, the eigensolver needs to compute the eigenvalues with largest modulus (and not with largest real part which is their default behavior). This can be done by changing the option which = :LM of the eigensolver. Nevertheless, note that for most implemented eigensolvers in BifurcationKit, the proper option is automatically set.

Generic bifurcation

By this we mean a change in the dimension of the Jacobian kernel. The detection of Branch point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation.

Fold bifurcation

The detection of Fold point is done by monitoring the monotonicity of the parameter.

The detection is triggered by setting detect_fold = true in the parameter ::ContinuationPar passed to continuation. When a Fold is detected on a branch br, a point is added to br.foldpoint allowing for later refinement using the function newton_fold.

Neimark-Sacker bifurcation

The detection of Neimark-Sacker point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Neimark-Sacker point is detected, a point is added to br.specialpoint.

Period-doubling bifurcation

The detection of Period-doubling point is done by analysis of the spectrum of the Jacobian.

The detection is triggered by setting detect_bifurcation > 1 in the parameter ::ContinuationPar passed to continuation. When a Period-doubling point is detected, a point is added to br.specialpoint.

  • 1In this case, the Krylov dimension is not increased because the eigensolver could be a direct solver. You might want to increase this dimension using the callbacks in continuation.
diff --git a/dev/diffeq/index.html b/dev/diffeq/index.html index a60a4f01..ed6fa685 100644 --- a/dev/diffeq/index.html +++ b/dev/diffeq/index.html @@ -1,2 +1,2 @@ -DiffEq wrapper · Bifurcation Analysis in Julia

Wrapper to the package DifferentialEquations.jl

Warning

This is work in progress.

The current package will provide basic methods to wrap some of the functionality of DifferentialEquations.jl.

Basically, the ultimate idea is that you provide a prob::ODEProblem to our newton, continuation... and they will use the expression of the jacobians, the linear solvers... that you already provided for the construction of prob.

+DiffEq wrapper · Bifurcation Analysis in Julia

Wrapper to the package DifferentialEquations.jl

Warning

This is work in progress.

The current package will provide basic methods to wrap some of the functionality of DifferentialEquations.jl.

Basically, the ultimate idea is that you provide a prob::ODEProblem to our newton, continuation... and they will use the expression of the jacobians, the linear solvers... that you already provided for the construction of prob.

diff --git a/dev/educational/index.html b/dev/educational/index.html index 090f6511..369e6009 100644 --- a/dev/educational/index.html +++ b/dev/educational/index.html @@ -105,244 +105,244 @@ p = scatter(ps, [x[1] for x in xs]; color = colors, markerstrokecolor = colors, xlabel = "p", ylabel = "x", label = "") - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/dev/eigensolver/index.html b/dev/eigensolver/index.html index e61230ae..e388654d 100644 --- a/dev/eigensolver/index.html +++ b/dev/eigensolver/index.html @@ -8,4 +8,4 @@ nev2 = min(nev, length(I)) return F.values[I[1:nev2]], F.vectors[:, I[1:nev2]], true, 1 end
Eigenvalues

The eigenvalues must be ordered by increasing real part for the detection of bifurcations to work properly.

Eigenvectors

You have to implement the method geteigenvector(eigsolver, eigenvectors, i::Int) for newtonHopf to work properly.

Methods for computing eigenvalues

Like for the linear solvers, computing the spectrum of operators $A$ associated to PDE is a highly non trivial task because of the clustering of eigenvalues. Most methods are based on the so-called power method but this only yields the eigenvalues with largest modulus. In case of the Laplacian operator, this can be disastrous and it is better to apply the power method to $(\sigma I-A)^{-1}$ instead.

This method, called Shift-invert, is readily available for the solvers EigArpack and EigArnoldiMethod, see below. It is mostly used to compute interior eigenvalues. For the solver EigKrylovKit, one must implement its own shift invert operator, using for example GMRESKrylovKit.

In some cases, it may be advantageous to consider the Cayley transform $(\sigma I-A)^{-1}(\tau I+A)$ to focus on a specific part of the spectrum. As it is mathematically equivalent to the Shift-invert method, we did not implement it.

List of implemented eigen solvers

  1. Default eigen Julia eigensolver for matrices. You can create it via eig = DefaultEig(). Note that you can also specify how the eigenvalues are ordered (by decreasing real part by default). You can then compute 3 eigenelements of J like eig(J, 3).
  2. Eigensolver from Arpack.jl. You can create one via eigsolver = EigArpack() and pass appropriate options (see Arpack.jl). For example, you can compute eigenvalues using Shift-Invert method with shift σ by using EigArpack(σ, :LR). Note that you can specify how the eigenvalues are ordered (by decreasing real part by default). Finally, this method can be used for (sparse) matrix or Matrix-Free formulation. For a matrix J, you can compute 3 eigen-elements using eig(J, 3). In the case of a Matrix-Free jacobian dx -> J(dx), you need to tell the eigensolver the dimension of the state space by giving an example of vector: eig = EigArpack(v0 = zeros(10)). You can then compute 3 eigen-elements using eig(dx -> J(dx), 3).
  3. Eigensolver from KrylovKit.jl. You create one via eig = EigKrylovKit() and pass appropriate options (see KrylovKit.jl). This method can be used for (sparse) matrix or Matrix-Free formulation. In the case of a matrix J, you can create a solver like this eig = EigKrylovKit(). Then, you compute 3 eigen-elements using eig(J, 3). In the case of a Matrix-Free jacobian dx -> J(dx), you need to tell the eigensolver the dimension of the state space by giving an example of vector: eig = EigKrylovKit(x₀ = zeros(10)). You can then compute 3 eigen-elements using eig(dx -> J(dx), 3).
  4. Eigensolver from ArnoldiMethod.jl. You can create one via eig = EigArnoldiMethod() and pass appropriate options (see ArnoldiMethod.jl). For example, you can compute eigenvalues using the Shift-Invert method with shift σ by using EigArnoldiMethod(σ, LR()). Note that you can also specify how the eigenvalues are ordered (by decreasing real part by default). In the case of a matrix J, you can create a solver like eig = EigArnoldiMethod(). Then, you compute 3 eigen-elements using eig(J, 3). In the case of a Matrix-Free jacobian dx -> J(dx), you need to tell the eigensolver the dimension of the state space by giving an example of vector: eig = EigArnoldiMethod(x₀ = zeros(10)). You can then compute 3 eigen-elements using eig(dx -> J(dx), 3).
Slow computations

This is probably due to iterative refinement conducted by SuiteSparse as explained in this blog post. You can disable this using

using SuiteSparse
-SuiteSparse.UMFPACK.umf_ctrl[8] = 0
+SuiteSparse.UMFPACK.umf_ctrl[8] = 0 diff --git a/dev/faq/index.html b/dev/faq/index.html index c00ba3a5..f16b41a6 100644 --- a/dev/faq/index.html +++ b/dev/faq/index.html @@ -20,4 +20,4 @@ out[3] = y - par.ω * x - y * x2 out end

Arpack is slow in computing eigenvalues

This is probably due to iterative refinement conducted by SuiteSparse as explained in this blog post. You can disable this using

using SuiteSparse
-SuiteSparse.UMFPACK.umf_ctrl[8] = 0

Should I use CVODE_BDF?

SciML is now able to match the performance of the Sundials solver CVODE_BDF. Check the news for more information.

+SuiteSparse.UMFPACK.umf_ctrl[8] = 0

Should I use CVODE_BDF?

SciML is now able to match the performance of the Sundials solver CVODE_BDF. Check the news for more information.

diff --git a/dev/gettingstarted/index.html b/dev/gettingstarted/index.html index a3ac29a6..276d1dc4 100644 --- a/dev/gettingstarted/index.html +++ b/dev/gettingstarted/index.html @@ -8,104 +8,104 @@ plot(br) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

where the pieces are described below.

Step 1: Defining a Problem

To solve this numerically, we define a problem type by giving it the equation, the initial condition, the parameters and the parameter axis to solve over:

using BifurcationKit
 F(x, p) = @. p.μ + x - x^3/3
 prob = BifurcationProblem(F, [-2.], (μ = -1.,), (@lens _.μ);
@@ -119,284 +119,284 @@
 scene = plot(br)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Choosing a continuation Algorithm

BifurcationKit.jl offers a much wider variety of continuation algorithms than traditional continuation softwares. Many of these algorithms are from recent research and have their own strengths and weaknesses. Each algoritm comes with a doc string, for example:

? PALC

For example, you can chose a different tangent predictor in PALC

opts = ContinuationPar(p_min = -1., p_max = 1.)
 br = continuation(prob, PALC(tangent = Bordered()), opts)
 scene = plot(br)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

or you can use the Moore-Penrose continuation algorithm

opts = ContinuationPar(p_min = -1., p_max = 1.)
 br = continuation(prob, MoorePenrose(), opts)
 scene = plot(br)
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Step 3: Analyzing the Solution

The result of continuation is a solution object. A summary of the result is provided by the show method:

show(br) # this is equivalent to the REPL julia> br
 ┌─ Curve type: EquilibriumCont
  ├─ Number of points: 55
  ├─ Type of vectors: Vector{Float64}
@@ -415,105 +415,105 @@ 

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

Example 2: simple branching

In this example, we will solve the equation

\[0 = x\cdot(\mu-x)\]

as function of $\mu$. Here $u\in\mathbb R$ is the state variable and $\mu$ is our parameter.

In our example, we know by calculus that the solutions to this equation are $u_0(\mu)=0$ and $u_1(\mu)=\mu$ but we will use BifurcationKit.jl to solve this problem numerically, which is essential for problems where a symbolic solution is not known.

In case we know there are many branches, the best is to use an automatic method to compute them all. We will focus on bifurcationdiagram which computes the connected component of the initial guess in the plane $(x,\mu)$. An alternative is to use Deflated Continuation.

We define a problem type by giving it the equation, the initial condition, the parameters and the parameter axis to solve over:

using Plots
 using BifurcationKit
 
@@ -560,75 +560,75 @@ 

plot(diagram)

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

Example 3: continuing periodic orbits

In this example, we will compute periodic orbits of the Stuart-Landau oscillator:

\[\begin{aligned} \frac{du}{dt} &= r u - \nu v - (u^2+v^2) (c_3 u - \mu v) \\ \frac{dv}{dt} &= r v + \nu u - (u^2+v^2) (c_3 + \mu u). @@ -679,316 +679,316 @@

Example 3: conti

Analyzing the Solution

The branch of periodic orbits has been computed. You can look at what is recorded in the first point on the branch:

br_po[1]
(max = 0.06359613398726469, min = -0.06359613398726469, amplitude = 0.12719226797452937, period = 6.2831853071795924, param = 0.00404446825657828, itnewton = 0, itlinear = 0, ds = 0.01, n_unstable = 0, n_imag = 0, stable = true, step = 0, eigenvals = ComplexF64[-9.731992989306553e-12 + 0.0im, -0.05082428707935688 + 0.0im], eigenvecs = ComplexF64[1.0081869231557963e-14 + 0.0im -1.0 + 0.0im; -1.0 + 0.0im 1.120207692395329e-14 + 0.0im])

It shows that the maximum/minimum/amplitude/period of the periodic orbit are recorded by default. You can also plot all the branches as follows

plot(br, br_po, branchlabel = ["equilibria", "periodic orbits"])
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Finally, if you are interested in the periodic orbits saved in br_po, for example to plot it, the method get_periodic_orbit is what you are looking for:

sol = get_periodic_orbit(br_po, 10)
 plot(sol.t, sol[1,:], label = "u", xlabel = "time")
 plot!(sol.t, sol[2,:], label = "v", xlabel = "time")
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Plotting the periodic orbit during continuation

If you plot the solution during continuation, you see that the right bottom panel is empty ; this panel is used to plot the solution at the current continuation step:

br_po = continuation(br, 2, opts,
         PeriodicOrbitOCollProblem(20, 5);
         plot = true,
         )
- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

(Note that the bottom panel is a plot of the eigenvalues of the jacobian in the complex plane at the current continuation step. )

In order to plot the periodic solution during continuation, you need to supply a periodic_solution to continuation. This is not done by default because in some cases, obtaining the solution is costly (e.g. for Shooting methods). Based on the previous paragraph, it is straightforward to implement this plotting function:

br_po = continuation(br, 2, opts,
         PeriodicOrbitOCollProblem(20, 5);
@@ -1003,173 +1003,173 @@ 

- + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/dev/guidelines/index.html b/dev/guidelines/index.html index 73f52f71..742e6454 100644 --- a/dev/guidelines/index.html +++ b/dev/guidelines/index.html @@ -1,2 +1,2 @@ -Guidelines · Bifurcation Analysis in Julia

Guidelines

The goal of this package is to find solutions $x$ to nonlinear equations

\[F(x,p) = 0 \quad\tag{E}\]

in large dimensions as function of a real parameter $p$. We want to be able to do so on GPU, distributed systems...

The core of the package is built around a Newton-Krylov solver (see newton) which allows to solve equations of the form $F(x)=0$, or find a solution $x_0$ to (E) for a particular $p_0$.

Once such a solution (or several) $(x_0,p_0)$ is known, we can continue it by computing a 1d curve of solutions $\gamma = (x(s),p(s))_{s\in I}$ passing through $(x_0,p_0)$ (see continuation and Deflated Continuation).

In practice, you don't need to know exactly $(x_0,p_0)$ to compute $\gamma$. Indeed, continuation will call newton to refine any initial guess that you pass.

Textbook

Only the basics of bifurcation theory is underlined here. We refer to [Kuznetsov],[haragus] for a more thorough description.

Bifurcation analysis of Equilibria

We can detect if the curve of solutions $\gamma$ crosses another curve of solutions $\gamma^{bif}$ without knowing $\gamma^{bif}$! The intersection point $(x^b,p^b)\in\gamma$ is called a bifurcation point and is such that $\partial_xF(x^b,p^b)$ is non invertible. When calling γ = continuation(...) with the option detect_bifurcation > 1 inside ContinuationPar, the bifurcation points are automatically detected and stored in γ.specialpoints.

Eigenvalues

The rightmost eigenvalues are computed by default to detect bifurcations. Hence, the number of eigenvalues with positive real parts must be finite (e.g. small). This might require to consider $-F(x,p)=0$ instead of (E).

Branch switching

In the simple case where $dim\ker \partial_xF(x^b,p^b) = 1$, we can compute automatically the bifurcated branch $\gamma^{bif}$ by calling continuation and passing $\gamma$. This is explained in Branch switching from simple branch point to equilibria. Recursively, we can compute the curves of solutions which are connected to $(x_0,p_0)$, this is called a bifurcation diagram. This bifurcation diagram can be automatically computed using the function bifurcationdiagram with minimum input from the user. More information is provided in Automatic Bifurcation diagram computation and examples of use are 1d Swift-Hohenberg equation and Bratu–Gelfand problem.

When $d\equiv dim\ker \partial_xF(x^b,p^b) > 1$, you can still compute automatically the bifurcated branches $\gamma^{bif}$s by calling continuation. It is based on a reduction of (E) to a small system of $d$ dimensional multivariate polynomial equations in $d$ unknowns whose solutions give the local topology of branches in the neighborhood of the bifurcation point $(x^b, p^b)$. The solutions of this reduced equation are then used as initial guesses for the call to Krylov-Newton. This is explained in From simple branch point to equilibria and examples of use are shown in 2d Bratu–Gelfand problem and Automatic 2d Bratu–Gelfand problem (Intermediate).

In the case $d=1$, the reduced equation can be further simplified into a normal form. This is also automatically computed by the package.

Branch switching

Many more branch switching procedures are available. They are all listed in Branch switching

Bifurcation analysis of Cauchy problems

The goal of this section is to study the dynamics of the Cauchy problem

\[\frac{d}{dt}x - F(x,p) = 0. \quad\tag{C}\]

The equilibria are time independent solutions of (C) hence satisfying (E). The previous section can be applied to compute curves of equilibria. However, we can do more. By discretizing time, we can recast (C) in the general form (E) and look for time dependent solutions as well.

We can detect the existence of periodic solutions close to $\gamma$. This is done automatically and those bifurcation points are stored in γ.specialpoint as well with the name of Hopf bifurcation points.

Branch switching at Hopf points

We focus on computing the branch of periodic solutions branching from a Hopf point. This is done automatically by calling continuation, passing $\gamma$ and choosing a time discretization algorithm (see Periodic orbits computation). Some details about this branch switching are given in From Hopf point to periodic orbits.

Branch switching at bifurcation points of periodic orbits

Let us consider the case where a branch of periodic orbits $\gamma^{po}$ have been computed (see for example previous section) and several bifurcation points have been detected (branch point, period doubling and Neimark Sacker). Can we compute bifurcated branches from $\gamma^{po}$? Automatically?

We do not provide an automatic branch switching for those points and for all methods (Shooting, Finite differences). However, for branch points of periodic orbits, you can call continuation by passing $\gamma^{po}$ and some simple arguments (amplitude of the periodic orbits) to perform branch switching in a semi-automatic way. For the case of Periodic orbits based on Trapezoidal rule, see From Branch / Period-doubling point of curve of periodic orbits.

Branch switching

Many more branch switching procedures are available. They are all listed in Branch switching

Manual Branch switching

You can perform manual branch switching by computing the nearby solutions close to a bifurcation point using a deflated newton (see Deflated problems), which provides a way to compute solutions other than a set of already known solutions. You can then use these solutions to compute branches by calling continuation. Many, if not all tutorials give example of doing so like 2d Bratu–Gelfand problem or 1d Brusselator.

References

  • Kuznetsov

    Kuznetsov, Yuri A. Elements of Applied Bifurcation Theory. Vol. 112. Applied Mathematical Sciences. Cham: Springer International Publishing, 2023. https://doi.org/10.1007/978-3-031-22007-4.

  • haragus

    Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

+Guidelines · Bifurcation Analysis in Julia

Guidelines

The goal of this package is to find solutions $x$ to nonlinear equations

\[F(x,p) = 0 \quad\tag{E}\]

in large dimensions as function of a real parameter $p$. We want to be able to do so on GPU, distributed systems...

The core of the package is built around a Newton-Krylov solver (see newton) which allows to solve equations of the form $F(x)=0$, or find a solution $x_0$ to (E) for a particular $p_0$.

Once such a solution (or several) $(x_0,p_0)$ is known, we can continue it by computing a 1d curve of solutions $\gamma = (x(s),p(s))_{s\in I}$ passing through $(x_0,p_0)$ (see continuation and Deflated Continuation).

In practice, you don't need to know exactly $(x_0,p_0)$ to compute $\gamma$. Indeed, continuation will call newton to refine any initial guess that you pass.

Textbook

Only the basics of bifurcation theory is underlined here. We refer to [Kuznetsov],[haragus] for a more thorough description.

Bifurcation analysis of Equilibria

We can detect if the curve of solutions $\gamma$ crosses another curve of solutions $\gamma^{bif}$ without knowing $\gamma^{bif}$! The intersection point $(x^b,p^b)\in\gamma$ is called a bifurcation point and is such that $\partial_xF(x^b,p^b)$ is non invertible. When calling γ = continuation(...) with the option detect_bifurcation > 1 inside ContinuationPar, the bifurcation points are automatically detected and stored in γ.specialpoints.

Eigenvalues

The rightmost eigenvalues are computed by default to detect bifurcations. Hence, the number of eigenvalues with positive real parts must be finite (e.g. small). This might require to consider $-F(x,p)=0$ instead of (E).

Branch switching

In the simple case where $dim\ker \partial_xF(x^b,p^b) = 1$, we can compute automatically the bifurcated branch $\gamma^{bif}$ by calling continuation and passing $\gamma$. This is explained in Branch switching from simple branch point to equilibria. Recursively, we can compute the curves of solutions which are connected to $(x_0,p_0)$, this is called a bifurcation diagram. This bifurcation diagram can be automatically computed using the function bifurcationdiagram with minimum input from the user. More information is provided in Automatic Bifurcation diagram computation and examples of use are 1d Swift-Hohenberg equation and Bratu–Gelfand problem.

When $d\equiv dim\ker \partial_xF(x^b,p^b) > 1$, you can still compute automatically the bifurcated branches $\gamma^{bif}$s by calling continuation. It is based on a reduction of (E) to a small system of $d$ dimensional multivariate polynomial equations in $d$ unknowns whose solutions give the local topology of branches in the neighborhood of the bifurcation point $(x^b, p^b)$. The solutions of this reduced equation are then used as initial guesses for the call to Krylov-Newton. This is explained in From simple branch point to equilibria and examples of use are shown in 2d Bratu–Gelfand problem and Automatic 2d Bratu–Gelfand problem (Intermediate).

In the case $d=1$, the reduced equation can be further simplified into a normal form. This is also automatically computed by the package.

Branch switching

Many more branch switching procedures are available. They are all listed in Branch switching

Bifurcation analysis of Cauchy problems

The goal of this section is to study the dynamics of the Cauchy problem

\[\frac{d}{dt}x - F(x,p) = 0. \quad\tag{C}\]

The equilibria are time independent solutions of (C) hence satisfying (E). The previous section can be applied to compute curves of equilibria. However, we can do more. By discretizing time, we can recast (C) in the general form (E) and look for time dependent solutions as well.

We can detect the existence of periodic solutions close to $\gamma$. This is done automatically and those bifurcation points are stored in γ.specialpoint as well with the name of Hopf bifurcation points.

Branch switching at Hopf points

We focus on computing the branch of periodic solutions branching from a Hopf point. This is done automatically by calling continuation, passing $\gamma$ and choosing a time discretization algorithm (see Periodic orbits computation). Some details about this branch switching are given in From Hopf point to periodic orbits.

Branch switching at bifurcation points of periodic orbits

Let us consider the case where a branch of periodic orbits $\gamma^{po}$ have been computed (see for example previous section) and several bifurcation points have been detected (branch point, period doubling and Neimark Sacker). Can we compute bifurcated branches from $\gamma^{po}$? Automatically?

We do not provide an automatic branch switching for those points and for all methods (Shooting, Finite differences). However, for branch points of periodic orbits, you can call continuation by passing $\gamma^{po}$ and some simple arguments (amplitude of the periodic orbits) to perform branch switching in a semi-automatic way. For the case of Periodic orbits based on Trapezoidal rule, see From Branch / Period-doubling point of curve of periodic orbits.

Branch switching

Many more branch switching procedures are available. They are all listed in Branch switching

Manual Branch switching

You can perform manual branch switching by computing the nearby solutions close to a bifurcation point using a deflated newton (see Deflated problems), which provides a way to compute solutions other than a set of already known solutions. You can then use these solutions to compute branches by calling continuation. Many, if not all tutorials give example of doing so like 2d Bratu–Gelfand problem or 1d Brusselator.

References

  • Kuznetsov

    Kuznetsov, Yuri A. Elements of Applied Bifurcation Theory. Vol. 112. Applied Mathematical Sciences. Cham: Springer International Publishing, 2023. https://doi.org/10.1007/978-3-031-22007-4.

  • haragus

    Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

diff --git a/dev/hh/index.html b/dev/hh/index.html index bbbf2640..b726c660 100644 --- a/dev/hh/index.html +++ b/dev/hh/index.html @@ -5,4 +5,4 @@ & +O\left(\left\|\left(w_1, \bar{w}_1, w_2, \bar{w}_2\right)\right\|^6\right) \\ \dot{w}_2= & i \omega_2 w_2+G_{1110} w_2\left|w_1\right|^2+\frac{1}{2} G_{0021} w_2\left|w_2\right|^2 +\frac{1}{4} G_{2210} w_2\left|w_1\right|^4+\frac{1}{2} G_{1121} w_2\left|w_1\right|^2\left|w_2\right|^2+\frac{1}{12} G_{0032} w_2\left|w_2\right|^4 \\ & +O\left(\left\|\left(w_1, \bar{w}_1, w_2, \bar{w}_2\right)\right\|^6\right) -\end{aligned}\right.\tag{E}\]

This normal form is usually computed in order to branch from a Hopf-Hopf bifurcation point to curves of Neimark-Sacker bifurcations of periodic orbits (see [Kuznetsov2]). Not all coefficients in (E) are required for this branching procedure, that is why only a subset of the $G_{ijkl}$ is returned.

Normal form computation

The normal form (E) can be automatically computed as follows

get_normal_form(br::ContResult, ind_bif::Int ; verbose = false, ζs = nothing, lens = getlens(br))

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type HopfHopf.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

  • Kuznetsov2

    Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68. https://doi.org/10.1016/j.physd.2008.06.006.

+\end{aligned}\right.\tag{E}\]

This normal form is usually computed in order to branch from a Hopf-Hopf bifurcation point to curves of Neimark-Sacker bifurcations of periodic orbits (see [Kuznetsov2]). Not all coefficients in (E) are required for this branching procedure, that is why only a subset of the $G_{ijkl}$ is returned.

Normal form computation

The normal form (E) can be automatically computed as follows

get_normal_form(br::ContResult, ind_bif::Int ; verbose = false, ζs = nothing, lens = getlens(br))

br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type HopfHopf.

Note

You should not need to call get_normal_form except if you need the full information about the branch point.

References

  • Kuznetsov

    Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

  • Kuznetsov2

    Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68. https://doi.org/10.1016/j.physd.2008.06.006.

diff --git a/dev/index.html b/dev/index.html index 7478ea40..a44d5634 100644 --- a/dev/index.html +++ b/dev/index.html @@ -173,7 +173,7 @@ [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.166 [6f1432cf] LoweredCodeUtils v2.4.3 - [1914dd2f] MacroTools v0.5.12 + [1914dd2f] MacroTools v0.5.13 [d125e4d3] ManualMemory v0.1.8 ⌅ [a3b82374] MatrixFactorizations v0.9.6 [739be429] MbedTLS v1.1.9 @@ -417,4 +417,4 @@ [3f19e933] p7zip_jll v17.4.0+2 Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
You can also download the manifest file and the -project file.

References

  • Rankin

    J. Rankin et al., "Continuation of localized coherent structures in nonlocal neural field equations", SIAM J. Scientific Computing 36, pp. B70–B93 (2014): https://epubs.siam.org/doi/10.1137/130918721

+project file.

References

  • Rankin

    J. Rankin et al., "Continuation of localized coherent structures in nonlocal neural field equations", SIAM J. Scientific Computing 36, pp. B70–B93 (2014): https://epubs.siam.org/doi/10.1137/130918721

diff --git a/dev/interfaceFlow/index.html b/dev/interfaceFlow/index.html index 7a9f16fc..e77111ec 100644 --- a/dev/interfaceFlow/index.html +++ b/dev/interfaceFlow/index.html @@ -1,2 +1,2 @@ -Flow · Bifurcation Analysis in Julia

Interface for Flow of Cauchy problem

Here is a description of the interface that is used to specify flows or semigroups of solutions of a Cauchy problem $\frac{du}{dt} = F(u, p),\quad u(0) = u_0.$

More precisely, we call flow the mapping $Flow(x, p, t) = u(t)$.

The flow fl must be a subtype of the abstract type AbstractFlow. Note that in most cases, we only need u(t). However, for plotting, we need optionally the full trajectory with time stamps in $[0,T]$.

Another point is the need for implementing serial versions of multithreaded flows.

Required methodsBrief description
vf(fl, x, p)The vector field F(x, p) associated to a Cauchy problem. Used for the differential of the shooting problem. Must return F(x, p)
evolve(fl, x, par, t; k...)the function implements the flow (or semigroup) (x, p, t) -> flow(x, p, t) associated to an autonomous Cauchy problem. Only the last time point must be returned in the form Named Tuple (u = ..., t = t). In the case of Poincaré Shooting, one must be able to call the flow like evolve(fl, x, par, Inf).
Optional methodsBrief description
evolve(fl, x, par, t; k...)Same as above but for t::AbstractVector of some length M and x a matrix of size N x M. In this case, you are asked to compute several flows flow(x[:, i],p,t[i]). This can be done in parallel.
evolve(fl, x, par, dx, t; k...)The differential dflow of the flow w.r.t. x, (x, p, dx, t) -> dflow(x, p, dx, t). One important thing is that we require dflow(x, dx, t) to return a Named Tuple: (t = t, u = flow(x, p, t), du = dflow(x, p, dx, t)), the last component being the value of the derivative of the flow.
evolve(fl, ::Val{:Full}, x, par, t; k...)The function implements the flow (or semigroup) associated to an autonomous Cauchy problem (x, p, t) -> flow(x, p, t). The whole solution on the time interval [0,t] must be returned. It is not strictly necessary to provide this, it is mainly used for plotting on the user side. In the case of Poincaré Shooting, one must be able to call the flow like evolve(fl, Val(:Full), x, par, Inf).
evolve(fl, ::Val{:SerialTimeSol}, x, par, t; k...)Serial version of the flow. Used for Matrix based jacobian (Shooting and Poincaré Shooting) and diffPoincareMap
evolve(fl, ::Val{:TimeSol}, x, par, t = Inf; k...)Flow which returns the tuple (t, u(t)). Optional, mainly used for plotting on the user side.
evolve(fl, ::Val{:SerialdFlow}, x, par, dx, t; k...)Serial version of dflow. Used internally when using parallel multiple shooting. Named Tuple (u = ..., du = ..., t = t).
+Flow · Bifurcation Analysis in Julia

Interface for Flow of Cauchy problem

Here is a description of the interface that is used to specify flows or semigroups of solutions of a Cauchy problem $\frac{du}{dt} = F(u, p),\quad u(0) = u_0.$

More precisely, we call flow the mapping $Flow(x, p, t) = u(t)$.

The flow fl must be a subtype of the abstract type AbstractFlow. Note that in most cases, we only need u(t). However, for plotting, we need optionally the full trajectory with time stamps in $[0,T]$.

Another point is the need for implementing serial versions of multithreaded flows.

Required methodsBrief description
vf(fl, x, p)The vector field F(x, p) associated to a Cauchy problem. Used for the differential of the shooting problem. Must return F(x, p)
evolve(fl, x, par, t; k...)the function implements the flow (or semigroup) (x, p, t) -> flow(x, p, t) associated to an autonomous Cauchy problem. Only the last time point must be returned in the form Named Tuple (u = ..., t = t). In the case of Poincaré Shooting, one must be able to call the flow like evolve(fl, x, par, Inf).
Optional methodsBrief description
evolve(fl, x, par, t; k...)Same as above but for t::AbstractVector of some length M and x a matrix of size N x M. In this case, you are asked to compute several flows flow(x[:, i],p,t[i]). This can be done in parallel.
evolve(fl, x, par, dx, t; k...)The differential dflow of the flow w.r.t. x, (x, p, dx, t) -> dflow(x, p, dx, t). One important thing is that we require dflow(x, dx, t) to return a Named Tuple: (t = t, u = flow(x, p, t), du = dflow(x, p, dx, t)), the last component being the value of the derivative of the flow.
evolve(fl, ::Val{:Full}, x, par, t; k...)The function implements the flow (or semigroup) associated to an autonomous Cauchy problem (x, p, t) -> flow(x, p, t). The whole solution on the time interval [0,t] must be returned. It is not strictly necessary to provide this, it is mainly used for plotting on the user side. In the case of Poincaré Shooting, one must be able to call the flow like evolve(fl, Val(:Full), x, par, Inf).
evolve(fl, ::Val{:SerialTimeSol}, x, par, t; k...)Serial version of the flow. Used for Matrix based jacobian (Shooting and Poincaré Shooting) and diffPoincareMap
evolve(fl, ::Val{:TimeSol}, x, par, t = Inf; k...)Flow which returns the tuple (t, u(t)). Optional, mainly used for plotting on the user side.
evolve(fl, ::Val{:SerialdFlow}, x, par, dx, t; k...)Serial version of dflow. Used internally when using parallel multiple shooting. Named Tuple (u = ..., du = ..., t = t).
diff --git a/dev/interfaceLS/index.html b/dev/interfaceLS/index.html index 9f395425..e027bb65 100644 --- a/dev/interfaceLS/index.html +++ b/dev/interfaceLS/index.html @@ -8,4 +8,4 @@ \end{array}\right] = \left[\begin{array}{l} R \\ n -\end{array}\right]\]

where $\xi_u,\xi_p\in\mathbb C$ and $dR,\xi_u\in\mathbb C^N$.

Required methodsBrief description
bls(J, dR, dzu, dzp, R, n, ξu::Number, ξp::Number; shift = nothing, kwargs...)Compute the solution dX, dl of the linear problem (BLS) where J is the jacobian and dR, dzu are vectors (not necessarily subtypes of AbstractVector). shift = nothing is used in place of saying shift=0. Returns (dX, dl, success::Bool, itnumber) where itnumber is the number of iterations for solving the problem.
+\end{array}\right]\]

where $\xi_u,\xi_p\in\mathbb C$ and $dR,\xi_u\in\mathbb C^N$.

Required methodsBrief description
bls(J, dR, dzu, dzp, R, n, ξu::Number, ξp::Number; shift = nothing, kwargs...)Compute the solution dX, dl of the linear problem (BLS) where J is the jacobian and dR, dzu are vectors (not necessarily subtypes of AbstractVector). shift = nothing is used in place of saying shift=0. Returns (dX, dl, success::Bool, itnumber) where itnumber is the number of iterations for solving the problem.
diff --git a/dev/interfacePred/index.html b/dev/interfacePred/index.html index 4221bbf0..a31c891b 100644 --- a/dev/interfacePred/index.html +++ b/dev/interfacePred/index.html @@ -1,2 +1,2 @@ -Predictor / corrector · Bifurcation Analysis in Julia

Interface for Predictor / Corrector

Here is a description of the interface that is used to specify predictor / corrector for continuation methods. The type must be a subtype of the abstract type AbstractTangentPredictor.

In the table below, we assume it::AbstractContinuationIterable and M = BorderedArray

Required methodsBrief description
getPredictor!(z_pred::M, z_old::M, τ::M, ds, pred::AbstractTangentPredictor, nrm = false)Write in z_pred a prediction for the new Newton guess given the current solution z_old, tangent τ and arc length ds.
getTangent!(τ::M, z_new::M, z_old::M, it, ds, θ, pred:: AbstractTangentPredictor, verbosity)Generate an estimate of the tangent to the branch of solutions at positions z_new, z_old
corrector(it, z_old::M, τ::M, z_pred::M, ds, θ, pred::AbstractTangentPredictor, linearalgo; normC = norm, callback = cbDefault, kwargs...)Correct the guess z_pred. Must return a tuple (sol, residuals, isconverged, it numbers, itlinear)
Optional methodsBrief description
Base.empty!(pred::AbstractTangentPredictor)Reset the predictor
+Predictor / corrector · Bifurcation Analysis in Julia

Interface for Predictor / Corrector

Here is a description of the interface that is used to specify predictor / corrector for continuation methods. The type must be a subtype of the abstract type AbstractTangentPredictor.

In the table below, we assume it::AbstractContinuationIterable and M = BorderedArray

Required methodsBrief description
getPredictor!(z_pred::M, z_old::M, τ::M, ds, pred::AbstractTangentPredictor, nrm = false)Write in z_pred a prediction for the new Newton guess given the current solution z_old, tangent τ and arc length ds.
getTangent!(τ::M, z_new::M, z_old::M, it, ds, θ, pred:: AbstractTangentPredictor, verbosity)Generate an estimate of the tangent to the branch of solutions at positions z_new, z_old
corrector(it, z_old::M, τ::M, z_pred::M, ds, θ, pred::AbstractTangentPredictor, linearalgo; normC = norm, callback = cbDefault, kwargs...)Correct the guess z_pred. Must return a tuple (sol, residuals, isconverged, it numbers, itlinear)
Optional methodsBrief description
Base.empty!(pred::AbstractTangentPredictor)Reset the predictor
diff --git a/dev/intro-abs/index.html b/dev/intro-abs/index.html index 4823d5ac..eea18d6f 100644 --- a/dev/intro-abs/index.html +++ b/dev/intro-abs/index.html @@ -4,4 +4,4 @@ kwargs...)
  • In case of automatic branch switching, the user is only asked to provide δp while ampfactor is internally estimated using the normal form of the bifurcation point. When the user does not pass δp, the value of ds is in ContinuationPar is used. Thus, the general method is like
continuation(br, ind_bif, options_cont; kwargs...)

When the bifurcation diagram is very stiff, automatic branch switching may fail (for example BifurcationKit could return ampfactor=1e6 or ampfactor = 1e-10). In this case, one can override automatic branch switching and specify δp, ampfactor directly as for manual branch switching using

continuation(br, ind_bif, options_cont; 
     δp = 0.1, ampfactor = 0.1,
     override = true,
-    kwargs...)
Manual branch switching

Manual branch switching is automatically used by BifurcationKit when the normal form of the bifurcation point is not implemented (like PD normal form for Trapezoid method). You can force BifurcationKit to use it using the override key word.

Branch switching of non-simple bifurcation points

We refer to Branch switching for more details.

Graph of bifurcations

We provide a graph of bifurcations of equilbria and periodic orbits that can be detected in BifurcationKit. An arrow from say Equilibrium to Hopf means that Hopf bifurcations can be detected while continuing equilibria. Each object of codim 0 (resp. 1) can be continued in one (resp. 2) parameters.

Summary of branching procedures

We collect in the following table the list of automatic branch switching (aBS) functions. Their detailed explanation follows in this page.

functionind-th bif. pointType Tdescription
continuation(br::ContResult{T}, ind::Int; kw...):bp, :ndEquilibriumContaBS from equilibria to equilibria
continuation(br::ContResult{T}, ind::Int, lens2::Lens; kw...):bp, :hopfEquilibriumContFold/Hopf continuation w.r.t. parameters getlens(br) and lens2
continuation(br::ContResult{T}, ind::Int; kw...):bt,:zh,:hhFoldCont,HopfContswitch to Fold/Hopf continuation from Hopf/Fold w.r.t. parameters of codim 2 br
continuation(br::ContResult{T}, ind_hopf::Int, ::ContinuationPar, prob::AbstractPeriodicOrbitProblem):hopfEquilibriumContBranch switching from Hopf point to periodic orbits
continuation(br::ContResult{T}, ind::Int, kw...):bp,:pdPeriodicOrbitContBranch switching from Branch / Period-doubling point of periodic orbits to curve of periodic orbits
continuation(br::ContResult{T}, ind::Int, kw...):gh,:zh,:hhTwoParamContBranch switching from Bautin / Zero-Hopf/ Hopf-Hopf point to curve of Fold/NS of periodic orbits
+ kwargs...)
Manual branch switching

Manual branch switching is automatically used by BifurcationKit when the normal form of the bifurcation point is not implemented (like PD normal form for Trapezoid method). You can force BifurcationKit to use it using the override key word.

Branch switching of non-simple bifurcation points

We refer to Branch switching for more details.

Graph of bifurcations

We provide a graph of bifurcations of equilbria and periodic orbits that can be detected in BifurcationKit. An arrow from say Equilibrium to Hopf means that Hopf bifurcations can be detected while continuing equilibria. Each object of codim 0 (resp. 1) can be continued in one (resp. 2) parameters.

Summary of branching procedures

We collect in the following table the list of automatic branch switching (aBS) functions. Their detailed explanation follows in this page.

functionind-th bif. pointType Tdescription
continuation(br::ContResult{T}, ind::Int; kw...):bp, :ndEquilibriumContaBS from equilibria to equilibria
continuation(br::ContResult{T}, ind::Int, lens2::Lens; kw...):bp, :hopfEquilibriumContFold/Hopf continuation w.r.t. parameters getlens(br) and lens2
continuation(br::ContResult{T}, ind::Int; kw...):bt,:zh,:hhFoldCont,HopfContswitch to Fold/Hopf continuation from Hopf/Fold w.r.t. parameters of codim 2 br
continuation(br::ContResult{T}, ind_hopf::Int, ::ContinuationPar, prob::AbstractPeriodicOrbitProblem):hopfEquilibriumContBranch switching from Hopf point to periodic orbits
continuation(br::ContResult{T}, ind::Int, kw...):bp,:pdPeriodicOrbitContBranch switching from Branch / Period-doubling point of periodic orbits to curve of periodic orbits
continuation(br::ContResult{T}, ind::Int, kw...):gh,:zh,:hhTwoParamContBranch switching from Bautin / Zero-Hopf/ Hopf-Hopf point to curve of Fold/NS of periodic orbits
diff --git a/dev/intro_wave/index.html b/dev/intro_wave/index.html index 3c13aee3..af3acbaf 100644 --- a/dev/intro_wave/index.html +++ b/dev/intro_wave/index.html @@ -11,4 +11,4 @@ \begin{array}{l}\tag{W} J x_1+c_1A_{12} = \sigma x_1 \\ \langle A_{21},x_1\rangle + A_{22}c_1=0 -\end{array}\right.\]

Case $A_{22}\neq 0$

If $A_{22}\neq 0$, the eigen problem is equivalent to

\[Jx_1 - c_1\frac{\langle A_{21},x_1\rangle}{A_{22}} A_{12}= \sigma x_1\]

Case $A_{22} = 0$

If $A_{22} = 0$, the eigen problem is equivalent to $x_1=α A_{21} + x_1^\bot$ with $\langle A_{21},x_1^\bot\rangle=0$. Hence, I find $\langle A_{21},Jx_1^\bot\rangle+c_1\langle A_{21},A_{12}\rangle=0$

\[Jx_1^\bot-\frac{\langle A_{21},Jx_1^\bot\rangle}{\langle A_{21},A_{12}\rangle}A_{21}=σ x_1^⊥\]

Encoding of the functional for the freezed problem

The freezing method is encoded in the composite type TWProblem which we loosely refer to as a Travelling Wave (TW) problem.

Computation with newton

We provide a simplified call to newton to locate the freezed solution

newton(prob::TWProblem, orbitguess, options::NewtonPar; kwargs...)

Continuation

We also provide a simplified call to continuation to continue the freezed solution as function of a parameter:

continuation(prob::TWProblem, orbitguess, lens::Lens, contParams::ContinuationPar; jacobian = :MatrixFree, kwargs...)

Note that in this case, the eigen solver passed in contParams is converted into an appropriate generalized eigensolver.

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

  • Sandstede

    Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

+\end{array}\right.\]

Case $A_{22}\neq 0$

If $A_{22}\neq 0$, the eigen problem is equivalent to

\[Jx_1 - c_1\frac{\langle A_{21},x_1\rangle}{A_{22}} A_{12}= \sigma x_1\]

Case $A_{22} = 0$

If $A_{22} = 0$, the eigen problem is equivalent to $x_1=α A_{21} + x_1^\bot$ with $\langle A_{21},x_1^\bot\rangle=0$. Hence, I find $\langle A_{21},Jx_1^\bot\rangle+c_1\langle A_{21},A_{12}\rangle=0$

\[Jx_1^\bot-\frac{\langle A_{21},Jx_1^\bot\rangle}{\langle A_{21},A_{12}\rangle}A_{21}=σ x_1^⊥\]

Encoding of the functional for the freezed problem

The freezing method is encoded in the composite type TWProblem which we loosely refer to as a Travelling Wave (TW) problem.

Computation with newton

We provide a simplified call to newton to locate the freezed solution

newton(prob::TWProblem, orbitguess, options::NewtonPar; kwargs...)

Continuation

We also provide a simplified call to continuation to continue the freezed solution as function of a parameter:

continuation(prob::TWProblem, orbitguess, lens::Lens, contParams::ContinuationPar; jacobian = :MatrixFree, kwargs...)

Note that in this case, the eigen solver passed in contParams is converted into an appropriate generalized eigensolver.

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

  • Sandstede

    Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

diff --git a/dev/iterator/index.html b/dev/iterator/index.html index cf23a1d9..60916a8f 100644 --- a/dev/iterator/index.html +++ b/dev/iterator/index.html @@ -32,44 +32,44 @@ plot(resp, resx; label = "", xlabel = "p") - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + -

Additional information

If you want to customize the iterator to your needs, perhaps the best source of inspiration is the code of the function continuation!(it::ContIterable, state::ContState, contRes::ContResult) where the iterator is used at its fullest. You will see how the eigen-elements and the stability are computed, how bifurcations are detected and how results are saved.

+

Additional information

If you want to customize the iterator to your needs, perhaps the best source of inspiration is the code of the function continuation!(it::ContIterable, state::ContState, contRes::ContResult) where the iterator is used at its fullest. You will see how the eigen-elements and the stability are computed, how bifurcations are detected and how results are saved.

diff --git a/dev/library/index.html b/dev/library/index.html index 610d9bf8..7a376ec7 100644 --- a/dev/library/index.html +++ b/dev/library/index.html @@ -276,4 +276,4 @@ δ, detailed ) -

Compute the normal form of periodic orbits. Same arguments as the function get_normal_form for equilibria. We detail the additional keyword arguments specific to periodic orbits

Optional arguments

  • prm = true compute the normal form using Poincaré return map. For collocation, there will be another way to compute the normal form in the future.
+

Compute the normal form of periodic orbits. Same arguments as the function get_normal_form for equilibria. We detail the additional keyword arguments specific to periodic orbits

Optional arguments

  • prm = true compute the normal form using Poincaré return map. For collocation, there will be another way to compute the normal form in the future.
diff --git a/dev/linearsolver/index.html b/dev/linearsolver/index.html index a72f5db8..fb46b565 100644 --- a/dev/linearsolver/index.html +++ b/dev/linearsolver/index.html @@ -5,4 +5,4 @@ return J \ rhs, true, 1 end

Note that for newton to work, the linear solver must return 3 arguments. The first one is the result, the second one is whether the computation was successful and the third is the number of iterations required to perform the computation.

You can then call it as follows (and it will be called like this in newton)

ls = DefaultLS()
 J = rand(2, 2) # example of linear operator
-ls(J, rand(2))

List of implemented linear solvers

  1. Default \ solver based on LU or Cholesky depending on the type of the Jacobian. This works for sparse matrices as well. You can create one via linsolver = DefaultLS().
  2. GMRES from IterativeSolvers.jl. You can create one via linsolver = GMRESIterativeSolvers() and pass appropriate options.
  3. GMRES from KrylovKit.jl. You can create one via linsolver = GMRESKrylovKit() and pass appropriate options.
Different linear solvers

By tuning the options of GMRESKrylovKit, you can select CG, GMRES... see KrylovKit.jl.

Other solvers

It is very straightforward to implement the Conjugate Gradients from IterativeSolvers.jl by copying the interface done for gmres. Same goes for minres,... Not needing them, I did not implement this.

Preconditioner

Preconditioners should be considered when using Matrix Free methods such as GMRES. GMRESIterativeSolvers provides a very simple interface for using them. For GMRESKrylovKit, we implemented a left preconditioner. Note that, for GMRESKrylovKit, you are not restricted to use Vectors anymore. Finally, here are some packages to use preconditioners

  1. IncompleteLU.jl an ILU like preconditioner
  2. AlgebraicMultigrid.jl Algebraic Multigrid (AMG) preconditioners. This works especially well for symmetric positive definite matrices.
  3. Preconditioners.jl A convenient interface to conveniently called most of the above preconditioners using a single syntax.
  4. We provide a preconditioner based on deflation of eigenvalues (also called preconditioner based on Leading Invariant Subspaces) using a partial Schur decomposition. There are two ways to define one i.e. PrecPartialSchurKrylovKit and PrecPartialSchurArnoldiMethod.
Using Preconditioners

Apart from setting a preconditioner for a linear solver, it can be advantageous to change the preconditioner during computations, e.g. during a call to continuation or newton. This can be achieved by taking advantage of the callbacks to these methods. See the example 2d Ginzburg-Landau equation (finite differences, codim 2, Hopf aBS).

+ls(J, rand(2))

List of implemented linear solvers

  1. Default \ solver based on LU or Cholesky depending on the type of the Jacobian. This works for sparse matrices as well. You can create one via linsolver = DefaultLS().
  2. GMRES from IterativeSolvers.jl. You can create one via linsolver = GMRESIterativeSolvers() and pass appropriate options.
  3. GMRES from KrylovKit.jl. You can create one via linsolver = GMRESKrylovKit() and pass appropriate options.
Different linear solvers

By tuning the options of GMRESKrylovKit, you can select CG, GMRES... see KrylovKit.jl.

Other solvers

It is very straightforward to implement the Conjugate Gradients from IterativeSolvers.jl by copying the interface done for gmres. Same goes for minres,... Not needing them, I did not implement this.

Preconditioner

Preconditioners should be considered when using Matrix Free methods such as GMRES. GMRESIterativeSolvers provides a very simple interface for using them. For GMRESKrylovKit, we implemented a left preconditioner. Note that, for GMRESKrylovKit, you are not restricted to use Vectors anymore. Finally, here are some packages to use preconditioners

  1. IncompleteLU.jl an ILU like preconditioner
  2. AlgebraicMultigrid.jl Algebraic Multigrid (AMG) preconditioners. This works especially well for symmetric positive definite matrices.
  3. Preconditioners.jl A convenient interface to conveniently called most of the above preconditioners using a single syntax.
  4. We provide a preconditioner based on deflation of eigenvalues (also called preconditioner based on Leading Invariant Subspaces) using a partial Schur decomposition. There are two ways to define one i.e. PrecPartialSchurKrylovKit and PrecPartialSchurArnoldiMethod.
Using Preconditioners

Apart from setting a preconditioner for a linear solver, it can be advantageous to change the preconditioner during computations, e.g. during a call to continuation or newton. This can be achieved by taking advantage of the callbacks to these methods. See the example 2d Ginzburg-Landau equation (finite differences, codim 2, Hopf aBS).

diff --git a/dev/migration/index.html b/dev/migration/index.html index 043e1bc1..e4dee977 100644 --- a/dev/migration/index.html +++ b/dev/migration/index.html @@ -1,2 +1,2 @@ -Migration from old versions · Bifurcation Analysis in Julia

Migration from previous versions

Migration from v0.2.x to v0.3.x

A new version v0.3 has been tagged in which the function names, keyword arguments,... follow the Julia convention. There are a lot of breaking changes. For example, callbackN has been changed to callback_newton.

Migration from v0.1.x to v0.2.x

New version of the package with modified interface. You are now required to define a BifurcationProblem to perform continuation or bifurcation analysis. The previous interface is available under the tag 0.1.12 which can be installed by doing

] add BifurcationKit@0.1.12

The new version provides many bugs fix though. (Please note that the docs are up to date).

Introduction

In v0.2.x, we introduced problem based bifurcation diagram, meaning that you have now to wrap your vector field in a BifurcationProblem. You also need to pass your plot/record functions.

Don't use AD yourself

There is nothing wrong with doing so but this is done in the constructor of BifurcationPoblem, so if myJacAD is the jacobian computed using ForwardDiff, the declaration

prob = BifurcationProblem(F, x, p, lens ; J = myJacAD) 

should be

prob = BifurcationProblem(F, x, p, lens) 

There is nothing wrong in passing your own jacobian though

Error: no method matching iterate(::BifurcationKit.ContResult

This is because you use the old syntax

br, = continuation(...)

instead of (no comma)

br = continuation(...)

Arguments to continuation

recordFromSolution and plotFromSolution should be passed to BifurcationProblem instead of continuation.

+Migration from old versions · Bifurcation Analysis in Julia

Migration from previous versions

Migration from v0.2.x to v0.3.x

A new version v0.3 has been tagged in which the function names, keyword arguments,... follow the Julia convention. There are a lot of breaking changes. For example, callbackN has been changed to callback_newton.

Migration from v0.1.x to v0.2.x

New version of the package with modified interface. You are now required to define a BifurcationProblem to perform continuation or bifurcation analysis. The previous interface is available under the tag 0.1.12 which can be installed by doing

] add BifurcationKit@0.1.12

The new version provides many bugs fix though. (Please note that the docs are up to date).

Introduction

In v0.2.x, we introduced problem based bifurcation diagram, meaning that you have now to wrap your vector field in a BifurcationProblem. You also need to pass your plot/record functions.

Don't use AD yourself

There is nothing wrong with doing so but this is done in the constructor of BifurcationPoblem, so if myJacAD is the jacobian computed using ForwardDiff, the declaration

prob = BifurcationProblem(F, x, p, lens ; J = myJacAD) 

should be

prob = BifurcationProblem(F, x, p, lens) 

There is nothing wrong in passing your own jacobian though

Error: no method matching iterate(::BifurcationKit.ContResult

This is because you use the old syntax

br, = continuation(...)

instead of (no comma)

br = continuation(...)

Arguments to continuation

recordFromSolution and plotFromSolution should be passed to BifurcationProblem instead of continuation.

diff --git a/dev/modulated_wave_fd/index.html b/dev/modulated_wave_fd/index.html index c2eeb402..e8fa4bcb 100644 --- a/dev/modulated_wave_fd/index.html +++ b/dev/modulated_wave_fd/index.html @@ -3,4 +3,4 @@ \begin{array}{l} F(x, p) - s\cdot T\cdot x=0 \\ \langle T\cdot x_{ref},x-x_{ref}\rangle=0 -\end{array}\right.\tag{FE}\]

This provides a travelling wave solution $

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

+\end{array}\right.\tag{FE}\]

This provides a travelling wave solution $

References

  • Beyn

    Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

diff --git a/dev/newton/index.html b/dev/newton/index.html index 066074a9..f63108f8 100644 --- a/dev/newton/index.html +++ b/dev/newton/index.html @@ -6,4 +6,4 @@ sol = newton(prob, NewtonPar(verbose = true))
NonLinearSolution{Vector{Float64}, BifurcationProblem{BifFunction{typeof(Main.F), BifurcationKit.var"#8#24", Nothing, BifurcationKit.var"#6#22", Nothing, BifurcationKit.var"#11#28"{BifurcationKit.var"#d1Fad#26"}, BifurcationKit.var"#13#30", BifurcationKit.var"#15#32", BifurcationKit.var"#17#34", Bool, Float64}, Vector{Float64}, Nothing, Setfield.IdentityLens, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default)}, Vector{Float64}, Int64}([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], ┌─ Bifurcation Problem with uType Vector{Float64}
 ├─ Inplace:  false
 ├─ Symmetric: false
-└─ Parameter: p, [2.2835282755415567, 1.6725149418734345e8, 4.955599796303432e7, 1.4683258341016822e7, 4.350594749307979e6, 1.289064796209185e6, 381944.8101061596, 113168.51792850898, 33531.09802746768, 9934.825475831654  …  257.9927363934863, 76.1297236746007, 22.24930797182921, 6.3000745348188, 1.6150517518532743, 0.30563041710546945, 0.0231831305923595, 0.0001746510363979729, 1.0165688957286534e-8, 0.0], true, 21, 21)

Example

The (basic) tutorial Temperature model presents all cases (direct and iterative ones).

+└─ Parameter: p, [2.7141572522562, 8508.032798902594, 2520.5625168273914, 746.4977674517085, 220.850319754936, 65.10687681456638, 18.97140673291653, 5.325883020740359, 1.3317378809673912, 0.23406389641330144, 0.0144602006096391, 6.859638936261396e-5, 1.5683687681899983e-9, 0.0], true, 13, 13)

Example

The (basic) tutorial Temperature model presents all cases (direct and iterative ones).

diff --git a/dev/nonsimplebp/index.html b/dev/nonsimplebp/index.html index 06cc26f3..1652c07a 100644 --- a/dev/nonsimplebp/index.html +++ b/dev/nonsimplebp/index.html @@ -20,4 +20,4 @@ end

Using the reduced equation

Once a branch point has been computed bp = get_normal_form(...), you can do all sort of things.

  • For example, quoted from the file test/testNF.jl, you can print the 2d reduced equation as follows:
julia> BifurcationKit.nf(bp2d)
 2-element Array{String,1}:
  " + (3.23 + 0.0im) * x1 * p + (-0.123 + 0.0im) * x1^3 + (-0.234 + 0.0im) * x1 * x2^2"
- " + (-0.456 + 0.0im) * x1^2 * x2 + (3.23 + 0.0im) * x2 * p + (-0.123 + 0.0im) * x2^3"
  • You can evaluate the reduced equation as bp2d(Val(:reducedForm), rand(2), 0.2). This can be used to find all the zeros of the reduced equation by sampling on a grid or using a general solver like Roots.jl.

  • Finally, given a $d$-dimensional vector $x$ and a parameter $\delta p$, you can have access to an initial guess $u$ (see above) by calling bp2d(rand(2), 0.1)

+ " + (-0.456 + 0.0im) * x1^2 * x2 + (3.23 + 0.0im) * x2 * p + (-0.123 + 0.0im) * x2^3"
  • You can evaluate the reduced equation as bp2d(Val(:reducedForm), rand(2), 0.2). This can be used to find all the zeros of the reduced equation by sampling on a grid or using a general solver like Roots.jl.

  • Finally, given a $d$-dimensional vector $x$ and a parameter $\delta p$, you can have access to an initial guess $u$ (see above) by calling bp2d(rand(2), 0.1)

diff --git a/dev/ns/index.html b/dev/ns/index.html index 9e108fe9..17be7470 100644 --- a/dev/ns/index.html +++ b/dev/ns/index.html @@ -2,4 +2,4 @@ Neimarck-Sacker · Bifurcation Analysis in Julia

Neimark-Sacker point

At a Neimark-Sacker (NS) bifurcation of a periodic orbit $\gamma$ (with period $T$) for parameter value $p_0$ for the Cauchy problem

\[\frac{du}{dt}=F(u,p),\tag{E}\]

the eigenvalues (Floquet coefficients) of the monodromy operator $\mathcal M=Y(T)$ solution to

\[\frac{dY}{dt}=A(t)Y(t), Y(0)=I_n\]

contain the eigenvalues $e^{\pm i \theta}$ with $\theta$ and

\[e^{i q \theta}-1 \neq 0, \quad q=1,2,3,4 \text { (no strong resonances). }\]

There are two ways to compute the normal form of this bifurcation

  1. using the Poincaré return map [Kuznetsov]
  2. using the method of [Iooss], see also [Kuz2]

You can obtain the normal form of a NS bifurcation using

pd = get_normal_form(br, ind; prm = false)

where prm indicates whether you want to use the method based on Poincaré return map (PRM) or the one based on Iooss method.

Which method to use?

Depending on the method used for computing the periodic orbits, you have several possibilities:

  • For shooting, you can only the PRM method. Shooting is the preferred way for large scale systems. Note that the PRM method is not very precise numerically.
  • For collocation, you can use PRM and Iooss methods. Note that the Iooss method is the most precise.
  • For Trapezoid method, NS normal form is not yet implemented.

Normal form based on Poincaré return map

Given a transversal section $\Sigma$ to $\gamma$ at $\gamma(0)$, the Poincaré return map $\mathcal P$ associates to each point $x\in\Sigma$ close to $\gamma(0)$ the first point $\mathcal P(x,p)\in\Sigma$ where the orbit of (E) with initial condition $x$ intersects again $\Sigma$ at $\mathcal P(x,p)$. Hence, the discrete map $x_{n+1}=\mathcal P(x_n,p)$ has normal form

\[z_{n+1} = z_ne^{i\theta}(1+d|z_n|^2)\]

where[Kuz2]

\[d=\frac{1}{2} e^{-i \theta}\left\langle v^*, \mathcal{C}(v, v, \bar{v})+2 \mathcal{B}\left(v,\left(I_{n-1}-\mathcal{A}\right)^{-1} \mathcal{B}(v, \bar{v})\right)+\mathcal{B}\left(\bar{v},\left(e^{2 i \theta} I_{n-1}-\mathcal{A}\right)^{-1} \mathcal{B}(v, v)\right)\right\rangle\]

where $\mathcal C=d^3\mathcal P(\gamma(0))$, $\mathcal B = d^2\mathcal P(\gamma(0))$ and $\mathcal A = d\mathcal P(\gamma(0))$. Also:

\[\mathcal{A} v=e^{i \theta} v, \mathcal{A}^{\mathrm{T}} v^*=e^{-i \theta} v^*, \text { and }\left\langle v^*, v\right\rangle=1\]

Normal form based on Iooss method

This is based on [Iooss],[Kuz2]. Suppose that the $T$ periodic orbit $\gamma(\tau)$ has a Neimark-Sacker bifurcation for a parameter value $p_0$. We also assume that there are no strong resonances. Locally, the orbits can be represented by

\[x(\tau) = \gamma(\tau)+Q_0(\tau)\xi+\Phi(\tau, \xi)\]

where

\[\left\{\begin{aligned} \frac{d \tau}{d t} & =1+a|\xi|^2+\cdots \\ \frac{d \xi}{d t} & =\frac{i \theta}{T} \xi+d \xi|\xi|^2+\cdots -\end{aligned}\right.\]

with center manifold correction $\Phi(\tau, \xi)$ being $T$ periodic in $\tau$ and $Q_0(\tau)$ is the Floquet operator.

References

  • Kuznetsov

    Yu. A. Kuznetsov, "Elements of Applied Bifurcation Theory", 2nd ed., 1998.

  • Kuz2

    Kuznetsov et al., “Numerical Periodic Normalization for Codim 1 Bifurcations of Limit Cycles.”

  • Iooss

    Iooss, "Global Characterization of the Normal Form for a Vector Field near a Closed Orbit.", 1988

+\end{aligned}\right.\]

with center manifold correction $\Phi(\tau, \xi)$ being $T$ periodic in $\tau$ and $Q_0(\tau)$ is the Floquet operator.

References

  • Kuznetsov

    Yu. A. Kuznetsov, "Elements of Applied Bifurcation Theory", 2nd ed., 1998.

  • Kuz2

    Kuznetsov et al., “Numerical Periodic Normalization for Codim 1 Bifurcations of Limit Cycles.”

  • Iooss

    Iooss, "Global Characterization of the Normal Form for a Vector Field near a Closed Orbit.", 1988

diff --git a/dev/overview/index.html b/dev/overview/index.html index c75db87d..40f0fb36 100644 --- a/dev/overview/index.html +++ b/dev/overview/index.html @@ -1,2 +1,2 @@ -Overview · Bifurcation Analysis in Julia

Overview of BifurcationKit.jl

The general workflow for using the package is as follows:

  • Define a problem
  • Solve the problem
  • Analyze the output

Defining Problems

Problems are specified via a type interface. The problem types are designed to contain the necessary information to fully define their associated continuation method. For example, a bifurcation problem is defined by

\[F(u, pars) = 0\]

with some parameters pars, some initial guess u0, and scalar parameter axis lens contained in pars. Therefore the BifurcationProblem is defined by those components:

prob = BifurcationProblem(F, u0, pars, lens)

Note that the number types in the solution will match the types you designate in the problem. However complex types are not advised as they mess up the detection of bifurcation points.

Continuing from the initial guess

Each type of bifurcation problem has its own problem type which allow the solvers to dispatch to the right methods. The common interface for calling the solvers is:

br = continuation(prob, alg; kwargs)

Into the command, one passes the bifurcation problem that was defined prob, choose an algorithm alg, and change the properties of the solver using keyword arguments. The solver returns a branch object br which holds all the details for the branch.

Analyzing the branch

The solution type has a common interface, which makes handling the solution similar between the different types of bifurcation problems. Tools such as interpolations are seamlessly built into the solution interface to make analysis easy. This interface is described in the ContResult.

Plotting functionality is provided by a recipe to Plots.jl. To use plot branches, simply call the plot(br) and the plotter will generate appropriate plots. Plots can be customized using all the keyword arguments provided by Plots.jl. Please see Plots.jl's documentation for more information.

+Overview · Bifurcation Analysis in Julia

Overview of BifurcationKit.jl

The general workflow for using the package is as follows:

  • Define a problem
  • Solve the problem
  • Analyze the output

Defining Problems

Problems are specified via a type interface. The problem types are designed to contain the necessary information to fully define their associated continuation method. For example, a bifurcation problem is defined by

\[F(u, pars) = 0\]

with some parameters pars, some initial guess u0, and scalar parameter axis lens contained in pars. Therefore the BifurcationProblem is defined by those components:

prob = BifurcationProblem(F, u0, pars, lens)

Note that the number types in the solution will match the types you designate in the problem. However complex types are not advised as they mess up the detection of bifurcation points.

Continuing from the initial guess

Each type of bifurcation problem has its own problem type which allow the solvers to dispatch to the right methods. The common interface for calling the solvers is:

br = continuation(prob, alg; kwargs)

Into the command, one passes the bifurcation problem that was defined prob, choose an algorithm alg, and change the properties of the solver using keyword arguments. The solver returns a branch object br which holds all the details for the branch.

Analyzing the branch

The solution type has a common interface, which makes handling the solution similar between the different types of bifurcation problems. Tools such as interpolations are seamlessly built into the solution interface to make analysis easy. This interface is described in the ContResult.

Plotting functionality is provided by a recipe to Plots.jl. To use plot branches, simply call the plot(br) and the plotter will generate appropriate plots. Plots can be customized using all the keyword arguments provided by Plots.jl. Please see Plots.jl's documentation for more information.

diff --git a/dev/pd/index.html b/dev/pd/index.html index fc86cc26..a4ba94cd 100644 --- a/dev/pd/index.html +++ b/dev/pd/index.html @@ -2,4 +2,4 @@ Period-doubling · Bifurcation Analysis in Julia

Period-doubling point

At a period-doubling (PD) bifurcation of a periodic orbit $\gamma$ (with period $T$) for parameter value $p_0$ for the Cauchy problem

\[\frac{du}{dt}=F(u,p),\tag{E}\]

the eigenvalues (Floquet coefficients) of the monodromy operator $\mathcal M=Y(T)$ solution to

\[\frac{dY}{dt}=A(t)Y(t), Y(0)=I_n\]

contain the simple eigenvalue $\mu=-1$.

There are two ways to compute the normal form of this bifurcation

  1. using the Poincaré return map [Kuznetsov]
  2. using the method of [Iooss] see also [Kuz2]

You can obtain the normal form of a PD bifurcation using

pd = get_normal_form(br, ind; prm = false)

where prm indicates whether you want to use the method based on Poincaré return map (PRM) or the one based on Iooss method.

Which method to use?

Depending on the method used for computing the periodic orbits, you have several possibilities:

  • For shooting, you can only the PRM method. Shooting is the preferred way for large scale systems. Note that the PRM method is not very precise numerically.
  • For collocation, you can use PRM and Iooss methods. Note that the Iooss method is the most precise.
  • For Trapezoid method, PD normal form is not yet implemented.

Normal form based on Poincaré return map

Given a transversal section $\Sigma$ to $x_0$ at $x_0(0)$, the Poincaré return map $\mathcal P$ associates to each point $x\in\Sigma$ close to $x_0(0)$ the first point $\mathcal P(x,p)\in\Sigma$ where the orbit of (E) with initial condition $x$ intersects again $\Sigma$ at $\mathcal P(x,p)$. Hence, the discrete map $x_{n+1}=\mathcal P(x_n,p)$ has normal form

\[x_{n+1} = -x_n+cx_n^3+...\]

where [Kuz2]

\[c =\frac{1}{6}\left\langle p^*, \mathcal{C}(p, p, p)+3 \mathcal{B}\left(p,\left(I_{n-1}-\mathcal{A}\right)^{-1} \mathcal{B}(p, p)\right)\right\rangle\]

where $\mathcal C=d^3\mathcal P(x_0(0))$, $\mathcal B = d^2\mathcal P(x_0(0))$ and $\mathcal A = d\mathcal P(x_0(0))$. Also:

\[\mathcal{A} p=-p, \mathcal{A}^{\mathrm{T}} p^*=-p^*\]

Normal form based on Iooss method

This is based on [Iooss],[Kuz2]. Suppose that the $T$ periodic orbit $x_0(\tau)$ has a Period-Doubling bifurcation for a parameter value $p_0$. Locally, the orbits can be represented by $p-p_0:=\mu$ and

\[x(\tau) = x_0(\tau)+\xi v(\tau)+H(\tau, \xi, \mu)\]

where

\[\left\{\begin{array}{l} \frac{d \tau}{d t}=1+a_{01}\cdot(p-p_0)+a_2 \xi^2+\cdots \\ \frac{d \xi}{d \tau}=c_{11}\cdot(p-p_0)\xi+c_3 \xi^3+\cdots -\end{array}\right.\]

with center manifold correction $H(\tau, \xi, \mu)$ being $2T$ periodic in $\tau$ and $v(\tau)$ is a Floquet eigenvector for the eigenvalue -1.

References

  • Kuznetsov

    Yu. A. Kuznetsov, "Elements of Applied Bifurcation Theory", 2nd ed., 1998.

  • Kuz2

    Kuznetsov et al., “Numerical Periodic Normalization for Codim 1 Bifurcations of Limit Cycles.”

  • Iooss

    Iooss, "Global Characterization of the Normal Form for a Vector Field near a Closed Orbit.", 1988

+\end{array}\right.\]

with center manifold correction $H(\tau, \xi, \mu)$ being $2T$ periodic in $\tau$ and $v(\tau)$ is a Floquet eigenvector for the eigenvalue -1.

References

  • Kuznetsov

    Yu. A. Kuznetsov, "Elements of Applied Bifurcation Theory", 2nd ed., 1998.

  • Kuz2

    Kuznetsov et al., “Numerical Periodic Normalization for Codim 1 Bifurcations of Limit Cycles.”

  • Iooss

    Iooss, "Global Characterization of the Normal Form for a Vector Field near a Closed Orbit.", 1988

diff --git a/dev/periodicOrbit/index.html b/dev/periodicOrbit/index.html index 783a9c00..52d5d0f2 100644 --- a/dev/periodicOrbit/index.html +++ b/dev/periodicOrbit/index.html @@ -2,4 +2,4 @@ Introduction · Bifurcation Analysis in Julia

Periodic orbits computation

Consider the Cauchy problem

\[\frac{du}{dt}=F(u,p).\]

A periodic solution with period $T$ satisfies

\[\begin{align} \frac{du}{dt}&=F(u,p)\\ u(0)&=u(T). -\end{align}\]

We provide 4 methods for computing periodic orbits (PO):

  1. one (Trapezoid) based on finite differences to discretize a Cauchy problem,
  2. one (Collocation) based on orthogonal collocation to discretize a Cauchy problem,
  3. two (Shooting) based on the flow associated to a Cauchy problem.

It is important to understand the pro and cons of each method to compute PO in large dimensions.

Trapezoid method

The Trapezoid method (or the Collocation one) is usually faster than the ones based on Shooting but it requires more memory as it saves the whole orbit. However the main drawback of this method is that the associated linear solver is not "nice", being composed of a cyclic matrix for which no generic Matrix-free preconditioner is known. Hence, the Trapezoid method is often used with an ILU preconditioner which is severely constrained by memory. Also, when the period of the cycle is large, finer time discretization (or mesh adaptation which is not yet implemented) must be employed which is also a limiting factor both in term of memory and preconditioning.

Collocation method

The Collocation method is (for now) the slowest of the three methods implemented for computing periodic orbits. However, it is by far the most precise one. Additionally, the mesh can be automatically adapted during the continuation. The implementation will be improved for large dimensional systems like the Trapezoid method one.

Shooting method

The methods based on Shooting do not share the same drawbacks because the associated linear system is usually well conditioned, at least in the simple shooting case. There are thus often used without preconditioner at all. Even in the case of multiple shooting, this can be alleviated by a simple generic preconditioner based on deflation of eigenvalues (see Linear solvers (LS)). Also, the time stepper will automatically adapt to the stiffness of the problem, putting more time points where needed unlike the method based on finite differences which requires an adaptive (time) meshing to provide a similar property. Finally, we can use parallel Shooting to greatly increase the speed of computation.

The main drawback of the method is to find a fast time stepper, at least to compete with the method based on finite differences. The other drawback is the precision of the method which cannot compete with the collocation method.

Important notes

We regroup here some important notes which are valid for all methods above.

1. Accessing the periodic orbit

In record_from_solution, plot_solution or after the computation of a branch of periodic orbits, how do I obtain the periodic orbit, for plotting purposes for example? If x is the solution from newton for the parameter p, you can obtain the periodic orbit as follows

xtt = get_periodic_orbit(x, p)

where xtt.t contains the time mesh and xtt[:,:] contains the different components. Note that for Trapezoid and collocation methods, calling get_periodic_orbit is essentially free as it is a reshape of x. However, in the case of Shooting methods, this requires recomputing the periodic orbit which can be costly for large scale problems.

2. Finaliser

If you pass a finalise_solution function to continuation, the following occurs:

  1. If the newton solve was successful, we update the phase condition every update_section_every_step
  2. we call the user defined finalizer finalise_solution

3. Record from solution

You can pass your own function to continuation. In the particular case of periodic orbits, the method is called like record_from_solution(x, opt; k...) where opt.p is the current value of the continuation parameter and opt.prob is the current state of the continuation problem. You can then obtain the current periodic orbit using (see above)

xtt = get_periodic_orbit(x, opt.p)

4. Plot solution

Similarly to record_from_solution, the method is called like plot_solution(x, opt; k...) where opt.p is the current value of the continuation parameter and opt.prob is the current state of the continuation problem.

5. Most precise method for Floquet coefficients

The state of the art method is based on a Periodic Schur decomposition. It is available through the package PeriodicSchurBifurcationKit.jl. For more information, have a look at FloquetPQZ.

6. Misc

set_params_po generate_ci_problem generate_solution

+\end{align}\]

We provide 4 methods for computing periodic orbits (PO):

  1. one (Trapezoid) based on finite differences to discretize a Cauchy problem,
  2. one (Collocation) based on orthogonal collocation to discretize a Cauchy problem,
  3. two (Shooting) based on the flow associated to a Cauchy problem.

It is important to understand the pro and cons of each method to compute PO in large dimensions.

Trapezoid method

The Trapezoid method (or the Collocation one) is usually faster than the ones based on Shooting but it requires more memory as it saves the whole orbit. However the main drawback of this method is that the associated linear solver is not "nice", being composed of a cyclic matrix for which no generic Matrix-free preconditioner is known. Hence, the Trapezoid method is often used with an ILU preconditioner which is severely constrained by memory. Also, when the period of the cycle is large, finer time discretization (or mesh adaptation which is not yet implemented) must be employed which is also a limiting factor both in term of memory and preconditioning.

Collocation method

The Collocation method is (for now) the slowest of the three methods implemented for computing periodic orbits. However, it is by far the most precise one. Additionally, the mesh can be automatically adapted during the continuation. The implementation will be improved for large dimensional systems like the Trapezoid method one.

Shooting method

The methods based on Shooting do not share the same drawbacks because the associated linear system is usually well conditioned, at least in the simple shooting case. There are thus often used without preconditioner at all. Even in the case of multiple shooting, this can be alleviated by a simple generic preconditioner based on deflation of eigenvalues (see Linear solvers (LS)). Also, the time stepper will automatically adapt to the stiffness of the problem, putting more time points where needed unlike the method based on finite differences which requires an adaptive (time) meshing to provide a similar property. Finally, we can use parallel Shooting to greatly increase the speed of computation.

The main drawback of the method is to find a fast time stepper, at least to compete with the method based on finite differences. The other drawback is the precision of the method which cannot compete with the collocation method.

Important notes

We regroup here some important notes which are valid for all methods above.

1. Accessing the periodic orbit

In record_from_solution, plot_solution or after the computation of a branch of periodic orbits, how do I obtain the periodic orbit, for plotting purposes for example? If x is the solution from newton for the parameter p, you can obtain the periodic orbit as follows

xtt = get_periodic_orbit(x, p)

where xtt.t contains the time mesh and xtt[:,:] contains the different components. Note that for Trapezoid and collocation methods, calling get_periodic_orbit is essentially free as it is a reshape of x. However, in the case of Shooting methods, this requires recomputing the periodic orbit which can be costly for large scale problems.

2. Finaliser

If you pass a finalise_solution function to continuation, the following occurs:

  1. If the newton solve was successful, we update the phase condition every update_section_every_step
  2. we call the user defined finalizer finalise_solution

3. Record from solution

You can pass your own function to continuation. In the particular case of periodic orbits, the method is called like record_from_solution(x, opt; k...) where opt.p is the current value of the continuation parameter and opt.prob is the current state of the continuation problem. You can then obtain the current periodic orbit using (see above)

xtt = get_periodic_orbit(x, opt.p)

4. Plot solution

Similarly to record_from_solution, the method is called like plot_solution(x, opt; k...) where opt.p is the current value of the continuation parameter and opt.prob is the current state of the continuation problem.

5. Most precise method for Floquet coefficients

The state of the art method is based on a Periodic Schur decomposition. It is available through the package PeriodicSchurBifurcationKit.jl. For more information, have a look at FloquetPQZ.

6. Misc

set_params_po generate_ci_problem generate_solution

diff --git a/dev/periodicOrbitCollocation/index.html b/dev/periodicOrbitCollocation/index.html index 5bed5c5b..eb302ed3 100644 --- a/dev/periodicOrbitCollocation/index.html +++ b/dev/periodicOrbitCollocation/index.html @@ -1,4 +1,4 @@ Collocation · Bifurcation Analysis in Julia

Periodic orbits based on orthogonal collocation

We compute Ntst time slices of a periodic orbit using orthogonal collocation. This is implemented in the structure PeriodicOrbitOCollProblem.

Large scale

The current implementation is optimized for ODE and for large scale problems for which the jacobian is sparse.

The general method is very well exposed in [Dankowicz],[Doedel] and we adopt the notations of [Dankowicz]. However our implementation is based on [Doedel] because it is more economical (less equations) when it enforces the continuity of the solution.

We look for periodic orbits as solutions $(x(0), T)$ of

\[\dot x = T\cdot F(x),\ x(0)=x(1)\in\mathbb R^n.\]

We focus on the differential equality and consider a partition of the time domain

\[0=\tau_{1}<\cdots<\tau_{j}<\cdots<\tau_{N_{tst}+1}=1\]

where the points are referred to as mesh points. On each mesh interval $[\tau_j,\tau_{j+1}]$ for $j=1,\cdots,N_{tst}$, we define the affine transformation

\[\tau=\tau^{(j)}(\sigma):=\tau_{j}+\frac{(1+\sigma)}{2}\left(\tau_{j+1}-\tau_{j}\right), \sigma \in[-1,1].\]

The functions $x^{(j)}$ defined on $[-1,1]$ by $x^{(j)}(\sigma) \equiv x(\tau_j(\sigma))$ satisfies the following equation on $[-1,1]$:

\[\dot x^{(j)} = T\frac{\tau_{j+1}-\tau_j}{2}\cdot F(x^{(j)})\tag{$E_j$}\]

with the continuity equation $x^{(j+1)}(-1) = x^{(j)}(1)$.

We now aim at solving $(E_j)$ by using an approximation with a polynomial of degree $m$. Following [Dankowicz], we define a (uniform) partition:

\[-1=\sigma_{1}<\cdots<\sigma_{i}<\cdots<\sigma_{m+1}=1.\]

The points $\tau_{i,j} = \tau^{(i)}(\sigma_j)$ are called the base points: they serve as collocation points.

The associated $m+1$ Lagrange polynomials of degree $m$ are:

\[\mathcal{L}_{i}(\sigma):=\prod_{k=1, k \neq i}^{m+1} \frac{\sigma-\sigma_{k}}{\sigma_{i}-\sigma_{k}}, i=1, \ldots, m+1.\]

We then introduce the approximation $p_j$ of $x^{(j)}$:

\[\mathcal p_j(\sigma)\equiv \sum\limits_{k=1}^{m+1}\mathcal L_k(\sigma)x_{j,k}\]

and the problem to be solved at the nodes $z_l$, $l=1,\cdots,m$:

\[\forall 1\leq l\leq m,\quad 1\leq j\leq N_{tst},\quad \dot p_j(z_l) = T\frac{\tau_{j+1}-\tau_j}{2}\cdot F(p_j(z_l))\tag{$E_j^2$}.\]

The nodes $(z_l)$ are associated with a Gauss–Legendre quadrature.

In order to have a unique solution, we need to remove the phase freedom. This is done by imposing a phase condition.

Number of unknowns

Putting the period unknown aside, we have to find the $x_{j,k}$ which gives $n\times N_{tst}\times (m+1)$ unknowns.

The equations $E_j^2$ provides $n\times N_{tst}\times m$ plus the $(N_{tst}-1)\times n$ equations for the continuity equations. This makes a total of $(N_{tst}-1)\times m\times n+n\times N_{tst}\times m = n[N_{tst}(m+1)-1]$ equations to which we add the $n$ equations for the periodic boundary condition. In total, we have

\[n\times N_{tst}\times (m+1)\]

equations which matches the number of unknowns.

Phase condition

To ensure uniqueness of the solution to the functional, we add the following phase condition

\[\frac{1}{T} \int_{0}^{T}\left\langle x(s), \dot x_0(s)\right\rangle d s =0\]

During continuation at step $k$, we use $\frac{1}{T} \int_{0}^{T}\left\langle x(s), \dot x_{k-1}(s)\right\rangle d s$

Discretization of the BVP and jacobian

We only focus on the differential part. Summing up, we obtained the following equations for the $x_{j,l}\in\mathbb R^n$:

\[\sum\limits_{k=1}^{m+1}\mathcal L_k'(z_l)x_{j,k} = F\left(\sum\limits_{k=1}^{m+1}\mathcal L_k(z_l)x_{j,k}\right)\]

The jacobian in the case $m=2$ is given by:

$x_{0,0}$$x_{0,1}$$x_{1,0}$$x_{1,1}$$x_{2,0}$$x_{2,1}$$x_{3,0}$T
$H_{0,0}^0$$H_{0,1}^0$$H_{1,0}^0$*
$H_{0,0}^1$$H_{0,1}^1$$H_{1,0}^1$*
$H_{1,0}^0$$H_{1,1}^0$$H_{2,0}^0$*
$H_{1,0}^1$$H_{1,1}^1$$H_{2,0}^1$*
$H_{2,0}^0$$H_{2,1}^0$$H_{3,0}^0$*
$H_{2,0}^1$$H_{2,1}^1$$H_{3,0}^1$*
$I$$-I$*
********

where

\[H_{k,l}^{l_2} = \mathcal L'_{l_2,l}\cdot I_n - T\frac{\tau_{j+1}-\tau_j}{2}\cdot\mathcal L_{l_2,l}\cdot dF\left(x_{k,l}\right).\]

Interpolation

BifurcationKit.POSolutionType

Structure to encode the solution associated to a functional like ::PeriodicOrbitOCollProblem or ::ShootingProblem. In the particular case of ::PeriodicOrbitOCollProblem, this allows to use the collocation polynomials to interpolate the solution. Hence, if sol::POSolution, one can call

sol = BifurcationKit.POSolution(prob_coll, x)
 sol(t)

on any time t.

Mesh adaptation

The goal of this method[Russell] is to adapt the mesh $\tau_i$ in order to minimize the error. It is particularly helpful near homoclinic solutions where the period diverge. It can also be useful in order to use a smaller $N_{tst}$.

Encoding of the functional

The functional is encoded in the composite type PeriodicOrbitOCollProblem. See the link for more information, in particular on how to access the underlying functional, its jacobian...

Jacobian and linear solvers

We provide many different linear solvers to take advantage of the formulations or the dimensionality. These solvers are available through the argument jacobian in the constructor of PeriodicOrbitOCollProblem. For example, you can pass jacobian = FullSparse(). Note that all the internal solvers and jacobian are set up automatically, you don't need to do anything. However, for the sake of explanation, we detail how this works.

1. DenseAnalytical()

The jacobian is computed with an analytical formula, works for dense matrices. This is the default algorithm.

2. AutoDiffDense()

The jacobian is computed with automatic differentiation, works for dense matrices. Can be used for debugging.

3. FullSparse()

The jacobian is computed with an analytical formula, works for sparse matrices.

3. FullSparseInplace()

The jacobian is computed in place, limiting memory allocations, with an analytical formula when the sparsity of the jacobian of the vector field is constant. This is much faster than FulSparse().

Floquet multipliers computation

We provide two methods to compute the Floquet coefficients.

  • The algorithm (Default) FloquetColl is based on the condensation of parameters described in [Doedel]. It is the fastest method.
  • The algorithm FloquetCollGEV is a simplified version of the procedure described in [Fairgrieve]. It boils down to solving a large generalized eigenvalue problem. There is clearly room for improvements here but this can be used to check the results of the previous method.

These methods allow to detect bifurcations of periodic orbits. It seems to work reasonably well for the tutorials considered here. However they may be imprecise[Lust].

  • The state of the art method is based on a Periodic Schur decomposition. It is available through the package PeriodicSchurBifurcationKit.jl. For more information, have a look at FloquetPQZ.

Computation with newton

BifurcationKit.newtonMethod
newton(probPO, orbitguess, options; kwargs...)
-

This is the Newton Solver for computing a periodic orbit using orthogonal collocation method. Note that the linear solver has to be apropriately set up in options.

Arguments

Similar to newton except that prob is a PeriodicOrbitOCollProblem.

  • prob a problem of type <: PeriodicOrbitOCollProblem encoding the shooting functional G.
  • orbitguess a guess for the periodic orbit.
  • options same as for the regular newton method.

Optional argument

  • jacobian Specify the choice of the linear algorithm, which must belong to (AutoDiffDense(), ). This is used to select a way of inverting the jacobian dG
    • For AutoDiffDense(). The jacobian is formed as a dense Matrix. You can use a direct solver or an iterative one using options. The jacobian is formed inplace.
    • For DenseAnalytical() Same as for AutoDiffDense but the jacobian is formed using a mix of AD and analytical formula.

We provide a simplified call to newton to locate the periodic orbits. newton will look for prob.jacobian in order to select the requested way to compute the jacobian.

The docs for this specific newton are located at newton.

Continuation

We refer to continuation for more information regarding the arguments. continuation will look for prob.jacobian in order to select the requested way to compute the jacobian.

References

  • Dankowicz

    Dankowicz, Harry, and Frank Schilder. Recipes for Continuation. Computational Science and Engineering Series. Philadelphia: Society for Industrial and Applied Mathematics, 2013.

  • Doedel

    Doedel, Eusebius, Herbert B. Keller, and Jean Pierre Kernevez. “NUMERICAL ANALYSIS AND CONTROL OF BIFURCATION PROBLEMS (II): BIFURCATION IN INFINITE DIMENSIONS.” International Journal of Bifurcation and Chaos 01, no. 04 (December 1991): 745–72.

  • Fairgrieve

    Fairgrieve, Thomas F., and Allan D. Jepson. “O. K. Floquet Multipliers.” SIAM Journal on Numerical Analysis 28, no. 5 (October 1991): 1446–62. https://doi.org/10.1137/0728075.

  • Russell

    Russell, R. D., and J. Christiansen. “Adaptive Mesh Selection Strategies for Solving Boundary Value Problems.” SIAM Journal on Numerical Analysis 15, no. 1 (February 1978): 59–80. https://doi.org/10.1137/0715004.

  • Lust

    Lust, Kurt. “Improved Numerical Floquet Multipliers.” International Journal of Bifurcation and Chaos 11, no. 09 (September 2001): 2389–2410. https://doi.org/10.1142/S0218127401003486.

+

This is the Newton Solver for computing a periodic orbit using orthogonal collocation method. Note that the linear solver has to be apropriately set up in options.

Arguments

Similar to newton except that prob is a PeriodicOrbitOCollProblem.

  • prob a problem of type <: PeriodicOrbitOCollProblem encoding the shooting functional G.
  • orbitguess a guess for the periodic orbit.
  • options same as for the regular newton method.

Optional argument

  • jacobian Specify the choice of the linear algorithm, which must belong to (AutoDiffDense(), ). This is used to select a way of inverting the jacobian dG
    • For AutoDiffDense(). The jacobian is formed as a dense Matrix. You can use a direct solver or an iterative one using options. The jacobian is formed inplace.
    • For DenseAnalytical() Same as for AutoDiffDense but the jacobian is formed using a mix of AD and analytical formula.

We provide a simplified call to newton to locate the periodic orbits. newton will look for prob.jacobian in order to select the requested way to compute the jacobian.

The docs for this specific newton are located at newton.

Continuation

We refer to continuation for more information regarding the arguments. continuation will look for prob.jacobian in order to select the requested way to compute the jacobian.

References

  • Dankowicz

    Dankowicz, Harry, and Frank Schilder. Recipes for Continuation. Computational Science and Engineering Series. Philadelphia: Society for Industrial and Applied Mathematics, 2013.

  • Doedel

    Doedel, Eusebius, Herbert B. Keller, and Jean Pierre Kernevez. “NUMERICAL ANALYSIS AND CONTROL OF BIFURCATION PROBLEMS (II): BIFURCATION IN INFINITE DIMENSIONS.” International Journal of Bifurcation and Chaos 01, no. 04 (December 1991): 745–72.

  • Fairgrieve

    Fairgrieve, Thomas F., and Allan D. Jepson. “O. K. Floquet Multipliers.” SIAM Journal on Numerical Analysis 28, no. 5 (October 1991): 1446–62. https://doi.org/10.1137/0728075.

  • Russell

    Russell, R. D., and J. Christiansen. “Adaptive Mesh Selection Strategies for Solving Boundary Value Problems.” SIAM Journal on Numerical Analysis 15, no. 1 (February 1978): 59–80. https://doi.org/10.1137/0715004.

  • Lust

    Lust, Kurt. “Improved Numerical Floquet Multipliers.” International Journal of Bifurcation and Chaos 11, no. 09 (September 2001): 2389–2410. https://doi.org/10.1142/S0218127401003486.

diff --git a/dev/periodicOrbitShooting/index.html b/dev/periodicOrbitShooting/index.html index f706a737..3551b681 100644 --- a/dev/periodicOrbitShooting/index.html +++ b/dev/periodicOrbitShooting/index.html @@ -35,4 +35,4 @@ plot_solution, kwargs... ) -

This is the continuation method for computing a periodic orbit using a (Standard / Poincaré) Shooting method.

Arguments

Similar to continuation except that probPO is either a ShootingProblem or a PoincareShootingProblem. By default, it prints the period of the periodic orbit.

Optional arguments

  • eigsolver specify an eigen solver for the computation of the Floquet exponents, defaults to FloquetQaD
  • jacobian Specify the choice of the linear algorithm, which must belong to [AutoDiffMF(), MatrixFree(), AutodiffDense(), AutoDiffDenseAnalytical(), FiniteDifferences(), FiniteDifferencesMF()]. This is used to select a way of inverting the jacobian dG
    • For MatrixFree(), matrix free jacobian, the jacobian is specified by the user in prob. This is to be used with an iterative solver (e.g. GMRES) to solve the linear system
    • For AutoDiffMF(), we use Automatic Differentiation (AD) to compute the (matrix-free) derivative of x -> prob(x, p) using a directional derivative. This is to be used with an iterative solver (e.g. GMRES) to solve the linear system
    • For AutodiffDense(). Same as for AutoDiffMF but the jacobian is formed as a dense Matrix. You can use a direct solver or an iterative one.
    • For FiniteDifferences(), same as for AutoDiffDense but we use Finite Differences to compute the jacobian of x -> prob(x, p) using the δ = 1e-8 which can be passed as an argument.
    • For AutoDiffDenseAnalytical(). Same as for AutoDiffDense but the jacobian is formed using a mix of AD and analytical formula.
    • For FiniteDifferencesMF(), use Finite Differences to compute the matrix-free jacobian of x -> prob(x, p) using the δ = 1e-8 which can be passed as an argument.

References

  • Lust

    Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust Kurt, 1997.

  • Umbria

    J. S. Umbría and M. Net. Numerical continuation methods for large-scale dissipative dynamical systems. The European Physical Journal Special Topics, 225(13):2465–2486, 2016.

  • Sanchez

    Sánchez, J., M. Net, B. Garcı́a-Archilla, and C. Simó. “Newton–Krylov Continuation of Periodic Orbits for Navier–Stokes Flows.” Journal of Computational Physics 201, no. 1 (November 20, 2004): 13–33. https://doi.org/10.1016/j.jcp.2004.04.018.

  • Waugh

    Waugh, Iain, Simon Illingworth, and Matthew Juniper. “Matrix-Free Continuation of Limit Cycles for Bifurcation Analysis of Large Thermoacoustic Systems.” Journal of Computational Physics 240 (May 2013): 225–47. https://doi.org/10.1016/j.jcp.2012.12.034.

+

This is the continuation method for computing a periodic orbit using a (Standard / Poincaré) Shooting method.

Arguments

Similar to continuation except that probPO is either a ShootingProblem or a PoincareShootingProblem. By default, it prints the period of the periodic orbit.

Optional arguments

  • eigsolver specify an eigen solver for the computation of the Floquet exponents, defaults to FloquetQaD
  • jacobian Specify the choice of the linear algorithm, which must belong to [AutoDiffMF(), MatrixFree(), AutodiffDense(), AutoDiffDenseAnalytical(), FiniteDifferences(), FiniteDifferencesMF()]. This is used to select a way of inverting the jacobian dG
    • For MatrixFree(), matrix free jacobian, the jacobian is specified by the user in prob. This is to be used with an iterative solver (e.g. GMRES) to solve the linear system
    • For AutoDiffMF(), we use Automatic Differentiation (AD) to compute the (matrix-free) derivative of x -> prob(x, p) using a directional derivative. This is to be used with an iterative solver (e.g. GMRES) to solve the linear system
    • For AutodiffDense(). Same as for AutoDiffMF but the jacobian is formed as a dense Matrix. You can use a direct solver or an iterative one.
    • For FiniteDifferences(), same as for AutoDiffDense but we use Finite Differences to compute the jacobian of x -> prob(x, p) using the δ = 1e-8 which can be passed as an argument.
    • For AutoDiffDenseAnalytical(). Same as for AutoDiffDense but the jacobian is formed using a mix of AD and analytical formula.
    • For FiniteDifferencesMF(), use Finite Differences to compute the matrix-free jacobian of x -> prob(x, p) using the δ = 1e-8 which can be passed as an argument.

References

  • Lust

    Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust Kurt, 1997.

  • Umbria

    J. S. Umbría and M. Net. Numerical continuation methods for large-scale dissipative dynamical systems. The European Physical Journal Special Topics, 225(13):2465–2486, 2016.

  • Sanchez

    Sánchez, J., M. Net, B. Garcı́a-Archilla, and C. Simó. “Newton–Krylov Continuation of Periodic Orbits for Navier–Stokes Flows.” Journal of Computational Physics 201, no. 1 (November 20, 2004): 13–33. https://doi.org/10.1016/j.jcp.2004.04.018.

  • Waugh

    Waugh, Iain, Simon Illingworth, and Matthew Juniper. “Matrix-Free Continuation of Limit Cycles for Bifurcation Analysis of Large Thermoacoustic Systems.” Journal of Computational Physics 240 (May 2013): 225–47. https://doi.org/10.1016/j.jcp.2012.12.034.

diff --git a/dev/periodicOrbitTrapeze/index.html b/dev/periodicOrbitTrapeze/index.html index 458a7057..420c0a64 100644 --- a/dev/periodicOrbitTrapeze/index.html +++ b/dev/periodicOrbitTrapeze/index.html @@ -28,4 +28,4 @@ linear_algo, kwargs... ) -

This is the continuation routine for computing a periodic orbit using a functional G based on Finite Differences and a Trapezoidal rule.

Arguments

  • prob::PeriodicOrbitTrapProblem encodes the functional G
  • orbitguess a guess for the periodic orbit where orbitguess[end] is an estimate of the period of the orbit. It could be a vector of size N * M + 1 where M is the number of time slices, N is the dimension of the phase space. This must be compatible with the numbers N, M in prob.
  • alg continuation algorithm
  • contParams same as for the regular continuation method

Keyword arguments

Specify the choice of the jacobian (and linear algorithm), jacobian must belong to [:FullLU, :FullSparseInplace, :Dense, :DenseAD, :BorderedLU, :BorderedSparseInplace, :FullMatrixFree, :BorderedMatrixFree, :FullMatrixFreeAD]. This is used to select a way of inverting the jacobian dG of the functional G.

  • For jacobian = :FullLU, we use the default linear solver based on a sparse matrix representation of dG. This matrix is assembled at each newton iteration. This is the default algorithm.
  • For jacobian = :FullSparseInplace, this is the same as for :FullLU but the sparse matrix dG is updated inplace. This method allocates much less. In some cases, this is significantly faster than using :FullLU. Note that this method can only be used if the sparsity pattern of the jacobian is always the same.
  • For jacobian = :Dense, same as above but the matrix dG is dense. It is also updated inplace. This option is useful to study ODE of small dimension.
  • For jacobian = :DenseAD, evaluate the jacobian using ForwardDiff
  • For jacobian = :BorderedLU, we take advantage of the bordered shape of the linear solver and use a LU decomposition to invert dG using a bordered linear solver.
  • For jacobian = :BorderedSparseInplace, this is the same as for :BorderedLU but the cyclic matrix dG is updated inplace. This method allocates much less. In some cases, this is significantly faster than using :BorderedLU. Note that this method can only be used if the sparsity pattern of the jacobian is always the same.
  • For jacobian = :FullMatrixFree, a matrix free linear solver is used for dG: note that a preconditioner is very likely required here because of the cyclic shape of dG which affects negatively the convergence properties of GMRES.
  • For jacobian = :BorderedMatrixFree, a matrix free linear solver is used but for Jc only (see docs): it means that options.linsolver is used to invert Jc. These two Matrix-Free options thus expose different part of the jacobian dG in order to use specific preconditioners. For example, an ILU preconditioner on Jc could remove the constraints in dG and lead to poor convergence. Of course, for these last two methods, a preconditioner is likely to be required.
  • For jacobian = :FullMatrixFreeAD, the evaluation map of the differential is derived using automatic differentiation. Thus, unlike the previous two cases, the user does not need to pass a Matrix-Free differential.

Note that by default, the method prints the period of the periodic orbit as function of the parameter. This can be changed by providing your record_from_solution argument.

References

  • Uecker

    Uecker, Hannes. Hopf Bifurcation and Time Periodic Orbits with Pde2path – Algorithms and Applications. Communications in Computational Physics 25, no. 3 (2019)

  • Lust

    Lust, Kurt, Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, PhD thesis, 1997.

+

This is the continuation routine for computing a periodic orbit using a functional G based on Finite Differences and a Trapezoidal rule.

Arguments

  • prob::PeriodicOrbitTrapProblem encodes the functional G
  • orbitguess a guess for the periodic orbit where orbitguess[end] is an estimate of the period of the orbit. It could be a vector of size N * M + 1 where M is the number of time slices, N is the dimension of the phase space. This must be compatible with the numbers N, M in prob.
  • alg continuation algorithm
  • contParams same as for the regular continuation method

Keyword arguments

Specify the choice of the jacobian (and linear algorithm), jacobian must belong to [:FullLU, :FullSparseInplace, :Dense, :DenseAD, :BorderedLU, :BorderedSparseInplace, :FullMatrixFree, :BorderedMatrixFree, :FullMatrixFreeAD]. This is used to select a way of inverting the jacobian dG of the functional G.

  • For jacobian = :FullLU, we use the default linear solver based on a sparse matrix representation of dG. This matrix is assembled at each newton iteration. This is the default algorithm.
  • For jacobian = :FullSparseInplace, this is the same as for :FullLU but the sparse matrix dG is updated inplace. This method allocates much less. In some cases, this is significantly faster than using :FullLU. Note that this method can only be used if the sparsity pattern of the jacobian is always the same.
  • For jacobian = :Dense, same as above but the matrix dG is dense. It is also updated inplace. This option is useful to study ODE of small dimension.
  • For jacobian = :DenseAD, evaluate the jacobian using ForwardDiff
  • For jacobian = :BorderedLU, we take advantage of the bordered shape of the linear solver and use a LU decomposition to invert dG using a bordered linear solver.
  • For jacobian = :BorderedSparseInplace, this is the same as for :BorderedLU but the cyclic matrix dG is updated inplace. This method allocates much less. In some cases, this is significantly faster than using :BorderedLU. Note that this method can only be used if the sparsity pattern of the jacobian is always the same.
  • For jacobian = :FullMatrixFree, a matrix free linear solver is used for dG: note that a preconditioner is very likely required here because of the cyclic shape of dG which affects negatively the convergence properties of GMRES.
  • For jacobian = :BorderedMatrixFree, a matrix free linear solver is used but for Jc only (see docs): it means that options.linsolver is used to invert Jc. These two Matrix-Free options thus expose different part of the jacobian dG in order to use specific preconditioners. For example, an ILU preconditioner on Jc could remove the constraints in dG and lead to poor convergence. Of course, for these last two methods, a preconditioner is likely to be required.
  • For jacobian = :FullMatrixFreeAD, the evaluation map of the differential is derived using automatic differentiation. Thus, unlike the previous two cases, the user does not need to pass a Matrix-Free differential.

Note that by default, the method prints the period of the periodic orbit as function of the parameter. This can be changed by providing your record_from_solution argument.

References

  • Uecker

    Uecker, Hannes. Hopf Bifurcation and Time Periodic Orbits with Pde2path – Algorithms and Applications. Communications in Computational Physics 25, no. 3 (2019)

  • Lust

    Lust, Kurt, Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, PhD thesis, 1997.

diff --git a/dev/plotting/index.html b/dev/plotting/index.html index 0e73d98f..7602c3ca 100644 --- a/dev/plotting/index.html +++ b/dev/plotting/index.html @@ -18,4 +18,4 @@ prob = BifurcationProblem(F, [0.8], 1., (@lens _); record_from_solution = (x,p) -> x[1]) opts = ContinuationPar(dsmax = 0.1, dsmin = 1e-3, ds = -0.001, p_min = -1., p_max = 1.) br = continuation(prob, PALC(), opts) -BifurcationKit.plot(br) +BifurcationKit.plot(br) diff --git a/dev/search/index.html b/dev/search/index.html index a6a57fbb..4ad774f1 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · Bifurcation Analysis in Julia

Loading search...

    +Search · Bifurcation Analysis in Julia

    Loading search...

      diff --git a/dev/simplebp/index.html b/dev/simplebp/index.html index 18066a36..fabafb5b 100644 --- a/dev/simplebp/index.html +++ b/dev/simplebp/index.html @@ -1,3 +1,3 @@ Simple branch point · Bifurcation Analysis in Julia

      Simple bifurcation branch point

      References

      The general method is exposed in Golubitsky, Martin, David G Schaeffer, and Ian Stewart. Singularities and Groups in Bifurcation Theory. New York: Springer-Verlag, 1985, VI.1.d page 295

      A simple branch point $(x_0,p_0)$ for the problem $F(x,p)=0$ satisfies $\dim \ker dF(x_0,p_0) = 1$. At such point, we can apply Lyapunov-Schmidt reduction to transform the initial problem in large dimensions to a scalar polynomial ($\delta p \equiv p-p_0$):

      \[a\delta p + z\left(b_1\delta p + \frac{b_2}{2}z + \frac{b_3}{6}z^2\right) = 0 \tag{E}\]

      whose solutions give access to all solutions in a neighborhood of $(x,p)$.

      More precisely, if $\ker dF(x_0,p_0) = \mathbb R\zeta$, one can show that $x_0+z\zeta$ is close to a solution on a new branch, thus satisfying $F(x_0+z\zeta,p_0+\delta p)\approx 0$.

      In the above scalar equation,

      • if $a\neq 0$, this is a Saddle-Node bifurcation
      • if $a=0,b_2\neq 0$, the bifurcation point is a Transcritical one where the bifurcated branch exists on each side of $p$.
      • if $a=0,b_2=0, b_3\neq 0$, the bifurcation point is a Pitchfork one where the bifurcated branch only exists on one side of $p$. If it exists at smaller values then $p$, this is a subcritical Pitchfork bifurcation. In the other case, this is a supercritical Pitchfork bifurcation.

      Normal form computation

      The reduced equation (E) can be automatically computed as follows

      get_normal_form(br::ContResult, ind_bif::Int ;
      -	verbose = false, ζs = nothing, lens = getlens(br))

      where prob is the bifurcation problem. br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type BranchPoint.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      + verbose = false, ζs = nothing, lens = getlens(br))

      where prob is the bifurcation problem. br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type BranchPoint.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      diff --git a/dev/simplehopf/index.html b/dev/simplehopf/index.html index 7e764330..7499626e 100644 --- a/dev/simplehopf/index.html +++ b/dev/simplehopf/index.html @@ -4,4 +4,4 @@ (2 i \omega-\mathbf{J}) \Psi_{200} &=\mathbf{F}_{20}(\zeta, \zeta) \\ -\mathbf{J} \Psi_{110} &=2 \mathbf{F}_{20}(\zeta, \bar{\zeta}). \end{aligned}\]

      and where

      \[\mathbf{F}(x,p)-\mathbf{J}x := \sum_{1\leq q+l\leq p}\mathbf{F}_{ql}(x^{(q)},p^{(l)})+o(\|u\|+\|p\|)^p.\]

      with $\mathbf{F}_{ql}$ a $(q+l)$-linear map.

      Normal form computation

      The normal form (E) is automatically computed as follows

      get_normal_form(br::ContResult, ind_bif::Int ;
      -	verbose = false, ζs = nothing, lens = getlens(br))

      where prob is a bifurcation problem. br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The above call returns an object of type Hopf.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      References

      • Haragus

        Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

      + verbose = false, ζs = nothing, lens = getlens(br))

      where prob is a bifurcation problem. br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The above call returns an object of type Hopf.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      References

      • Haragus

        Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

      diff --git a/dev/tutorials/BrusselatorFF/index.html b/dev/tutorials/BrusselatorFF/index.html index bbeeb2fa..19ee1d92 100644 --- a/dev/tutorials/BrusselatorFF/index.html +++ b/dev/tutorials/BrusselatorFF/index.html @@ -170,4 +170,4 @@ plot = true, verbosity = 3, plot_solution = (x,p ; kw...) -> plot!(x[1:nx];kw...), - normC = x->norm(x,Inf))

      which leads to

      References

      • Tzou

        Tzou, J. C., Y.-P. Ma, A. Bayliss, B. J. Matkowsky, and V. A. Volpert. Homoclinic Snaking near a Codimension-Two Turing-Hopf Bifurcation Point in the Brusselator Model.” Physical Review E 87, no. 2 (February 14, 2013): 022908. https://doi.org/10.1103/PhysRevE.87.022908.

      + normC = x->norm(x,Inf))

      which leads to

      References

      • Tzou

        Tzou, J. C., Y.-P. Ma, A. Bayliss, B. J. Matkowsky, and V. A. Volpert. Homoclinic Snaking near a Codimension-Two Turing-Hopf Bifurcation Point in the Brusselator Model.” Physical Review E 87, no. 2 (February 14, 2013): 022908. https://doi.org/10.1103/PhysRevE.87.022908.

      diff --git a/dev/tutorials/Langmuir/index.html b/dev/tutorials/Langmuir/index.html index cbcbbc93..ecc83798 100644 --- a/dev/tutorials/Langmuir/index.html +++ b/dev/tutorials/Langmuir/index.html @@ -94,55 +94,55 @@ └─────────────┴──────────────────────┴────────────────┘
      scene = plot(X, out.u)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      We then continue the previous guess and find this very nice folded structure with many Hopf bifurcation points.

      # careful here, in order to use Arpack.eig, you need rather big space
       # or compute ~100 eigenvalues
       opts_cont = ContinuationPar(
      @@ -167,542 +167,542 @@
       scene = plot(br, title="N=$N")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      plot(layout = grid(4, 3))
       for (ii, s) in pairs(br.sol)
       	plot!(X, s.x, xlabel = "ν = $(round(s.p,digits=3))", subplot = ii, label="",tickfont = (7, :black), ylims=(-1,1.5))
      @@ -710,412 +710,412 @@
       title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Continuation of Hopf and Fold points

      Let us study the continuation of Hopf and Fold points and show that they merge at a Bogdanov-Takens bifurcation point:

      # compute branch of Fold points from 7th bifurcation point on br
       sn_codim2 = continuation(br, 7, (@lens _.Δx),
       	ContinuationPar(opts_cont, p_min = -2, p_max = 0.12, ds = -0.01, dsmax = 0.01, tol_stability = 1e-8, max_steps = 325, nev=23) ;
      @@ -1149,75 +1149,75 @@ 

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

      Continuation of periodic orbits (FD)

      We would like to compute the branches of periodic solutions from the Hopf points. We do this automatic branch switching as follows

      # parameters for newton
       opt_po = NewtonPar(tol =  1e-10, verbose = true, max_iterations = 50)
       
      @@ -1248,4 +1248,4 @@ 

      and we obtain the following graph. It is interesting to note that the periodic solutions converge to an homoclinic orbit here with a very large period.

      We can do this for the other Hopf points as well. Note that, we have to increase the number of time sections M to improve the convergence to the homoclinic orbits.

      Here are some examples of periodic solutions.

      • Köpf

        Köpf and Thiele, Emergence of the Bifurcation Structure of a Langmuir–Blodgett Transfer Model., 2014

      + normC = norminf)

      and we obtain the following graph. It is interesting to note that the periodic solutions converge to an homoclinic orbit here with a very large period.

      We can do this for the other Hopf points as well. Note that, we have to increase the number of time sections M to improve the convergence to the homoclinic orbits.

      Here are some examples of periodic solutions.

      • Köpf

        Köpf and Thiele, Emergence of the Bifurcation Structure of a Langmuir–Blodgett Transfer Model., 2014

      diff --git a/dev/tutorials/Swift-Hohenberg1d/index.html b/dev/tutorials/Swift-Hohenberg1d/index.html index 75544f84..72bacde3 100644 --- a/dev/tutorials/Swift-Hohenberg1d/index.html +++ b/dev/tutorials/Swift-Hohenberg1d/index.html @@ -93,4 +93,4 @@ - # 3, bp at λ ≈ +0.48386330 ∈ (+0.48386287, +0.48386330), |δp|=4e-07, [converged], δ = ( 1, 0), step = 43, eigenelements in eig[ 44], ind_ev = 3 - # 4, bp at λ ≈ +0.53115107 ∈ (+0.53070912, +0.53115107), |δp|=4e-04, [converged], δ = ( 1, 0), step = 47, eigenelements in eig[ 48], ind_ev = 4 - # 5, bp at λ ≈ +0.86889123 ∈ (+0.86887742, +0.86889123), |δp|=1e-05, [converged], δ = ( 1, 0), step = 71, eigenelements in eig[ 72], ind_ev = 5 -- # 6, endpoint at λ ≈ +1.00000000, step = 81

      We can access the different branches with BK.getBranch(diagram, (1,)). Alternatively, you can plot a specific branch:

      plot(diagram; code = (1,), plotfold = false,  markersize = 2, putspecialptlegend = false, xlims=(-1,1))

      References

      +- # 6, endpoint at λ ≈ +1.00000000, step = 81

      We can access the different branches with BK.getBranch(diagram, (1,)). Alternatively, you can plot a specific branch:

      plot(diagram; code = (1,), plotfold = false,  markersize = 2, putspecialptlegend = false, xlims=(-1,1))

      References

      diff --git a/dev/tutorials/autocatalytic/index.html b/dev/tutorials/autocatalytic/index.html index e08e431e..4c1efc1f 100644 --- a/dev/tutorials/autocatalytic/index.html +++ b/dev/tutorials/autocatalytic/index.html @@ -114,51 +114,51 @@ println("front speed s = ", front.u[end], ", norm = ", front.u[1:end-1] |> norminf)
      front speed s = -0.2627125504927461, norm = 1.0000000000000002
      plotsol(front.u[1:end-1], title="front solution")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Continuation of front solutions

      Following [Malham], the modulated fronts are solutions of the following DAE

      \[\begin{array}{l}\tag{DAE} u_{t}=a u_{x x}+s\cdot u_x-u f(v)\\ v_{t}=v_{x x}+s\cdot v_x+u f(v)\\ @@ -183,65 +183,65 @@

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

      We have detected a Hopf instability in front dynamics, this will give rise of modulated fronts. Let us try to compute them.

      Branch of modulated fronts

      To branch from the Hopf bifurcation point, we just have to pass the mass matrix as follows:

      # we compute the periodic solutions using Mt time steps and a Trapezoidal time stepper
       # note that we pass the parameter massmatrix which
       # allows to solver the DAE
      @@ -295,198 +295,198 @@ 

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

      Let us plot one modulated front:

      modfront = get_periodic_orbit(br_po, length(br_po))
       plot(plot(modfront.t, modfront.u[end,:], xlabel = "t", ylabel = "s", label = ""),
       	contour(modfront.t, X, modfront.u[1:N,:], color = :viridis, xlabel = "t", title = "u for a = $(round(br_po.sol[length(br_po)].p,digits=4))", fill = true, ylims=(-10,10)))
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -

      References

      • Balmforth

        N. J. Balmforth, R. V. Craster, and S. J. A. Malham. Unsteady fronts in an autocatalytic system. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 455(1984):1401–1433, 1999.

      • Malham

        S. J. A. Malham and M. Oliver. Accelerating fronts in autocatalysis. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 456(1999):1609–1624, 2000.

      • Beyn

        Beyn, Wolf-Jürgen, and Vera Thümmler. “Phase Conditions, Symmetries and PDE Continuation.” In Numerical Continuation Methods for Dynamical Systems: Path Following and Boundary Value Problems Springer Netherlands, 2007. https://doi.org/10.1007/978-1-4020-6356-5_10.

      +

      References

      • Balmforth

        N. J. Balmforth, R. V. Craster, and S. J. A. Malham. Unsteady fronts in an autocatalytic system. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 455(1984):1401–1433, 1999.

      • Malham

        S. J. A. Malham and M. Oliver. Accelerating fronts in autocatalysis. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 456(1999):1609–1624, 2000.

      • Beyn

        Beyn, Wolf-Jürgen, and Vera Thümmler. “Phase Conditions, Symmetries and PDE Continuation.” In Numerical Continuation Methods for Dynamical Systems: Path Following and Boundary Value Problems Springer Netherlands, 2007. https://doi.org/10.1007/978-1-4020-6356-5_10.

      diff --git a/dev/tutorials/autocatalyticAuto/index.html b/dev/tutorials/autocatalyticAuto/index.html index fd2fdae4..797dc652 100644 --- a/dev/tutorials/autocatalyticAuto/index.html +++ b/dev/tutorials/autocatalyticAuto/index.html @@ -125,51 +125,51 @@ norm front = 1.0, speed = 0.26271255049274705
      plotsol(front.u[1:end-1], title="front solution")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Continuation of front solutions

      Following [Malham], the modulated fronts are solutions of the following DAE

      \[\begin{array}{l}\tag{DAE} u_{t}=a u_{x x}+s\cdot u_x-u f(v)\\ v_{t}=v_{x x}+s\cdot v_x+u f(v)\\ @@ -180,67 +180,67 @@

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

      We have detected a Hopf instability in front dynamics, this will give rise of modulated fronts.

      References

      • Balmforth

        N. J. Balmforth, R. V. Craster, and S. J. A. Malham. Unsteady fronts in an autocatalytic system. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 455(1984):1401–1433, 1999.

      • Malham

        S. J. A. Malham and M. Oliver. Accelerating fronts in autocatalysis. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 456(1999):1609–1624, 2000.

      • Beyn

        Beyn, Wolf-Jürgen, and Vera Thümmler. “Phase Conditions, Symmetries and PDE Continuation.” In Numerical Continuation Methods for Dynamical Systems: Path Following and Boundary Value Problems Springer Netherlands, 2007. https://doi.org/10.1007/978-1-4020-6356-5_10.

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

      We have detected a Hopf instability in front dynamics, this will give rise of modulated fronts.

      References

      • Balmforth

        N. J. Balmforth, R. V. Craster, and S. J. A. Malham. Unsteady fronts in an autocatalytic system. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 455(1984):1401–1433, 1999.

      • Malham

        S. J. A. Malham and M. Oliver. Accelerating fronts in autocatalysis. R. Soc. Lond. Proc. Ser. A Math. Phys. Eng. Sci., 456(1999):1609–1624, 2000.

      • Beyn

        Beyn, Wolf-Jürgen, and Vera Thümmler. “Phase Conditions, Symmetries and PDE Continuation.” In Numerical Continuation Methods for Dynamical Systems: Path Following and Boundary Value Problems Springer Netherlands, 2007. https://doi.org/10.1007/978-1-4020-6356-5_10.

      diff --git a/dev/tutorials/cgl1dwave/index.html b/dev/tutorials/cgl1dwave/index.html index a7824eaa..c8004f55 100644 --- a/dev/tutorials/cgl1dwave/index.html +++ b/dev/tutorials/cgl1dwave/index.html @@ -139,51 +139,51 @@ plot!(uold, color = :blue, label="guess") - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Note that in the following code, a generalized eigensolver is automatically created during the call to continuation which properly computes the stability of the wave.

      amplitude(x) = maximum(x) - minimum(x)
       optn = NewtonPar(tol = 1e-8, verbose = true, max_iterations = 10)
       opt_cont_br = ContinuationPar(p_min = 0.015, p_max = 2.5, newton_options = optn, ds= 0.001, dsmax = 0.1, detect_bifurcation = 3, nev = 10, max_steps = 190, n_inversion = 6)
      @@ -198,152 +198,152 @@
       plot(br, br_TW, legend = :bottomright, branchlabel =["","TW"])
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      We note that the branch of travelling wave solutions has a Hopf bifurcation point at which point Modulated Travelling waves will emerge. This will be analyzed in the future.

      References

      • Haragus

        Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

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

      We note that the branch of travelling wave solutions has a Hopf bifurcation point at which point Modulated Travelling waves will emerge. This will be analyzed in the future.

      References

      • Haragus

        Haragus, Mariana, and Gérard Iooss. Local Bifurcations, Center Manifolds, and Normal Forms in Infinite-Dimensional Dynamical Systems. London: Springer London, 2011. https://doi.org/10.1007/978-0-85729-112-7.

      diff --git a/dev/tutorials/detonationEngine/index.html b/dev/tutorials/detonationEngine/index.html index fe135392..be451c24 100644 --- a/dev/tutorials/detonationEngine/index.html +++ b/dev/tutorials/detonationEngine/index.html @@ -101,492 +101,492 @@ Scene = title!("") - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 152
      @@ -639,857 +639,858 @@
       Scene = title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Building the full diagram

      branches = [computeBranch(br, i) for i in 1:3]
       plot(br, branches..., legend=:topleft, xlims = (0.5, 1.25), ylims=(0.5, 2.3))
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      References

      • Koch

        Koch, James, Mitsuru Kurosaka, Carl Knowlen, and J. Nathan Kutz. “Multi-Scale Physics of Rotating Detonation Engines: Autosolitons and Modulational Instabilities.” ArXiv:2003.06655 [Nlin, Physics:Physics], March 14, 2020. http://arxiv.org/abs/2003.06655.

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

      References

      • Koch

        Koch, James, Mitsuru Kurosaka, Carl Knowlen, and J. Nathan Kutz. “Multi-Scale Physics of Rotating Detonation Engines: Autosolitons and Modulational Instabilities.” ArXiv:2003.06655 [Nlin, Physics:Physics], March 14, 2020. http://arxiv.org/abs/2003.06655.

      diff --git a/dev/tutorials/ks1d/index.html b/dev/tutorials/ks1d/index.html index a400e514..23fc242e 100644 --- a/dev/tutorials/ks1d/index.html +++ b/dev/tutorials/ks1d/index.html @@ -64,4 +64,4 @@ )

      Plotting the result can be done using

      plot(diagram; code = (), plotfold = false,  markersize = 3, putspecialptlegend = false,
       	 plotcirclesbif = true, applytoX = x->2/x, vars = (:param, :nrm),
       	 xlim = (0,150), ylim=(0,8))
      -title!("#branches = $(size(diagram))")

      +title!("#branches = $(size(diagram))")

      diff --git a/dev/tutorials/mittelmann/index.html b/dev/tutorials/mittelmann/index.html index 9bc5fdd7..1702826c 100644 --- a/dev/tutorials/mittelmann/index.html +++ b/dev/tutorials/mittelmann/index.html @@ -105,286 +105,286 @@ - # 5, endpoint at λ ≈ +0.02500000, step = 83

      You should see the following result:

      title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      We note several simple bifurcation points for which the dimension of the kernel of the jacobian is one dimensional. In the above box, δ = ( 1, 0) gives the change in the stability. In this case, there is one vector in the kernel which is real. The bifurcation point 2 has a 2d kernel and is thus not amenable to automatic branch switching.

      Automatic branch switching at simple branch points

      We can compute the branch off the third bifurcation point:

      br1 = continuation(br, 3, setproperties(opts_br;ds = 0.001, max_steps = 40); kwargsC...)
       title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      You can also plot the two branches together plot(br, br1, plotfold=false) and get

      scene = plot(br,br1,plotfold=false)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      We continue our journey and compute the branch bifurcating of the first bifurcation point from the last branch we computed:

      br2 = continuation(br1, 1, setproperties(opts_br;ds = 0.001, max_steps = 40); kwargsC...)
       scene = plot(br,br1,br2)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Automatic branch switching at the 2d-branch points

      We now show how to perform automatic branch switching at the nonsimple branch points. However, we think it is important that the user is able to use the previous tools in case automatic branch switching fails. This is explained in the next sections.

      The call for automatic branch switching is the same as in the case of simple branch points (see above) except that many branches are returned.

      branches = continuation(br, 2,
       	setproperties(opts_br; detect_bifurcation = 3, ds = 0.001, p_min = 0.01, max_steps = 30 ) ;
         alg = PALC(tangent = Bordered()),
      @@ -1293,7 +1293,7 @@ 

      scene = plot(br, branches...)

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

      Analysis at the 2d-branch points (manual)

      The second bifurcation point on the branch br of homogeneous solutions has a 2d kernel. we provide two methods to deal with such case

      • automatic local bifurcation diagram (see below)
      • branch switching with deflation (see next section)

      We provide a generic way to study branch points of arbitrary dimensions by computing a reduced equation. The general method is based on a Lyapunov-Schmidt reduction. We can compute the information about the branch point using the generic function (valid for simple branch points, Hopf bifurcation points,...)

      bp2d = get_normal_form(br, 2;  verbose = true, nev = 50)
      Non simple bifurcation point at λ ≈ 0.2725547358342202. 
       Kernel dimension = 2
       Normal form:
      - + -73.8978 * x1 ⋅ p + 0.0045 ⋅ x1³ + 0.0297 ⋅ x1² ⋅ x2 + -0.0192 ⋅ x1 ⋅ x2² + -0.01 ⋅ x2³
      - + -73.8978 * x2 ⋅ p + 0.0099 ⋅ x1³ + -0.0192 ⋅ x1² ⋅ x2 + -0.0297 ⋅ x1 ⋅ x2² + 0.0045 ⋅ x2³
      + + -73.8978 * x1 ⋅ p + -0.0041 ⋅ x1³ + -0.0342 ⋅ x1² ⋅ x2 + 0.0036 ⋅ x1 ⋅ x2² + 0.0115 ⋅ x2³
      + + -73.8978 * x2 ⋅ p + -0.0111 ⋅ x1³ + 0.0066 ⋅ x1² ⋅ x2 + 0.0339 ⋅ x1 ⋅ x2² + -0.0031 ⋅ x2³
       
       

      Note that this is a multivariate polynomials. For more information, see Non-simple branch point.

      You can evaluate this polynomial as follows bp2d(Val(:reducedForm),[0.1,0.2], 0.01) which returns a 2d vector or bp2d([0.1,0.2], 0.01). This last expression actually returns a vector corresponding to the PDE problem.

      You need to solve these equations to compute the bifurcation diagram in the neighborhood of the bifurcation point. In the present case, we do it using brute force. We suggest to use IntervalConstraintProgramming.jl for a more precise way.

      using ProgressMeter
       Nd = 200; L = 0.9
      @@ -1856,4 +1856,4 @@ 

      References

      • Farrell

        Farrell, Patrick E., Casper H. L. Beentjes, and Ásgeir Birkisson. The Computation of Disconnected Bifurcation Diagrams. ArXiv:1603.00809 [Math], March 2, 2016.

      • Wouters

        Wouters. Automatic Exploration Techniques for the Numerical Continuation of Large–Scale Nonlinear Systems, 2019.

      + kwargsC...)

      thereby providing the following bifurcation diagram with plot(br,br1,br2,brdef1, brdef2,plotfold=false, putbifptlegend = false)

      References

      • Farrell

        Farrell, Patrick E., Casper H. L. Beentjes, and Ásgeir Birkisson. The Computation of Disconnected Bifurcation Diagrams. ArXiv:1603.00809 [Math], March 2, 2016.

      • Wouters

        Wouters. Automatic Exploration Techniques for the Numerical Continuation of Large–Scale Nonlinear Systems, 2019.

      diff --git a/dev/tutorials/mittelmannAuto/index.html b/dev/tutorials/mittelmannAuto/index.html index 065c8c94..bab5e0a7 100644 --- a/dev/tutorials/mittelmannAuto/index.html +++ b/dev/tutorials/mittelmannAuto/index.html @@ -123,4 +123,4 @@ callback_newton = cb, finalise_solution = finSol, usedeflation = true, - normC = norminf)

      This gives the following diagram. Using this call, you can pinpoint the particular location where to refine the diagram.

      + normC = norminf)

      This gives the following diagram. Using this call, you can pinpoint the particular location where to refine the diagram.

      diff --git a/dev/tutorials/mittelmannGridap/index.html b/dev/tutorials/mittelmannGridap/index.html index bae86463..ffbc46ea 100644 --- a/dev/tutorials/mittelmannGridap/index.html +++ b/dev/tutorials/mittelmannGridap/index.html @@ -90,4 +90,4 @@ callback_newton = BifurcationKit.cbMaxNorm(100), ) -plot(br, br1, br2, br3...)

      +plot(br, br1, br2, br3...)

      diff --git a/dev/tutorials/ode/Colpitts/index.html b/dev/tutorials/ode/Colpitts/index.html index 73892267..fbebe84e 100644 --- a/dev/tutorials/ode/Colpitts/index.html +++ b/dev/tutorials/ode/Colpitts/index.html @@ -68,72 +68,72 @@ scene = plot(br, vars = (:param, :x1)) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Periodic orbits with Multiple Standard Shooting

      We use shooting to compute periodic orbits: we rely on a fixed point of the flow. To compute the flow, we use DifferentialEquations.jl.

      Thanks to [Lamour], we can just compute the Floquet coefficients to get the nonlinear stability of the periodic orbit. Two period doubling bifurcations are detected.

      Note that we use Automatic Branch Switching from a Hopf bifurcation despite the fact the normal form implemented in BifurcationKit.jl is not valid for DAE. For example, it predicts a subciritical Hopf point whereas we see below that it is supercritical. Nevertheless, it provides a

      using DifferentialEquations
       
       # this is the ODEProblem used with `DiffEqBase.solve`
      @@ -205,51 +205,55 @@ 

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

      and after the bifurcation

      probFreez_ode = ODEProblem(prob_dae, br.specialpoint[1].x .+ 0.01rand(4), (0., 200.), @set par_Colpitts.μ = 0.72)
       
       solFreez = @time solve(probFreez_ode, Rodas4(), progress = true;reltol = 1e-10, abstol = 1e-13)
      @@ -257,49 +261,53 @@ 

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

      References

      • Rabier

        Rabier, Patrick J. “The Hopf Bifurcation Theorem for Quasilinear Differential-Algebraic Equations.” Computer Methods in Applied Mechanics and Engineering 170, no. 3–4 (March 1999): 355–71. https://doi.org/10.1016/S0045-7825(98)00203-5.

      • Lamour

        Lamour, René, Roswitha März, and Renate Winkler. “How Floquet Theory Applies to Index 1 Differential Algebraic Equations.” Journal of Mathematical Analysis and Applications 217, no. 2 (January 1998): 372–94. https://doi.org/10.1006/jmaa.1997.5714.

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

      References

      • Rabier

        Rabier, Patrick J. “The Hopf Bifurcation Theorem for Quasilinear Differential-Algebraic Equations.” Computer Methods in Applied Mechanics and Engineering 170, no. 3–4 (March 1999): 355–71. https://doi.org/10.1016/S0045-7825(98)00203-5.

      • Lamour

        Lamour, René, Roswitha März, and Renate Winkler. “How Floquet Theory Applies to Index 1 Differential Algebraic Equations.” Journal of Mathematical Analysis and Applications 217, no. 2 (January 1998): 372–94. https://doi.org/10.1006/jmaa.1997.5714.

      diff --git a/dev/tutorials/ode/NME-MTK/index.html b/dev/tutorials/ode/NME-MTK/index.html index 315a9836..ebb8877b 100644 --- a/dev/tutorials/ode/NME-MTK/index.html +++ b/dev/tutorials/ode/NME-MTK/index.html @@ -54,124 +54,124 @@ scene = plot(br, plotfold=false, markersize=3, legend=:topleft)

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

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 72
        ├─ Type of vectors: Vector{Float64}
      @@ -226,130 +226,130 @@
       plot!(scene, br_pocoll.param, br_pocoll.min, label = "")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      We plot the maximum (resp. minimum) of the limit cycle. We can see that the min converges to the smallest equilibrium indicating a homoclinic orbit.

      Plot of some of the periodic orbits as function of $E_0$

      We can plot some of the previously computed periodic orbits in the plane $(E,x)$ as function of $E_0$:

      plot()
       # fetch the saved solutions
       for sol in br_pocoll.sol[1:2:40]
      @@ -362,65 +362,65 @@
       title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

      +

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

      diff --git a/dev/tutorials/ode/lorenz84-PO/index.html b/dev/tutorials/ode/lorenz84-PO/index.html index 590c06e8..944c20f1 100644 --- a/dev/tutorials/ode/lorenz84-PO/index.html +++ b/dev/tutorials/ode/lorenz84-PO/index.html @@ -38,111 +38,111 @@ scene = plot(br, plotfold=false, markersize=4, legend=:topleft)

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

      Two parameters curves of Fold / Hopf bifurcation

      We follow the Fold points in the parameter plane $(T,F)$. We tell the solver to consider br.specialpoint[5] and continue it.

      sn_codim2 = continuation(br, 5, (@lens _.T), ContinuationPar(opts_br, p_max = 3.2, p_min = -0.1, detect_bifurcation = 1, dsmin=1e-5, ds = -0.001, dsmax = 0.005, n_inversion = 10, max_steps = 130, max_bisection_steps = 55) ; plot = true,
       	normC = norminf,
       	detect_codim2_bifurcation = 2,
      @@ -161,70 +161,70 @@ 

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

      Fold bifurcations of periodic orbits from Bautin bifurcation

      We compute the branch of Fold of periodic orbits from the Bautin bifurcation (labelled :gh) in the previous figure. In this tutorial, we focus on orthogonal collocation but standard shooting would do too.

      opts_fold_po = ContinuationPar(hp_codim2_1.contparams, dsmax = 0.01, detect_bifurcation = 0, max_steps = 30, detect_event = 0, ds = 0.001, plot_every_step = 10, a = 0.8)
       @set! opts_fold_po.newton_options.verbose = false
       @set! opts_fold_po.newton_options.tol = 1e-8
      @@ -239,72 +239,72 @@ 

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

      NS bifurcations of periodic orbits from Hopf-Hopf bifurcation

      When we computed the curve of Hopf points, we detected a Hopf-Hopf bifurcation. We can branch from it to get the curve of NS points. This is done as follows:

      opts_ns_po = ContinuationPar(hp_codim2_1.contparams, dsmax = 0.02, detect_bifurcation = 1, max_steps = 20, ds = -0.001, detect_event = 0)
       @set! opts_ns_po.newton_options.verbose = false
       @set! opts_ns_po.newton_options.tol = 1e-9
      @@ -329,4 +329,4 @@ 

      References

      • Kuznetsov

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68.

      +plot!(ns_po2, vars=(:F, :T), branchlabel = "NS2")

      References

      • Kuznetsov

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68.

      diff --git a/dev/tutorials/ode/lorenz84/index.html b/dev/tutorials/ode/lorenz84/index.html index 993ce546..ed59c907 100644 --- a/dev/tutorials/ode/lorenz84/index.html +++ b/dev/tutorials/ode/lorenz84/index.html @@ -42,85 +42,85 @@ scene = plot(br, plotfold = false, markersize = 4, legend = :topleft)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 33
        ├─ Type of vectors: Vector{Float64}
      @@ -149,59 +149,59 @@
       scene = plot(sn_codim2, vars=(:X, :U), branchlabel = "Folds", ylims=(-0.5, 0.5))
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      with detailed information

      sn_codim2
       ┌─ Curve type: FoldCont
        ├─ Number of points: 84
        ├─ Type of vectors: Vector{Float64}
      @@ -243,70 +243,70 @@
       ylims!(-0.7,0.7);xlims!(1,1.3)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      hp_codim2_1
       ┌─ Curve type: HopfCont
        ├─ Number of points: 202
        ├─ Type of vectors: Vector{Float64}
      @@ -342,79 +342,79 @@
       ylims!(-0.7,0.75); xlims!(0.95,1.3)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      with detailed information

      hp_from_bt
       ┌─ Curve type: HopfCont from BifurcationKit.ZeroHopf bifurcation point.
        ├─ Number of points: 101
        ├─ Type of vectors: Vector{Float64}
      @@ -440,4 +440,4 @@
       plot!(hp_codim2_1, vars=(:X, :U), branchlabel = "Hopf")
       plot!(hp_from_bt, vars=(:X, :U),  branchlabel = "Hopf2")
       plot!( hp_from_zh, vars=(:X, :U), branchlabel = "Hopf", plotspecialpoints = false, legend = :topleft)
      -ylims!(-0.7,0.75); xlims!(0.95,1.3)

      with detailed information

      hp_from_zh

      References

      • Kuznetsov

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68.

      +ylims!(-0.7,0.75); xlims!(0.95,1.3)

      with detailed information

      hp_from_zh

      References

      • Kuznetsov

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68.

      diff --git a/dev/tutorials/ode/steinmetz/index.html b/dev/tutorials/ode/steinmetz/index.html index 8c0628b9..79f04f7e 100644 --- a/dev/tutorials/ode/steinmetz/index.html +++ b/dev/tutorials/ode/steinmetz/index.html @@ -49,57 +49,57 @@ plot(sol) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Computation with Shooting

      We generate a shooting problem from the computed trajectories and continue the periodic orbits as function of $k_8$

      probsh, cish = generate_ci_problem( ShootingProblem(M=4), prob, prob_de, sol, 16.; reltol = 1e-10, abstol = 1e-12, parallel = true)
       
       opts_po_cont = ContinuationPar(p_min = 0., p_max = 20.0, ds = 0.002, dsmax = 0.05, n_inversion = 8, detect_bifurcation = 3, max_bisection_steps = 25, nev = 4, max_steps = 60, save_eigenvectors = true, tol_stability = 1e-3)
      @@ -112,117 +112,113 @@ 

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

      Curve of Fold points of periodic orbits

      opts_posh_fold = ContinuationPar(br_sh.contparams, detect_bifurcation = 2, max_steps = 35, p_max = 1.9, plot_every_step = 10, dsmax = 4e-2, ds = 1e-2)
       @set! opts_posh_fold.newton_options.tol = 1e-12
       # @set! opts_posh_fold.newton_options.verbose = true
      @@ -240,49 +236,49 @@ 

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

      Curve of NS points of periodic orbits

      opts_posh_ns = ContinuationPar(br_sh.contparams, detect_bifurcation = 0, max_steps = 35, p_max = 1.9, plot_every_step = 10, dsmax = 4e-2, ds = 1e-2)
       @set! opts_posh_ns.newton_options.tol = 1e-12
       # @set! opts_posh_ns.newton_options.verbose = true
      @@ -308,16 +304,16 @@ 

       ┌─ Curve type: PeriodicOrbitCont
        ├─ Number of points: 51
        ├─ Type of vectors: Vector{Float64}
      - ├─ Parameter k8 starts at 0.75, ends at 0.807576304720708
      + ├─ Parameter k8 starts at 0.75, ends at 0.8075736382260658
        ├─ Algo: PALC
        └─ Special points:
       
       If `br` is the name of the branch,
       ind_ev = index of the bifurcating eigenvalue e.g. `br.eig[idx].eigenvals[ind_ev]`
       
      -- #  1,       ns at k8 ≈ +0.82524760 ∈ (+0.82478616, +0.82524760), |δp|=5e-04, [converged], δ = ( 2,  2), step =  18, eigenelements in eig[ 19], ind_ev =   2
      -- #  2,       bp at k8 ≈ +0.84391357 ∈ (+0.84391331, +0.84391357), |δp|=3e-07, [converged], δ = (-1,  0), step =  29, eigenelements in eig[ 30], ind_ev =   2
      -- #  3, endpoint at k8 ≈ +0.80662143,                                                                     step =  51
      +- #  1,       ns at k8 ≈ +0.82524729 ∈ (+0.82478591, +0.82524729), |δp|=5e-04, [converged], δ = ( 2,  2), step =  18, eigenelements in eig[ 19], ind_ev =   2
      +- #  2,       bp at k8 ≈ +0.84391358 ∈ (+0.84391330, +0.84391358), |δp|=3e-07, [converged], δ = (-1,  0), step =  29, eigenelements in eig[ 30], ind_ev =   2
      +- #  3, endpoint at k8 ≈ +0.80661904,                                                                     step =  51
       

      Curve of Fold points of periodic orbits

      opts_pocl_fold = ContinuationPar(br_coll.contparams, detect_bifurcation = 1, plot_every_step = 10, dsmax = 4e-2)
       fold_po_cl = @time continuation(br_coll, 2, (@lens _.k7), opts_pocl_fold;
               # verbosity = 3, plot = true,
      @@ -329,7 +325,7 @@ 

       ┌─ Curve type: FoldPeriodicOrbitCont
      - ├─ Number of points: 48
      + ├─ Number of points: 38
        ├─ Type of vectors: BorderedArray{Vector{Float64}, Float64}
        ├─ Parameter k7 starts at 1.5, ends at 2.0
        ├─ Algo: PALC
      @@ -338,8 +334,8 @@ 

      Curve of NS points of periodic orbits

      opts_pocl_ns = ContinuationPar(br_coll.contparams, detect_bifurcation = 1, plot_every_step = 10, dsmax = 4e-2)
       ns_po_cl = continuation(br_coll, 1, (@lens _.k7), opts_pocl_ns;
               # verbosity = 3, plot = true,
      @@ -349,4 +345,4 @@ 

      plot(ns_po_cl, fold_po_cl, branchlabel = ["NS","Fold"])
      + )

      plot(ns_po_cl, fold_po_cl, branchlabel = ["NS","Fold"])
      diff --git a/dev/tutorials/ode/tutorialCO/index.html b/dev/tutorials/ode/tutorialCO/index.html index 2b18c907..a5c32acd 100644 --- a/dev/tutorials/ode/tutorialCO/index.html +++ b/dev/tutorials/ode/tutorialCO/index.html @@ -45,157 +45,157 @@ scene = plot(br, xlims = (0.8,1.8)) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Continuation of Fold points

      We follow the Fold points in the parameter plane $(q_2, k)$. We tell the solver to consider br.specialpoint[2] and continue it.

      sn_codim2 = continuation(br, 2, (@lens _.k),
       	ContinuationPar(opts_br, p_max = 2.2, ds = -0.001, dsmax = 0.05);
       	normC = norminf,
      @@ -209,167 +209,167 @@ 

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

      Continuation of Hopf points

      We tell the solver to consider br.specialpoint[1] and continue it.

      hp_codim2 = continuation(br, 1, (@lens _.k),
       	ContinuationPar(opts_br, p_max = 2.8, ds = -0.001, dsmax = 0.025) ;
       	normC = norminf,
      @@ -382,4 +382,4 @@ 

      References

      • Govaerts

        Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

      +plot!(scene, br, xlims = (0.6, 1.5))

      References

      • Govaerts

        Govaerts, Willy J. F. Numerical Methods for Bifurcations of Dynamical Equilibria. Philadelphia, Pa: Society for Industrial and Applied Mathematics, 2000.

      diff --git a/dev/tutorials/ode/tutorialPP2/index.html b/dev/tutorials/ode/tutorialPP2/index.html index 66c2b406..202a7080 100644 --- a/dev/tutorials/ode/tutorialPP2/index.html +++ b/dev/tutorials/ode/tutorialPP2/index.html @@ -44,409 +44,409 @@ scene = plot(diagram; code = (), title="$(size(diagram)) branches", legend = false)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Branch of periodic orbits with collocation method

      As you can see on the diagram, there is a Hopf bifurcation indicated by a red dot. Let us compute the periodic orbit branching from the Hopf point.

      We first find the branch

      # branch of the diagram with Hopf point
       brH = get_branch(diagram, (2,1)).γ
      @@ -475,518 +475,518 @@ 

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

      Let us now plot an orbit

      # extract the different components
       orbit = get_periodic_orbit(br_po, 30)
       plot(orbit.t, orbit[1,:]; label = "u1", markersize = 2)
       plot!(orbit.t, orbit[2,:]; label = "u2", xlabel = "time", title = "period = $(orbit.t[end])")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/ode/tutorials1/index.html b/dev/tutorials/ode/tutorials1/index.html index cef1aa33..d6cbb186 100644 --- a/dev/tutorials/ode/tutorials1/index.html +++ b/dev/tutorials/ode/tutorials1/index.html @@ -30,575 +30,575 @@ │ 3 │ 2.4336e-06 │ 1 │ │ 4 │ 6.7452e-12 │ 1 │ └─────────────┴──────────────────────┴────────────────┘ - 0.000840 seconds (362 allocations: 2.302 MiB)

      Note that, in this case, we did not give the Jacobian. It was computed internally using Automatic Differentiation.

      We can perform numerical continuation w.r.t. the parameter $\alpha$. This time, we need to provide additional parameters, but now for the continuation method:

      optcont = ContinuationPar(max_steps = 150,
      +  0.036151 seconds (362 allocations: 2.302 MiB, 96.60% gc time)

      Note that, in this case, we did not give the Jacobian. It was computed internally using Automatic Differentiation.

      We can perform numerical continuation w.r.t. the parameter $\alpha$. This time, we need to provide additional parameters, but now for the continuation method:

      optcont = ContinuationPar(max_steps = 150,
       	p_min = 0., p_max = 4.2,
       	newton_options =optnewton)

      Next, we call the continuation routine as follows.

      br = continuation(prob, PALC(), optcont; plot = true)
       nothing #hide

      The parameter axis lens = @lens _.α is used to extract the component of par corresponding to α. Internally, it is used as get(par, lens) which returns 3.3.

      Tip

      We don't need to call newton first in order to use continuation.

      You should see

      scene = title!("") #hide
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      The left figure is the norm of the solution as function of the parameter $p=\alpha$, the y-axis can be changed by passing a different record_from_solution to BifurcationProblem. The top right figure is the value of $\alpha$ as function of the iteration number. The bottom right is the solution for the current value of the parameter. This last plot can be modified by changing the argument plot_solution to BifurcationProblem.

      Bif. point detection

      Two Fold points were detected. This can be seen by looking at show(br) or br.specialpoint, by the black dots on the continuation plots when doing plot(br, plotfold=true) or by typing br in the REPL. Note that the bifurcation points are located in br.specialpoint.

      What if we want to compute to continue both ways in one call?

      br = continuation(prob, PALC(), optcont; bothside = true)
       plot(br)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/ode/tutorialsBasic1/index.html b/dev/tutorials/ode/tutorialsBasic1/index.html index 7708363c..264db1f0 100644 --- a/dev/tutorials/ode/tutorialsBasic1/index.html +++ b/dev/tutorials/ode/tutorialsBasic1/index.html @@ -40,113 +40,113 @@ scene = plot(br, legend=:topleft)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 61
        ├─ Type of vectors: Vector{Float64}
      @@ -175,48 +175,48 @@
       scene = plot(br, plotfold=true)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

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

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

      diff --git a/dev/tutorials/ode/tutorialsCodim2PO/index.html b/dev/tutorials/ode/tutorialsCodim2PO/index.html index 80f507e8..5c2e63d4 100644 --- a/dev/tutorials/ode/tutorialsCodim2PO/index.html +++ b/dev/tutorials/ode/tutorialsCodim2PO/index.html @@ -35,53 +35,53 @@ plot(sol)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Utility functions

      We start with two helper functions that record and plot the periodic orbits. The following works for shooting, collocation and trapezoid methods for computing periodic orbits.

      argspo = (record_from_solution = (x, p) -> begin
       		xtt = get_periodic_orbit(p.prob, x, p.p)
       		return (max = maximum(xtt[1,:]),
      @@ -106,101 +106,101 @@ 

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

      We continue w.r.t. to $\epsilon$ and find a period-doubling bifurcation.

      prob2 = @set probtrap.prob_vf.lens = @lens _.ϵ
       brpo_pd = continuation(prob2, ci, PALC(), opts_po_cont;
       	argspo...
      @@ -208,108 +208,108 @@ 

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

      Periodic orbits with parallel standard shooting

      We are now ready to build a periodic orbit problem from a solution sol::ODEProblem.

      probsh, cish = generate_ci_problem( ShootingProblem(M=3),
       	prob, prob_de, sol, 2.; alg = Rodas5())
       
      @@ -321,101 +321,101 @@ 

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

      We continue w.r.t. to $\epsilon$ and find a period-doubling bifurcation.

      probsh2 = @set probsh.lens = @lens _.ϵ
       brpo_pd_sh = continuation(probsh2, cish, PALC(), opts_po_cont;
       	argspo...
      @@ -423,108 +423,108 @@ 

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

      Periodic orbits with orthogonal collocation

      We do the same as in the previous section but using orthogonal collocation. This is the most reliable and precise method for ODE. When the dimension of the ODE is large, it becomes prohibitive.

      # this is the function which builds probcoll from sol
       probcoll, ci = generate_ci_problem(PeriodicOrbitOCollProblem(26, 3),
       	prob, sol, 2.)
      @@ -536,101 +536,101 @@ 

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

      We continue w.r.t. to $\epsilon$ and find a period-doubling bifurcation.

      prob2 = @set probcoll.prob_vf.lens = @lens _.ϵ
       brpo_pd = continuation(prob2, ci, PALC(), ContinuationPar(opts_po_cont, dsmax = 5e-3);
       	argspo...
      @@ -639,98 +639,98 @@ 

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

      Continuation of Fold / PD of periodic orbits with Shooting

      We continue the previously detected fold/period-doubling bifurcations as function of two parameters and detect codim 2 bifurcations. We first start with the computation of the curve of Folds.

      opts_posh_fold = ContinuationPar(br_fold_sh.contparams, detect_bifurcation = 3, max_steps = 100, p_min = 0.01, p_max = 1.2)
       @set! opts_posh_fold.newton_options.tol = 1e-12
       
      @@ -790,4 +790,4 @@ 

      References

      • Kuznetsov

        Yu.A. Kuznetsov, S. Muratori, and S. Rinaldi. Bifurcations and chaos in a periodic predator-prey model, Internat. J. Bifur. Chaos Appl. Sci. Engr., 2 (1992), 117-128.

      +plot!(pd_po_sh2, vars = (:ϵ, :b0), branchlabel = "PD")

      References

      • Kuznetsov

        Yu.A. Kuznetsov, S. Muratori, and S. Rinaldi. Bifurcations and chaos in a periodic predator-prey model, Internat. J. Bifur. Chaos Appl. Sci. Engr., 2 (1992), 117-128.

      diff --git a/dev/tutorials/ode/tutorialsODE-PD/index.html b/dev/tutorials/ode/tutorialsODE-PD/index.html index 0386799a..57f8c811 100644 --- a/dev/tutorials/ode/tutorialsODE-PD/index.html +++ b/dev/tutorials/ode/tutorialsODE-PD/index.html @@ -35,251 +35,251 @@ scene = plot(br)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 200
        ├─ Type of vectors: Vector{Float64}
      @@ -323,327 +323,327 @@
       scene = plot(br, br_po)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      We provide Automatic Branch Switching from the PD point and computing the bifurcated branch is as simple as:

      # aBS from PD
       br_po_pd = continuation(deepcopy(br_po), 1, setproperties(br_po.contparams, max_steps = 100, dsmax = 0.02, plot_every_step = 10, ds = 0.005);
       	# plot = true, verbosity = 2,
      @@ -661,227 +661,227 @@
       scene = plot(br_po, br_po_pd)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Periodic orbits with Parallel Standard Shooting

      We use a different method to compute periodic orbits: we rely on a fixed point of the flow. To compute the flow, we use DifferentialEquations.jl. This way of computing periodic orbits should be more precise than the previous one. We use a particular instance called multiple shooting which is computed in parallel. This is an additional advantage compared to the previous method. Finally, please note the close similarity to the code of the previous part. As before, we first rely on Hopf aBS.

      using DifferentialEquations
       
       # ODE problem for using DifferentialEquations
      @@ -905,284 +905,284 @@ 

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

      We provide Automatic Branch Switching from the PD point and computing the bifurcated branch is as simple as:

      # aBS from PD
       br_po_pd = continuation(deepcopy(br_po), 1, 
      @@ -1217,337 +1217,337 @@ 

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

      Two period doubling bifurcations were detected. We shall now compute the branch of periodic orbits from these PD points. We do not provide Automatic Branch Switching as we do not have the PD normal form computed for PeriodicOrbitTrapProblem. Hence, it takes some trial and error to find the ampfactor of the PD branch.

      # aBS from PD
       br_po_pd = continuation(deepcopy(br_po), 1, setproperties(br_po.contparams, max_steps = 70);
       	plot = true,
      @@ -1563,439 +1563,439 @@ 

      plot(br, br_po, br_po_pd)

      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/ode/tutorialsODE/index.html b/dev/tutorials/ode/tutorialsODE/index.html index 70f6fcc8..e5cd55dd 100644 --- a/dev/tutorials/ode/tutorialsODE/index.html +++ b/dev/tutorials/ode/tutorialsODE/index.html @@ -36,100 +36,100 @@ scene = plot(br, plotfold=false, markersize=3, legend=:topleft)

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

      With detailed information:

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 42
        ├─ Type of vectors: Vector{Float64}
      @@ -184,988 +184,988 @@
       Scene = title!("")
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

      Periodic orbits with Parallel Standard Shooting

      We use a different method to compute periodic orbits: we rely on a fixed point of the flow. To compute the flow, we use DifferentialEquations.jl. This way of computing periodic orbits should be more precise than the Trapezoid method. We use a particular instance called multiple shooting which is computed in parallel. This is an additional advantage compared to the two previous methods.

      using DifferentialEquations
       
      @@ -1189,2477 +1189,2477 @@ 

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

      Branch of periodic orbits with Trapezoid method

      We then compute the branch of periodic orbits from the last Hopf bifurcation point (on the right). We use finite differences to discretize the problem of finding periodic orbits. Obviously, this will be problematic when the period of the limit cycle grows unbounded close to the homoclinic orbit.

      # continuation parameters
       opts_po_cont = ContinuationPar(opts_br, dsmax = 0.1, ds = 0.004, dsmin = 1e-4,
      @@ -3682,191 +3682,191 @@ 

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

      We plot the maximum (resp. minimum) of the limit cycle. We can see that the min converges to the smallest equilibrium indicating a homoclinic orbit.

      Plot of some of the periodic orbits as function of $E_0$

      We can plot some of the previously computed periodic orbits in the plane $(E,x)$ as function of $E_0$:

      plot()
       # fetch the saved solutions
       for sol in br_potrap.sol[1:2:40]
      @@ -3879,59 +3879,59 @@ 

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

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

      +

      References

      • Cortes

        Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. Muñoz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.

      diff --git a/dev/tutorials/tutorialCarrier/index.html b/dev/tutorials/tutorialCarrier/index.html index e72cf84a..7b94061e 100644 --- a/dev/tutorials/tutorialCarrier/index.html +++ b/dev/tutorials/tutorialCarrier/index.html @@ -63,7 +63,7 @@ │ 5 │ 5.4726e-07 │ 1 │ │ 6 │ 1.2302e-12 │ 1 │ └─────────────┴──────────────────────┴────────────────┘ - 0.000381 seconds (382 allocations: 1.591 MiB)

      First try with automatic bifurcation diagram

      We can start by using our Automatic bifurcation method.

      optcont = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= -0.01, p_min = 0.05, plot_every_step = 10, newton_options = NewtonPar(tol = 1e-8, max_iterations = 20, verbose = true), max_steps = 300, nev = 40)
      +  0.000384 seconds (382 allocations: 1.591 MiB)

      First try with automatic bifurcation diagram

      We can start by using our Automatic bifurcation method.

      optcont = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= -0.01, p_min = 0.05, plot_every_step = 10, newton_options = NewtonPar(tol = 1e-8, max_iterations = 20, verbose = true), max_steps = 300, nev = 40)
       
       diagram = bifurcationdiagram(prob,
           # particular bordered linear solver to use
      @@ -76,244 +76,244 @@
       scene = plot(diagram)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      However, this is a bit disappointing as we only find two branches.

      Second try with deflated continuation

      # deflation operator to hold solutions
       deflationOp = DeflationOperator(2, dot, 1.0, [sol.u])
       
      @@ -344,4 +344,4 @@
         verbosity = 0,
       	)
       
      -plot(br...)

      We obtain the following result which is remarkable because it contains many more disconnected branches which we did not find in the first try.

      +plot(br...)

      We obtain the following result which is remarkable because it contains many more disconnected branches which we did not find in the first try.

      diff --git a/dev/tutorials/tutorials/index.html b/dev/tutorials/tutorials/index.html index c138d45a..d0aa6aae 100644 --- a/dev/tutorials/tutorials/index.html +++ b/dev/tutorials/tutorials/index.html @@ -1,2 +1,2 @@ -Tutorials · Bifurcation Analysis in Julia

      Tutorials

      The tutorials are rated by the following scale of difficulty

      1. 🟢 basic knowledge of (numerical) bifurcation theory (following equilibria / periodic orbits)
      2. 🟡 advanced knowledge of (numerical) bifurcation theory (codim 2 bifurcations of equilibria)
      3. 🟠 high level of knowledge of (numerical) bifurcation theory (codim 2 bifurcations of periodic orbits, tweaking the methods)
      4. 🟤 very advanced tutorial, research level

      There are three levels of automatization of the computation in these tutorials:

      1. fully automatic bifurcation diagram (aBD) computation (only for equilibria): one uses bifurcationdiagram and let it compute the diagram fully automatically. Another possibility is to use deflated continuation.
      2. semi-automatic bifurcation diagram computation: one uses automatic branch switching (aBS) to compute branches at specified bifurcation points
      3. manual bifurcation diagram computation: one does not use automatic branch switching. This has only educational purposes or for complex problems where aBS fails.

      ODE examples

      These examples are specific to ODEs.

      Computation of equilibria

      Codimension 2 bifurcations of equilibria

      Periodic orbits

      We provide some examples focused on the computation of periodic orbits. Here is one where we present the different ways to compute periodic orbits.

      Here is one for aBS from period-doubling bifurcations of periodic orbits

      In the next tutorial, we show how to refine a periodic orbit guess obtained from numerical simulation. We also show how to perform continuation of PD/NS points using Shooting or Collocation.

      In the next tutorial, we showcase the detection of Chenciner bifurcations. This is a relatively advanced tutorial, so we don't give much explanations. The reader should get first familiar with the above simpler examples.

      In the next tutorial, we showcase aBS from Bautin/HH to curve of Fold/NS of periodic orbits.

      Homoclinic orbits

      Based on the package HclinicBifurcationKit.jl and its docs.

      DAE examples

      DDE examples

      See the tutorials of DDEBifurcationKit.jl.

      Examples based on ModelingToolkit

      PDEs: bifurcations of equilibria

      PDEs: automatic bifurcation diagram

      PDEs: bifurcations of periodic orbits

      PDEs based on FEM with Gridap.jl

      Symmetries, freezing, waves, fronts

      +Tutorials · Bifurcation Analysis in Julia

      Tutorials

      The tutorials are rated by the following scale of difficulty

      1. 🟢 basic knowledge of (numerical) bifurcation theory (following equilibria / periodic orbits)
      2. 🟡 advanced knowledge of (numerical) bifurcation theory (codim 2 bifurcations of equilibria)
      3. 🟠 high level of knowledge of (numerical) bifurcation theory (codim 2 bifurcations of periodic orbits, tweaking the methods)
      4. 🟤 very advanced tutorial, research level

      There are three levels of automatization of the computation in these tutorials:

      1. fully automatic bifurcation diagram (aBD) computation (only for equilibria): one uses bifurcationdiagram and let it compute the diagram fully automatically. Another possibility is to use deflated continuation.
      2. semi-automatic bifurcation diagram computation: one uses automatic branch switching (aBS) to compute branches at specified bifurcation points
      3. manual bifurcation diagram computation: one does not use automatic branch switching. This has only educational purposes or for complex problems where aBS fails.

      ODE examples

      These examples are specific to ODEs.

      Computation of equilibria

      Codimension 2 bifurcations of equilibria

      Periodic orbits

      We provide some examples focused on the computation of periodic orbits. Here is one where we present the different ways to compute periodic orbits.

      Here is one for aBS from period-doubling bifurcations of periodic orbits

      In the next tutorial, we show how to refine a periodic orbit guess obtained from numerical simulation. We also show how to perform continuation of PD/NS points using Shooting or Collocation.

      In the next tutorial, we showcase the detection of Chenciner bifurcations. This is a relatively advanced tutorial, so we don't give much explanations. The reader should get first familiar with the above simpler examples.

      In the next tutorial, we showcase aBS from Bautin/HH to curve of Fold/NS of periodic orbits.

      Homoclinic orbits

      Based on the package HclinicBifurcationKit.jl and its docs.

      DAE examples

      DDE examples

      See the tutorials of DDEBifurcationKit.jl.

      Examples based on ModelingToolkit

      PDEs: bifurcations of equilibria

      PDEs: automatic bifurcation diagram

      PDEs: bifurcations of periodic orbits

      PDEs based on FEM with Gridap.jl

      Symmetries, freezing, waves, fronts

      diff --git a/dev/tutorials/tutorials1/index.html b/dev/tutorials/tutorials1/index.html index 0c94f108..8ec593c6 100644 --- a/dev/tutorials/tutorials1/index.html +++ b/dev/tutorials/tutorials1/index.html @@ -29,259 +29,259 @@ │ 3 │ 2.4336e-06 │ 1 │ │ 4 │ 6.7452e-12 │ 1 │ └─────────────┴──────────────────────┴────────────────┘ - 0.001346 seconds (361 allocations: 2.302 MiB)

      Note that, in this case, we did not give the Jacobian. It was computed internally using Automatic Differentiation.

      We can perform numerical continuation w.r.t. the parameter $\alpha$. This time, we need to provide additional parameters, but now for the continuation method:

      optcont = ContinuationPar(dsmin = 0.01, dsmax = 0.2, ds= 0.1, p_min = 0., p_max = 4.2,
      +  0.030108 seconds (361 allocations: 2.302 MiB, 94.86% gc time)

      Note that, in this case, we did not give the Jacobian. It was computed internally using Automatic Differentiation.

      We can perform numerical continuation w.r.t. the parameter $\alpha$. This time, we need to provide additional parameters, but now for the continuation method:

      optcont = ContinuationPar(dsmin = 0.01, dsmax = 0.2, ds= 0.1, p_min = 0., p_max = 4.2,
       	newton_options = NewtonPar(max_iterations = 10, tol = 1e-9))

      Next, we call the continuation routine as follows.

      br = continuation(prob, PALC(), optcont; plot = true)
       nothing #hide

      The parameter axis lens = @lens _.α is used to extract the component of par corresponding to α. Internally, it is used as get(par, lens) which returns 3.3.

      Tip

      We don't need to call newton first in order to use continuation.

      You should see

      scene = title!("") #hide
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      The left figure is the norm of the solution as function of the parameter $p=\alpha$, the y-axis can be changed by passing a different recordFromSolution to BifurcationProblem. The top right figure is the value of $\alpha$ as function of the iteration number. The bottom right is the solution for the current value of the parameter. This last plot can be modified by changing the argument plotSolution to BifurcationProblem.

      Bif. point detection

      Two Fold points were detected. This can be seen by looking at br.specialpoint, by the black dots on the continuation plots when doing plot(br, plotfold=true) or by typing br in the REPL. Note that the bifurcation points are located in br.specialpoint.

      Continuation of Fold points

      We get a summary of the branch by doing

      br
       ┌─ Curve type: EquilibriumCont
        ├─ Number of points: 58
      @@ -310,51 +310,51 @@
       scene = plot(outfoldco, plotfold = true, legend = :bottomright)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Tip

      The performances for computing the curve of Fold is not that great. It is because we use the default solver tailored for ODE. If you pass jacobian_ma = :minaug to the last continuation call, you should see a great improvement in performances.

      Using GMRES or another linear solver

      We continue the previous example but now using Matrix Free methods. The user can pass its own solver by implementing a version of LinearSolver. Some linear solvers have been implemented from KrylovKit.jl and IterativeSolvers.jl (see Linear solvers (LS) for more information), we can use them here. Note that we can also use preconditioners as shown below. The same functionality is present for the eigensolver.

      # derivative of N
       dN(x; a = 0.5, b = 0.01) = (1-b*x^2+2*a*x)/(1+b*x^2)^2
       
      @@ -397,7 +397,7 @@
       │       3     │       2.4336e-06     │       74       │
       │       4     │       5.6275e-12     │       63       │
       └─────────────┴──────────────────────┴────────────────┘
      -  1.152013 seconds (1.43 M allocations: 96.490 MiB, 7.17% gc time, 99.68% compilation time)

      We can improve this computation, i.e. reduce the number of Linear-Iterations, by using a preconditioner

      using SparseArrays
      +  1.210828 seconds (1.43 M allocations: 96.509 MiB, 7.24% gc time, 99.66% compilation time)

      We can improve this computation, i.e. reduce the number of Linear-Iterations, by using a preconditioner

      using SparseArrays
       
       # define preconditioner which is basically Δ
       P = spdiagm(0 => -2 * (n-1)^2 * ones(n), -1 => (n-1)^2 * ones(n-1), 1 => (n-1)^2 * ones(n-1))
      @@ -417,4 +417,4 @@
       │       4     │       4.8929e-09     │        3       │
       │       5     │       5.6333e-12     │        4       │
       └─────────────┴──────────────────────┴────────────────┘
      -  1.225900 seconds (2.37 M allocations: 162.572 MiB, 8.66% gc time, 99.94% compilation time)
      + 1.328342 seconds (2.37 M allocations: 162.584 MiB, 12.74% gc time, 99.94% compilation time)

      diff --git a/dev/tutorials/tutorials1b/index.html b/dev/tutorials/tutorials1b/index.html index 55c74624..9efb11d2 100644 --- a/dev/tutorials/tutorials1b/index.html +++ b/dev/tutorials/tutorials1b/index.html @@ -66,4 +66,4 @@ linear_algo = BorderingBLS(solver = DefaultLS(), check_precision = false), plot_solution = (x, p; kwargs...) -> plot!(x; label = "l = $(length(x))", kwargs...), verbosity = 2, - normC = x -> norm(x, Inf64))

      + normC = x -> norm(x, Inf64))

      diff --git a/dev/tutorials/tutorials2/index.html b/dev/tutorials/tutorials2/index.html index c65d5de1..86eb2b15 100644 --- a/dev/tutorials/tutorials2/index.html +++ b/dev/tutorials/tutorials2/index.html @@ -85,49 +85,49 @@ heatmapsol(sol_hexa.u)

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

      Continuation and bifurcation points

      We can now continue this solution as follows. We want to detect bifurcations along the branches. We thus need an eigensolver. However, if we use an iterative eigensolver, like eig = EigArpack(), it has trouble computing the eigenvalues. One can see that using

      # compute the jacobian
       J0 = dF_sh(sol_hexa.u, par)

      The reason is that the jacobian operator is not very well conditioned unlike its inverse. We thus opt for the shift-invert method (see Eigen solvers (Eig) for more information) with shift 0.1:

      eig = EigArpack(0.1, :LM)
      @@ -1302,4 +1302,4 @@ 

      and using plot(br, br1), we obtain:

      Note that the plot provides the stability of solutions and bifurcation points. Interested readers should consult the associated file example/SH2d-fronts.jl in the example folder.

      Automatic branch switching

      Instead of relying on deflated newton, we can use Branch switching to compute the different branches emanating from the bifurcation point. For example, the following code will perform automatic branch switching from the second bifurcation point of br:

      br2 = continuation(br, 2, setproperties(optcont; ds = -0.001, detect_bifurcation = 3, plot_every_step = 5, max_steps = 170);  nev = 30,
       	plot = true, verbosity = 2,
      -	normC = norminf)

      We can then plot the branches using plot(br, br2, br3) and get

      + normC = norminf)

      We can then plot the branches using plot(br, br2, br3) and get

      diff --git a/dev/tutorials/tutorials2b/index.html b/dev/tutorials/tutorials2b/index.html index 9dbb55c6..1d582f5e 100644 --- a/dev/tutorials/tutorials2b/index.html +++ b/dev/tutorials/tutorials2b/index.html @@ -152,4 +152,4 @@ - # 18, nd at p ≈ +0.00057801 ∈ (-0.00122418, +0.00057801), |δp|=2e-03, [converged], δ = ( 5, 0), step = 64, eigenelements in eig[ 65], ind_ev = 6 - # 19, nd at p ≈ +0.00320921 ∈ (+0.00141327, +0.00320921), |δp|=2e-03, [converged], δ = (10, 0), step = 65, eigenelements in eig[ 66], ind_ev = 16 Fold points: -- # 1, fold at p ≈ -0.21528694 ∈ (-0.21528694, -0.21528694), |δp|=-1e+00, [ guess], δ = ( 0, 0), step = 24, eigenelements in eig[ 24], ind_ev = 0

      +- # 1, fold at p ≈ -0.21528694 ∈ (-0.21528694, -0.21528694), |δp|=-1e+00, [ guess], δ = ( 0, 0), step = 24, eigenelements in eig[ 24], ind_ev = 0 diff --git a/dev/tutorials/tutorials3/index.html b/dev/tutorials/tutorials3/index.html index 699fa3a4..16b75e04 100644 --- a/dev/tutorials/tutorials3/index.html +++ b/dev/tutorials/tutorials3/index.html @@ -94,185 +94,185 @@

      We obtain the following bifurcation diagram with 3 Hopf bifurcation points

      scene = plot(br)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Normal form computation

      We can compute the normal form of the Hopf points as follows

      hopfpt = get_normal_form(br, 1)
      SuperCritical - Hopf bifurcation point at l ≈ 0.5113310149554013.
      -Frequency ω ≈ 2.139499167556016
      -Period of the periodic orbit ≈ 2.9367552006841717
      +Frequency ω ≈ 2.139499167556015
      +Period of the periodic orbit ≈ 2.936755200684173
       Normal form z⋅(iω + a⋅δp + b⋅|z|²):
      -┌─ a = 0.8799951238382536 + 0.5689799445220095im
      -└─ b = -0.0015608102901474186 + 0.0015634810970086492im
      +┌─ a = 0.8799933782352913 + 0.568980483943565im
      +└─ b = -0.00156081029014742 + 0.001563481097008646im
       

      Continuation of Hopf points

      We use the bifurcation points guesses located in br.specialpoint to turn them into precise bifurcation points. For the second one, we have

      # index of the Hopf point in br.specialpoint
       ind_hopf = 2
       
       # newton iterations to compute the Hopf point
       hopfpoint = newton(br, ind_hopf; normN = norminf)
      -BK.converged(hopfpoint) && printstyled(color=:red, "--> We found a Hopf Point at l = ", hopfpoint.u.p[1], ", ω = ", hopfpoint.u.p[2], ", from l = ", br.specialpoint[ind_hopf].param, "\n")
      --> We found a Hopf Point at l = 1.022612527224235, ω = -2.1395092895331214, from l = 1.022612721393132

      We now perform a Hopf continuation with respect to the parameters l, β

      Tip

      You don't need to call newton first in order to use continuation.

      optcdim2 = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= 0.01, p_max = 6.5, p_min = 0.0, newton_options = opt_newton, detect_bifurcation = 0)
      +BK.converged(hopfpoint) && printstyled(color=:red, "--> We found a Hopf Point at l = ", hopfpoint.u.p[1], ", ω = ", hopfpoint.u.p[2], ", from l = ", br.specialpoint[ind_hopf].param, "\n")
      --> We found a Hopf Point at l = 1.022612527215705, ω = -2.1395092895309338, from l = 1.022612721393132

      We now perform a Hopf continuation with respect to the parameters l, β

      Tip

      You don't need to call newton first in order to use continuation.

      optcdim2 = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= 0.01, p_max = 6.5, p_min = 0.0, newton_options = opt_newton, detect_bifurcation = 0)
       
       br_hopf = continuation(br, ind_hopf, (@lens _.β),
       	optcdim2, verbosity = 2,
      @@ -286,45 +286,45 @@ 

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

      Computation of the branch of periodic orbits (Finite differences)

      We now compute the bifurcated branches of periodic solutions from the Hopf points using Periodic orbits based on Trapezoidal rule. One has just to pass a PeriodicOrbitTrapProblem.

      We start by providing a linear solver and some options for the continuation to work

      # automatic branch switching from Hopf point
       opt_po = NewtonPar(tol = 1e-10, verbose = true, max_iterations = 15)
      @@ -357,165 +357,165 @@ 

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

      Using the above call, it is very easy to find the first branches:

      We note that there are several branch points (blue points) on the above diagram. This means that there are additional branches in the neighborhood of these points. We now turn to automatic branch switching on these branches. This functionality, as we shall see, is only provided for PeriodicOrbitTrapProblem.

      Let's say we want to branch from the first branch point of the first curve pink branch. The syntax is very similar to the previous one:

      br_po2 = continuation(
       	# arguments for branch switching
      @@ -1130,4 +1130,4 @@ 

      and you should see:

      References

      • Lust

        Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust, 1997.

      + normC = norminf)

      and you should see:

      References

      • Lust

        Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust, 1997.

      diff --git a/dev/tutorials/tutorials3b/index.html b/dev/tutorials/tutorials3b/index.html index f560ecba..3c13ec9e 100644 --- a/dev/tutorials/tutorials3b/index.html +++ b/dev/tutorials/tutorials3b/index.html @@ -95,126 +95,126 @@

      We obtain the following bifurcation diagram with 3 Hopf bifurcation points

      scene = plot(br)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Normal form computation

      We can compute the normal form of the Hopf points as follows

      hopfpt = get_normal_form(br, 1)
      SuperCritical - Hopf bifurcation point at l ≈ 0.512062980959364.
      -Frequency ω ≈ 2.139470722402076
      -Period of the periodic orbit ≈ 2.9367942460671688
      +Frequency ω ≈ 2.139470722402079
      +Period of the periodic orbit ≈ 2.936794246067165
       Normal form z⋅(iω + a⋅δp + b⋅|z|²):
      -┌─ a = 0.8785663337783514 + 0.5680623590755546im
      -└─ b = -0.0009377741298574535 + 0.000939309535977323im
      +┌─ a = 0.878564296899149 + 0.5680653974586173im
      +└─ b = -0.0009377741298574522 + 0.0009393095359773169im
       

      Continuation of Hopf points

      We use the bifurcation points guesses located in br.specialpoint to turn them into precise bifurcation points. For the second one, we have

      # index of the Hopf point in br.specialpoint
       ind_hopf = 2
       
       # newton iterations to compute the Hopf point
       hopfpoint = newton(br, ind_hopf; normN = norminf)
      -BK.converged(hopfpoint) && printstyled(color=:red, "--> We found a Hopf Point at l = ", hopfpoint.u.p[1], ", ω = ", hopfpoint.u.p[2], ", from l = ", br.specialpoint[ind_hopf].param, "\n")
      --> We found a Hopf Point at l = 1.0239851627522518, ω = -2.139509266083397, from l = 1.0240248633536086

      We now perform a Hopf continuation with respect to the parameters l, β

      Tip

      You don't need to call newton first in order to use continuation.

      optcdim2 = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= 0.01, p_max = 6.5, p_min = 0.0, newton_options = opt_newton, detect_bifurcation = 0)
      +BK.converged(hopfpoint) && printstyled(color=:red, "--> We found a Hopf Point at l = ", hopfpoint.u.p[1], ", ω = ", hopfpoint.u.p[2], ", from l = ", br.specialpoint[ind_hopf].param, "\n")
      --> We found a Hopf Point at l = 1.0239851614209172, ω = -2.1395092589004796, from l = 1.0240248633536086

      We now perform a Hopf continuation with respect to the parameters l, β

      Tip

      You don't need to call newton first in order to use continuation.

      optcdim2 = ContinuationPar(dsmin = 0.001, dsmax = 0.05, ds= 0.01, p_max = 6.5, p_min = 0.0, newton_options = opt_newton, detect_bifurcation = 0)
       br_hopf = continuation(br, ind_hopf, (@lens _.β), optcdim2, normC = norminf, jacobian_ma = :minaug)
       scene = plot(br_hopf)
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +

      Continuation of periodic orbits (Finite differences)

      Here, we perform continuation of periodic orbits branching from the Hopf bifurcation points.We need an educated guess for the periodic orbit which is given by guess_from_hopf:

      # number of time slices
       M = 51
      @@ -242,570 +242,570 @@ 

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

      Finally, we can perform continuation of this periodic orbit using the specialized call continuationPOTrap

      opt_po = @set opt_po.eigsolver = EigArpack(; tol = 1e-5, v0 = rand(2n))
       opts_po_cont = ContinuationPar(dsmin = 0.001, dsmax = 0.03, ds= 0.01,
      @@ -1498,675 +1493,673 @@ 

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

      Deflation for periodic orbit problems

      Looking for periodic orbits branching of bifurcation points, it is very useful to use newton algorithm with deflation. We thus define a deflation operator (see previous example)

      deflationOp = DeflationOperator(2, (x,y) -> dot(x[1:end-1], y[1:end-1]), 1.0, [zero(orbitguess_f)])

      which allows to find periodic orbits different from orbitguess_f. Note that the dot product removes the last component, i.e. the period of the cycle is not considered during this particular deflation. We can now use

      outpo_f = @time newton(poTrap, orbitguess_f, deflationOp, opt_po; normN = norminf)

      Floquet coefficients

      A basic method for computing Floquet coefficients based on the eigenvalues of the monodromy operator is available (see FloquetQaD). It is precise enough to locate bifurcations. Their computation is triggered like in the case of a regular call to continuation:

      opt_po = @set opt_po.eigsolver = DefaultEig()
       opts_po_cont = ContinuationPar(dsmin = 0.001, dsmax = 0.04, ds= -0.01, p_max = 3.0, max_steps = 200, newton_options = opt_po, nev = 5, tol_stability = 1e-6)
      @@ -2370,4 +2363,4 @@ 

      References

      • Lust

        Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust, 1997.

      +- # 4, ns at p ≈ 1.87667870 ∈ (1.86813520, 1.87667870), |δp|=9e-03, [converged], δ = ( 2, 2), step = 32, eigenelements in eig[ 33], ind_ev = 6

      References

      • Lust

        Numerical Bifurcation Analysis of Periodic Solutions of Partial Differential Equations, Lust, 1997.

      diff --git a/dev/tutorials/tutorialsCGL/index.html b/dev/tutorials/tutorialsCGL/index.html index a300fade..57202382 100644 --- a/dev/tutorials/tutorialsCGL/index.html +++ b/dev/tutorials/tutorialsCGL/index.html @@ -94,270 +94,270 @@

      which gives

      scene = plot(br, ylims=(-0.1,0.1))
      - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      Normal form computation

      We compute the Hopf normal form of the first bifurcation point.

      hopfpt = get_normal_form(br, 1)
      SubCritical - Hopf bifurcation point at r ≈ 1.1477761028276166.
      -Frequency ω ≈ 0.9999999999999992
      -Period of the periodic orbit ≈ 6.283185307179591
      +Frequency ω ≈ 1.0000000000000009
      +Period of the periodic orbit ≈ 6.283185307179581
       Normal form z⋅(iω + a⋅δp + b⋅|z|²):
      -┌─ a = 0.9999994007584075 + 2.7358514215569856e-8im
      -└─ b = 0.0048701298701298665 + 0.00048701298701298696im
      +┌─ a = 0.999999376681949 - 1.2405952309339301e-8im
      +└─ b = 0.004870129870129868 + 0.00048701298701298723im
       

      So the Hopf branch is subcritical.

      Codim 2 Hopf continuation

      Having detected 2 hopf bifurcation points, we now continue them in the plane $(\gamma, r)$.

      Before we start the codim 2 continuation, we tell BifurcationKit.jl to use the spectral information start_with_eigen = true because the left eigenvector of the Jacobian is simply not the conjugate of the right one.

      # we perform Hopf continuation of the first Hopf point in br
       ind_hopf = 1
       br_hopf = @time continuation(
      @@ -373,59 +373,59 @@ 

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

      with detailed information

      br_hopf
       ┌─ Curve type: HopfCont
        ├─ Number of points: 46
        ├─ Type of vectors: BorderedArray{Vector{Float64}, Vector{Float64}}
      - ├─ Parameter γ starts at 0.0, ends at 1.0098353536481643
      + ├─ Parameter γ starts at 0.0, ends at 1.009835353648166
        ├─ Algo: PALC
        └─ Special points:
       
      @@ -435,7 +435,7 @@ 

      # find the index of the BT point +

      We can now construct the curve of Fold points branching off the Bogdanov-Takens bifurcation we just detected.

      # find the index of the BT point
       indbt = findfirst(x -> x.type == :bt, br_hopf.specialpoint)
       # branch from the BT point
       brfold = continuation(br_hopf, indbt, setproperties(br_hopf.contparams; detect_bifurcation = 1, max_steps = 20);
      @@ -446,69 +446,7 @@ 

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      Periodic orbits continuation with stability

      Having found two Hopf bifurcation points, we aim at computing the periodic orbits branching from them. Like for the Brusselator example, we need to find some educated guess for the periodic orbits in order to have a successful Newton call.

      The following code is very close to the one explained in the tutorial 1d Brusselator (advanced user) so we won't give too much details here.

      We focus on the first Hopf bifurcation point. Note that, we do not improve the guess for the Hopf bifurcation point, e.g. by calling newtonHopf, as this is not really needed.

      # index of the Hopf point we want to branch from
      +plot(br_hopf, branchlabel = "Hopf"); plot!(brfold, legend = :topleft, branchlabel = "Fold")

      Periodic orbits continuation with stability

      Having found two Hopf bifurcation points, we aim at computing the periodic orbits branching from them. Like for the Brusselator example, we need to find some educated guess for the periodic orbits in order to have a successful Newton call.

      The following code is very close to the one explained in the tutorial 1d Brusselator (advanced user) so we won't give too much details here.

      We focus on the first Hopf bifurcation point. Note that, we do not improve the guess for the Hopf bifurcation point, e.g. by calling newtonHopf, as this is not really needed.

      # index of the Hopf point we want to branch from
       ind_hopf = 1
       
       # number of time slices in the periodic orbit
      @@ -826,4 +764,4 @@ 

      Preconditioner update

      For now, the preconditioner has been precomputed on the CPU which forbids its (efficient) update during continuation of a branch of periodic orbits. This could be improved using ilu0! and friends in CuArrays.

      + record_from_solution = (u, p) -> getAmplitude(poTrapMFGPU, u, par_cgl_gpu), normC = x->maximum(abs.(x)))

      Preconditioner update

      For now, the preconditioner has been precomputed on the CPU which forbids its (efficient) update during continuation of a branch of periodic orbits. This could be improved using ilu0! and friends in CuArrays.

      diff --git a/dev/tutorials/tutorialsCGLShoot/index.html b/dev/tutorials/tutorialsCGLShoot/index.html index f80927b0..7484b450 100644 --- a/dev/tutorials/tutorialsCGLShoot/index.html +++ b/dev/tutorials/tutorialsCGLShoot/index.html @@ -149,4 +149,4 @@ verbosity = 3, plot = true, linear_algo = MatrixFreeBLS(@set ls.N = probSh.M*2n+2), plot_solution = (x, p; kwargs...) -> heatmap!(reshape(x[1:Nx*Ny], Nx, Ny); color=:viridis, kwargs...), - record_from_solution = (u, p) -> BK.getamplitude(probSh, u, (@set par_cgl.r = p.p); ratio = 2), normC = norminf)
      + record_from_solution = (u, p) -> BK.getamplitude(probSh, u, (@set par_cgl.r = p.p); ratio = 2), normC = norminf)

      diff --git a/dev/tutorials/tutorialsPD/index.html b/dev/tutorials/tutorialsPD/index.html index eb0512ec..7b88101a 100644 --- a/dev/tutorials/tutorialsPD/index.html +++ b/dev/tutorials/tutorialsPD/index.html @@ -117,4 +117,4 @@ verbosity = 2, plot = true, linear_algo = MatrixFreeBLS(@set ls.N = probSh.M*n+2), plot_solution = (x, p; kwargs...) -> (BK.plot_periodic_shooting!(x[1:end-1], 1; kwargs...); plot!(br_po_sh; subplot=1, legend=false)), - record_from_solution = (u, p; k...) -> BK.getmaximum(probSh, u, (@set par_br_pd.C = p.p); ratio = 2), normC = norminf)

      and plot it using plot(br_po_sh, br, br_po_sh_pd, label = ""):

      References

      • Aragon

        Aragón, J. L., R. A. Barrio, T. E. Woolley, R. E. Baker, and P. K. Maini. “Nonlinear Effects on Turing Patterns: Time Oscillations and Chaos.” Physical Review E 86, no. 2 (2012)

      + record_from_solution = (u, p; k...) -> BK.getmaximum(probSh, u, (@set par_br_pd.C = p.p); ratio = 2), normC = norminf)

      and plot it using plot(br_po_sh, br, br_po_sh_pd, label = ""):

      References

      • Aragon

        Aragón, J. L., R. A. Barrio, T. E. Woolley, R. E. Baker, and P. K. Maini. “Nonlinear Effects on Turing Patterns: Time Oscillations and Chaos.” Physical Review E 86, no. 2 (2012)

      diff --git a/dev/tutorials/tutorialsSH3d/index.html b/dev/tutorials/tutorialsSH3d/index.html index 29d11f55..8acf9d6a 100644 --- a/dev/tutorials/tutorialsSH3d/index.html +++ b/dev/tutorials/tutorialsSH3d/index.html @@ -160,4 +160,4 @@ contour3dMakie!(ax, br1[i].sol[2].x) ax.protrusions = (0, 0, 0, 10) end - display(fig)

      + display(fig)

      diff --git a/dev/waveEigen/index.html b/dev/waveEigen/index.html index 14703d94..dd84d1f1 100644 --- a/dev/waveEigen/index.html +++ b/dev/waveEigen/index.html @@ -1,2 +1,2 @@ -Eigen Solvers · Bifurcation Analysis in Julia

      Wave stability

      References

      • Beyn

        Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

      • Sandstede

        Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

      +Eigen Solvers · Bifurcation Analysis in Julia

      Wave stability

      References

      • Beyn

        Beyn and Thümmler, Phase Conditions, Symmetries and PDE Continuation.

      • Sandstede

        Sandstede, Björn. “Stability of Travelling Waves.” In Handbook of Dynamical Systems, 2:983–1055. Elsevier, 2002. https://doi.org/10.1016/S1874-575X(02)80039-X.

      diff --git a/dev/zh/index.html b/dev/zh/index.html index 44e72dc1..139d6fd6 100644 --- a/dev/zh/index.html +++ b/dev/zh/index.html @@ -4,4 +4,4 @@ \dot{w}_1= & i \omega_0 w_1+G_{110} w_0 w_1+\frac{1}{2} G_{210} w_0^2 w_1+\frac{1}{2} G_{021} w_1\left|w_1\right|^2 +O\left(\left\|\left(w_0, w_1, \bar{w}_1\right)\right\|^4\right) . \end{aligned}\right.\tag{E}\]

      This normal form is usually computed in order to branch from a Zero-Hopf bifurcation point to curves of Neimark-Sacker bifurcations of periodic orbits (see [Kuznetsov2]). Not all coefficients in (E) are required for this branching procedure, that is why only a subset of the $G_{ijk}$ is returned.

      Normal form computation

      The normal form (E) can be automatically computed as follows

      get_normal_form(br::ContResult, ind_bif::Int ;  
           ζs = nothing, 
      -    lens = getlens(br))

      br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type ZeroHopf.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      References

      • Kuznetsov

        Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

      • Kuznetsov2

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68. https://doi.org/10.1016/j.physd.2008.06.006.

      + lens = getlens(br))

      br is a branch computed after a call to continuation with detection of bifurcation points enabled and ind_bif is the index of the bifurcation point on the branch br. The above call returns a point with information needed to compute the bifurcated branch. For more information about the optional parameters, we refer to get_normal_form. The result returns an object of type ZeroHopf.

      Note

      You should not need to call get_normal_form except if you need the full information about the branch point.

      References

      • Kuznetsov

        Kuznetsov, Yu. A. “Numerical Normalization Techniques for All Codim 2 Bifurcations of Equilibria in ODE’s.” SIAM Journal on Numerical Analysis 36, no. 4 (January 1, 1999): 1104–24. https://doi.org/10.1137/S0036142998335005.

      • Kuznetsov2

        Kuznetsov, Yu A., H. G. E. Meijer, W. Govaerts, and B. Sautois. “Switching to Nonhyperbolic Cycles from Codim 2 Bifurcations of Equilibria in ODEs.” Physica D: Nonlinear Phenomena 237, no. 23 (December 2008): 3061–68. https://doi.org/10.1016/j.physd.2008.06.006.