NSDEBase.jl
This is the documentation of NSDEBase.jl, a Julia package containing common types and utility functions shared by NSDE.jl and its subpackages.
API
All exported types and functions are considered part of the public API, and thus documented in this manual.
NSDEBase.AbstractCache — TypeAn abstract type for caching intermediate computations in AbstractSolvers.
NSDEBase.AbstractInitialValueCache — TypeAn abstract type for caching intermediate computations in AbstractInitialValueSolvers.
NSDEBase.AbstractInitialValueParameters — TypeAn abstract type for parameters in AbstractInitialValueSolvers.
NSDEBase.AbstractInitialValueProblem — TypeAn abstract type for initial value problems (IVPs).
NSDEBase.AbstractInitialValueSolution — TypeAn abstract type for computed solutions of AbstractInitialValueProblems.
NSDEBase.AbstractInitialValueSolver — TypeAn abstract type for numerical solvers of AbstractInitialValueProblems.
NSDEBase.AbstractObject — TypeAn abstract type for all objects in NSDEBase.
NSDEBase.AbstractParameters — TypeAn abstract type for parameters used in AbstractSolvers.
NSDEBase.AbstractProblem — TypeAn abstract type for differential-equation problems.
NSDEBase.AbstractRightHandSide — TypeAn abstract type for right-hand-side (RHS) functions of AbstractInitialValueProblems.
NSDEBase.AbstractSolution — TypeAn abstract type for solutions of AbstractProblems.
NSDEBase.AbstractSolver — TypeAn abstract type for numerical solvers of AbstractProblems.
NSDEBase.InitialValueProblem — TypeInitialValueProblem <: AbstractInitialValueProblemA composite type for an initial-value problem.
Constructors
InitialValueProblem(rhs, u0, tspan)
InitialValueProblem(rhs, u0, t0, tN)
IVP(args...; kwargs...)Arguments
rhs::AbstractRightHandSide: right-hand side functionu0::AbstractVector: initial conditiontspan::Tuple: end limits of time domain
Functions
copy: copy instance of problem with updated parameters
NSDEBase.LinearRightHandSide — TypeLinearRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the form $f(u, t) = L u + g(t)$.
Constructors
LinearRightHandSide(L, g, g!)
LinearRightHandSide(L[, g!_or_g])
LRHS(args...; kwargs...)Arguments
L::AbstractMatrix: $L$, the coefficient termg::Function: $g$, the forcing term, independent of $u$g!::Function: $g$ but in-place
NSDEBase.LinearRightHandSide — Method(rhs::LinearRightHandSide)(u, t)
(rhs::LinearRightHandSide)(du, u, t)returns the derivative du from the solution u and time t.
NSDEBase.NonlinearRightHandSide — TypeNonlinearRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the generic form $f(u, t)$.
Constructors
NonlinearRightHandSide(f, f!, Df, Df!)
NonlinearRightHandSide(f!_or_f, iscomplex=false)
RightHandSide(args...; kwargs...)
RHS(args...; kwargs...)Arguments
f::Function: $f$, the right-hand side functionf!::Function: $f$ but in-placeDf::Function: $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$Df!::Function: $\mathcal{D}f$ but in-place
NSDEBase.NonlinearRightHandSide — Method(rhs::NonlinearRightHandSide)(u, t)
(rhs::NonlinearRightHandSide)(du, u, t)returns the derivative du from the solution u and time t.
NSDEBase.SplitRightHandSide — TypeSplitRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the form $f(u, t) = f_\text{s}(u, t) + f_\text{ns}(u, t)$.
Constructors
SplitRightHandSide(fₛ, fₙₛ)
SRHS(args...; kwargs...)Arguments
fₛ::Union{LinearRightHandSide,NonlinearRightHandSide}: $f_\text{s}$, the stiff part of the right-hand side function $f$fₙₛ::NonlinearRightHandSide}: $f_\text{ns}$, the non-stiff part of the right-hand side function $f$
NSDEBase.SplitRightHandSide — Method(rhs::SplitRightHandSide)(u, t)
(rhs::SplitRightHandSide)(du, u, t)returns the derivative du from the solution u and time t.
Base.copy — Methodcopy(problem, u0, tspan)::InitialValueProblem
copy(problem, u0, t0, tN)::InitialValueProblemreturns a copy of problem with the same rhs but different u0 and tspan.
Base.show — Methodshow(io::IO, object::AbstractObject)prints the full description of an object and its contents to a stream io.
Base.summary — Methodsummary(io::IO, object::AbstractObject)prints the short description of an object to a stream io.
NSDEBase.Dahlquist — FunctionDahlquist(u0=0.5, tspan=(0.0, 1.0); λ=1.0)::InitialValueProblem
Dahlquist(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Dahlquist equation.
NSDEBase.DoublePendulum — FunctionDoublePendulum(u0=[π/4, π/4, 0.0, 0.0], tspan=(0.0, 1.0); μ=1.0, λ=1.0)::InitialValueProblem
DoublePendulum(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the double pendulum problem.
NSDEBase.IVP — MethodInitialValueProblem <: AbstractInitialValueProblemA composite type for an initial-value problem.
Constructors
InitialValueProblem(rhs, u0, tspan)
InitialValueProblem(rhs, u0, t0, tN)
IVP(args...; kwargs...)Arguments
rhs::AbstractRightHandSide: right-hand side functionu0::AbstractVector: initial conditiontspan::Tuple: end limits of time domain
Functions
copy: copy instance of problem with updated parameters
NSDEBase.LRHS — MethodLinearRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the form $f(u, t) = L u + g(t)$.
Constructors
LinearRightHandSide(L, g, g!)
LinearRightHandSide(L[, g!_or_g])
LRHS(args...; kwargs...)Arguments
L::AbstractMatrix: $L$, the coefficient termg::Function: $g$, the forcing term, independent of $u$g!::Function: $g$ but in-place
NSDEBase.Logistic — FunctionLogistic(u0=0.5, tspan=(0.0, 1.0); λ=1.0)::InitialValueProblem
Logistic(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Logistic equation.
NSDEBase.Lorenz — FunctionLorenz(u0=[2.0, 3.0, -14.0], tspan=(0.0, 1.0); σ=10.0, β=8/3, ρ=28.0)::InitialValueProblem
Lorenz(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Lorenz equations.
NSDEBase.Lorenz96 — FunctionLorenz96(u0=[ones(39); 1.01], tspan=(0.0, 1.0); F=8.0)::InitialValueProblem
Lorenz96(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Lorenz-96 equations.
NSDEBase.RHS — MethodNonlinearRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the generic form $f(u, t)$.
Constructors
NonlinearRightHandSide(f, f!, Df, Df!)
NonlinearRightHandSide(f!_or_f, iscomplex=false)
RightHandSide(args...; kwargs...)
RHS(args...; kwargs...)Arguments
f::Function: $f$, the right-hand side functionf!::Function: $f$ but in-placeDf::Function: $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$Df!::Function: $\mathcal{D}f$ but in-place
NSDEBase.RightHandSide — MethodNonlinearRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the generic form $f(u, t)$.
Constructors
NonlinearRightHandSide(f, f!, Df, Df!)
NonlinearRightHandSide(f!_or_f, iscomplex=false)
RightHandSide(args...; kwargs...)
RHS(args...; kwargs...)Arguments
f::Function: $f$, the right-hand side functionf!::Function: $f$ but in-placeDf::Function: $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$Df!::Function: $\mathcal{D}f$ but in-place
NSDEBase.Rössler — FunctionRössler(u0=[2.0, 0.0, 0.0], tspan=(0.0, 1.0); α=0.2, β=0.2, γ=5.7)::InitialValueProblem
Rössler(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Rössler equations.
NSDEBase.SRHS — MethodSplitRightHandSide <: AbstractRightHandSideA composite type for the right-hand side of an InitialValueProblem in the form $f(u, t) = f_\text{s}(u, t) + f_\text{ns}(u, t)$.
Constructors
SplitRightHandSide(fₛ, fₙₛ)
SRHS(args...; kwargs...)Arguments
fₛ::Union{LinearRightHandSide,NonlinearRightHandSide}: $f_\text{s}$, the stiff part of the right-hand side function $f$fₙₛ::NonlinearRightHandSide}: $f_\text{ns}$, the non-stiff part of the right-hand side function $f$
NSDEBase.SimplePendulum — FunctionSimplePendulum(u0=[π/4, 0.0], tspan=(0.0, 2π/3 * √9.81))::InitialValueProblem
SimplePendulum(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the simple pendulum problem.
NSDEBase.VanDerPol — FunctionVanDerPol(u0=[1.0, 0.0], tspan=(0.0, 1.0); μ=1.0)::InitialValueProblem
VanDerPol(u0, t0, tN; kwargs...)::InitialValueProblemreturns an InitialValueProblem for the Van der Pol equation (in first-order form).