# BifurcationKit.jl

This Julia package aims at performing automatic bifurcation analysis of large dimensional equations F(u,λ)=0 where λ∈ℝ.

It incorporates continuation algorithms (PALC, deflated continuation, ...) which provide a predictor $(u_1,p_1)$ from a known solution $(u_0,p_0)$. A Newton-Krylov method is then used to correct this predictor and a Matrix-Free eigensolver is used to compute stability and bifurcation points.

By leveraging on the above method, the package can also seek for periodic orbits of Cauchy problems by casting them into an equation $F(u,p)=0$ of high dimension. It is by now, one of the only softwares which provides shooting methods AND methods based on finite differences to compute periodic orbits.

The current package focuses on large scale nonlinear problems and multiple hardwares. Hence, the goal is to use Matrix Free methods on GPU (see PDE example and Periodic orbit example) or on a cluster to solve non linear PDE, nonlocal problems, compute sub-manifolds...

One design choice is that we try not to require u to be a subtype of an AbstractArray as this would forbid the use of spectral methods like the one from ApproxFun.jl. For now, our implementation does not allow this for Hopf continuation and computation of periodic orbits.

## Installation

This package requires Julia >= v1.3.0 because of the use of methods added to abstract types (see #31916).

] add BifurcationKit

To install the bleeding edge version, please run

] add BifurcationKit#master

## Citing this work

If you use this package for your work, we ask that you cite the following paper!! Open source development strongly depends on this. It is referenced on HAL-Inria as follows:

@misc{veltz:hal-02902346,
TITLE = {{BifurcationKit.jl}},
AUTHOR = {Veltz, Romain},
URL = {https://hal.archives-ouvertes.fr/hal-02902346},
INSTITUTION = {{Inria Sophia-Antipolis}},
YEAR = {2020},
MONTH = Jul,
KEYWORDS = {pseudo-arclength-continuation ; periodic-orbits ; floquet ; gpu ; bifurcation-diagram ; deflation ; newton-krylov},
PDF = {https://hal.archives-ouvertes.fr/hal-02902346/file/354c9fb0d148262405609eed2cb7927818706f1f.tar.gz},
HAL_ID = {hal-02902346},
HAL_VERSION = {v1},
}

## Other softwares

There are many good softwares already available.

• For regular continuation (e.g. in small dimension), most of them are listed on DSWeb. One can mention the venerable AUTO, or also, XPPAUT, MATCONT and COCO.

• For large scale problems, there is the versatile and feature full pde2path but also Trilinos, CL_MATCONTL and the python libraries pyNCT and pacopy.

• For deflated continuation, there is defcont.

In Julia, we have for now a wrapper to PyDSTools, and also Bifurcations.jl.

## A word on performance

The examples which follow have not all been written with the goal of performance but rather simplicity (except maybe Complex Ginzburg-Landau 2d). One could surely turn them into more efficient codes. The intricacies of PDEs make the writing of efficient code highly problem dependent and one should take advantage of every particularity of the problem under study.

For example, in the first tutorial on Temperature model (simplest example for equilibria), one could use BandedMatrices.jl for the jacobian and an inplace modification when the jacobian is called ; using a composite type would be favored. Porting them to GPU would be another option.

## 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.
• Deflated continuation
• Bifurcation points are located using a bisection algorithm
• Branch, Fold, Hopf bifurcation point detection of stationary solutions.
• Automatic branch switching at branch points (whatever the dimension of the kernel)
• Automatic branch switching at simple Hopf points to periodic orbits
• Automatic bifurcation diagram computation
• Fold / Hopf continuation based on Minimally Augmented formulation, with Matrix Free / Sparse Jacobian.
• Periodic orbit computation and continuation using Shooting or Finite Differences.
• Branch, Fold, Neimark-Sacker, Period Doubling bifurcation point detection of periodic orbits.
• Computation and Continuation of Fold of periodic orbits

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

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

FeaturesMatrix FreeCustom stateTutorialGPU
(Deflated) Krylov-NewtonYesYesAllY
Continuation (Natural, Secant, Tangent, Polynomial)YesYesAllY
Branching / Fold / Hopf point detectionYesYesAll / All / LinkY
Hopf continuationYesAbstractArrayLink
Branch switching at Branch / Hopf pointsYesAbstractArrayLinkY
Automatic bifurcation diagram computationYesAbstractArrayLink
Periodic Orbit (FD) Newton / continuationYesAbstractVectorLink, LinkY
Periodic Orbit with Parallel Poincaré / Standard Shooting Newton / continuationYesAbstractArrayLink
Fold, Neimark-Sacker, Period doubling detectionYesAbstractVectorLink
Continuation of Fold of periodic orbitsYesAbstractVectorLinkY

## Requested methods for Custom State

Needless to say, if you use regular arrays, you don't need to worry about what follows.

We make the same requirements than KrylovKit.jl. Hence, we refer to its docs for more information. We additionally require the following methods to be available:

• Base.length(x): it is used in the constraint equation of the pseudo arclength continuation method (see continuation for more details). If length is not available for your "vector", define it length(x) = 1 and adjust tuning the parameter theta in ContinuationPar.
• Base.copyto!(dest, in) this is required to reduce the allocations by avoiding too many copies

## Citations

• Grant, Paul K., et al. "Interpretation of morphogen gradients by a synthetic bistable circuit." Nature communications 11.1 (2020): 1-8.