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 — Type
An abstract type for caching intermediate computations in AbstractSolvers.
NSDEBase.AbstractInitialValueCache — Type
An abstract type for caching intermediate computations in AbstractInitialValueSolvers.
NSDEBase.AbstractInitialValueParameters — Type
An abstract type for parameters in AbstractInitialValueSolvers.
NSDEBase.AbstractInitialValueProblem — Type
An abstract type for initial value problems (IVPs).
NSDEBase.AbstractInitialValueSolution — Type
An abstract type for computed solutions of AbstractInitialValueProblems.
NSDEBase.AbstractInitialValueSolver — Type
An abstract type for numerical solvers of AbstractInitialValueProblems.
NSDEBase.AbstractObject — Type
An abstract type for all objects in NSDEBase.
NSDEBase.AbstractParameters — Type
An abstract type for parameters used in AbstractSolvers.
NSDEBase.AbstractProblem — Type
An abstract type for differential-equation problems.
NSDEBase.AbstractRightHandSide — Type
An abstract type for right-hand-side (RHS) functions of AbstractInitialValueProblems.
NSDEBase.AbstractSolution — Type
An abstract type for solutions of AbstractProblems.
NSDEBase.AbstractSolver — Type
An abstract type for numerical solvers of AbstractProblems.
NSDEBase.InitialValueProblem — Type
InitialValueProblem <: 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 — Type
LinearRightHandSide <: 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 — Type
NonlinearRightHandSide <: 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 — Type
SplitRightHandSide <: 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.summary — Method
summary(io::IO, object::AbstractObject)prints the short description of an object to a stream io.
NSDEBase.Dahlquist — Function
Dahlquist(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 — Function
DoublePendulum(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 — Method
InitialValueProblem <: 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 — Method
LinearRightHandSide <: 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 — Function
Logistic(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 — Function
Lorenz(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 — Function
Lorenz96(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 — Method
NonlinearRightHandSide <: 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 — Method
NonlinearRightHandSide <: 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 — Function
Rö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 — Method
SplitRightHandSide <: 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 — Function
SimplePendulum(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 — Function
VanDerPol(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).