Internals
Continuation problem
Definition of continuation problem.
Numerical continuation algorithms find curves in $\mathbb R^{N}$ implicitly defined by
where $H: \mathbb R^{N} \to \mathbb R^{N-1}$.
A continuation problem type (a subtype of AbstractContinuationProblem
) defines problems for such algorithms to solve by providing how to compute:
- $H(u)$:
residual
,residual!
- its derivative $\partial H / \partial u$:
residual_jacobian!
- an initial guess $u_0$:
get_u0
- and computation cache:
get_prob_cache
.
AbstractProblemCache{P <: AbstractContinuationProblem}
Cache for computing $H$ and its Jacobian.
Bifurcations.Continuations.residual
— Function.residual(u, cache) ↦ H
Compute $H(u) \in \mathbb R^{N - 1}$ (aka in-place computation). The definition of $H$ is specified by cache
.
The name residual
of the function is came from the problem we are to solve: i.e., find the set of $u$ such that $H(u) = 0$. Thus, the vector returned by residual(u, cache)
is considered to be a residual.
Arguments
u::AbstractVector
(size:(N,)
)cache::AbstractProblemCache
Bifurcations.Continuations.residual!
— Function.residual!(H, u, cache) ↦ H
Compute $H(u) \in \mathbb R^{N - 1}$ and store the result in H
(aka out-of-place computation). The definition of $H$ is specified by cache
.
See also: residual
Arguments
H::AbstractVector
(size:(N - 1,)
)u::AbstractVector
(size:(N,)
)cache::AbstractProblemCache
Bifurcations.Continuations.residual_jacobian!
— Function.residual_jacobian!(H, J, u, cache) ↦ (H, J)
Compute $H(u)$ and its Jacobian $\partial H / \partial u$.
Arguments
H::AbstractVector
(size:(N - 1,)
) $= H(u)$J::AbstractMatrix
(size:(N - 1, N)
) $= \partial H / \partial u$u::AbstractVector
(size:(N,)
)cache::AbstractProblemCache
Bifurcations.Continuations.isindomain
— Function.isindomain(u, cache) :: Bool
Arguments
u::AbstractVector
(size:(N,)
)cache::AbstractProblemCache
Bifurcations.Continuations.get_prob_cache
— Function.get_prob_cache(prob::AbstractContinuationProblem) :: AbstractProblemCache
Bifurcations.Continuations.get_u0
— Function.get_u0(prob::AbstractContinuationProblem) ↦ u0
Continuation algorithm
Cache for Euler-Newton continuation method.
See AbstractContinuationProblem
for the mathematical setup.
Fields
prob_cache
u
(size:(N,)
)H
(size:(N - 1,)
) $= H(u)$J
(size:(N - 1, N)
) $= \partial H / \partial u$Q
(size:(N - 1, N)
): temporary array for the QR decompositionh::Real
: step sizedirection::Int
: +1 or -1corrector_success::Bool
adaptation_success::Bool
simple_bifurcation::Bool
Bifurcation problem
Fixed point bifurcation problem.
See also: AbstractContinuationProblem
Fields
homotopy::Function
: A function to compute $H(x, t)$ where $H$ is a homotopy $H: \mathbb R^N \times \mathbb R \to \mathbb R^N$. Functionhomotopy
must be callable in one of the following form:homotopy(x, p, t) ↦ H
(returnH
) for mutable state type orhomotopy(H, x, p, t)
(mutateH
) for immutable state type.homotopy_jacobian::Union{Function, Nothing}
: A function to compute $H(x, t)$ and its Jacobian $J = \partial H / \partial (x, t) \in \mathbb R^{N \times (N+1)}$. Functionhomotopy_jacobian
must be callable in one of the following form:homotopy_jacobian(x, p, t) ↦ (H, J)
(return(H, J)
) orhomotopy_jacobian(H, J, x, p, t)
(mutateH
andJ
).u0::Union{AbstractArray, Real}
: Initial state.t0::Real
: Initial parameter.t_domain::Tuple{<:Real, <:Real}
: Range of the parameter.phase_space::Tuple{typeof(u0), typeof(u0)}
: A pair of lower and upper bound of the phase space. Default is unbounded.p
: Model parameter (constants).