Bifurcation problems

The idea behind BifurcationKit is to compute bifurcation diagrams in memory limited environments where the device can barely hold the current continuation state. We thus disable by default saving all solutions along the branch and all eigenvectors (see ContinuationPar to change this behavior). Still, one needs to save a few solution indicators, like for plotting. This is the reason for the function record_from_solution (see below).

Generic bifurcation problem

BifurcationProblem is the basic / generic structure for encoding a bifurcation problem ; it holds the following fields:

  • the vector field
  • an initial guess
  • a set of parameters
  • a parameter axis

as well as user defined functions for

  • plotting, plot_solution
  • recording (record_from_solution) indicators about the solution when this one is too large to be saved at every continuation step.

Example

f(x,p) = @. sin(x * p.a)
u0 = zeros(100_000_000) 
params = (a = 1.0, b = 2.0)

# record a few components / indicators about x 
myRecord(x,p;k...) = (x1 = x[1], max = maximum(x), nrm = norm(x, Inf))

prob = BifurcationProblem(f, u0, p, (@optic _.a);
	record_from_solution = myRecord
	)

Problem modification

In case you want to modify an existing problem, you should use the following method

BifurcationKit.re_make โ€” Method
re_make(
    prob;
    u0,
    params,
    lens,
    record_from_solution,
    plot_solution,
    J,
    Jแต—,
    d2F,
    d3F
)

This function changes the fields of a problem ::AbstractBifurcationProblem. For example, you can change the initial condition by doing

re_make(prob; u0 = new_u0)
source

Example

using BifurcationKit
F(x,p) = @. p.a + x^2
# parameters
par = (a = 0., b = 2)
prob = BifurcationProblem(F, zeros(3), par, (@optic _.a))
# change u0
prob2 = BifurcationKit.re_make(prob, u0 = rand(3))
โ”Œโ”€ Bifurcation Problem with uType Vector{Float64}
โ”œโ”€ Inplace: false
โ”œโ”€ Dimension: 3
โ”œโ”€ Symmetric: false
โ””โ”€ Parameter: a

๐Ÿšง๐Ÿšง Automatic option setting (work in progress) ๐Ÿšง๐Ÿšง

Setting the continuation options can be difficult for new comers. In the case of small ODE, we suggest to use ODEBifProblem instead of BifurcationProblem. Indeed, in this case, most continuation options will be set up automatically so that very good performance is achieved.

In the case of BifurcationProblem, the user has to set up these options manually. This can be useful for large scale problems where the specificities of the problem have to be used.