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.InitialValueProblemType
InitialValueProblem <: AbstractInitialValueProblem

A 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 function
  • u0::AbstractVector : initial condition
  • tspan::Tuple : end limits of time domain

Functions

  • copy : copy instance of problem with updated parameters
source
NSDEBase.LinearRightHandSideType
LinearRightHandSide <: AbstractRightHandSide

A 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 term
  • g::Function : $g$, the forcing term, independent of $u$
  • g!::Function : $g$ but in-place
source
NSDEBase.LinearRightHandSideMethod
(rhs::LinearRightHandSide)(u, t)
(rhs::LinearRightHandSide)(du, u, t)

returns the derivative du from the solution u and time t.

source
NSDEBase.NonlinearRightHandSideType
NonlinearRightHandSide <: AbstractRightHandSide

A 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 function
  • f!::Function : $f$ but in-place
  • Df::Function : $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$
  • Df!::Function : $\mathcal{D}f$ but in-place
source
NSDEBase.SplitRightHandSideType
SplitRightHandSide <: AbstractRightHandSide

A 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$
source
NSDEBase.SplitRightHandSideMethod
(rhs::SplitRightHandSide)(u, t)
(rhs::SplitRightHandSide)(du, u, t)

returns the derivative du from the solution u and time t.

source
Base.copyMethod
copy(problem, u0, tspan)::InitialValueProblem
copy(problem, u0, t0, tN)::InitialValueProblem

returns a copy of problem with the same rhs but different u0 and tspan.

source
Base.showMethod
show(io::IO, object::AbstractObject)

prints the full description of an object and its contents to a stream io.

source
Base.summaryMethod
summary(io::IO, object::AbstractObject)

prints the short description of an object to a stream io.

source
NSDEBase.DoublePendulumFunction
DoublePendulum(u0=[π/4, π/4, 0.0, 0.0], tspan=(0.0, 1.0); μ=1.0, λ=1.0)::InitialValueProblem
DoublePendulum(u0, t0, tN; kwargs...)::InitialValueProblem

returns an InitialValueProblem for the double pendulum problem.

source
NSDEBase.IVPMethod
InitialValueProblem <: AbstractInitialValueProblem

A 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 function
  • u0::AbstractVector : initial condition
  • tspan::Tuple : end limits of time domain

Functions

  • copy : copy instance of problem with updated parameters
source
NSDEBase.LRHSMethod
LinearRightHandSide <: AbstractRightHandSide

A 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 term
  • g::Function : $g$, the forcing term, independent of $u$
  • g!::Function : $g$ but in-place
source
NSDEBase.LorenzFunction
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...)::InitialValueProblem

returns an InitialValueProblem for the Lorenz equations.

source
NSDEBase.Lorenz96Function
Lorenz96(u0=[ones(39); 1.01], tspan=(0.0, 1.0); F=8.0)::InitialValueProblem
Lorenz96(u0, t0, tN; kwargs...)::InitialValueProblem

returns an InitialValueProblem for the Lorenz-96 equations.

source
NSDEBase.RHSMethod
NonlinearRightHandSide <: AbstractRightHandSide

A 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 function
  • f!::Function : $f$ but in-place
  • Df::Function : $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$
  • Df!::Function : $\mathcal{D}f$ but in-place
source
NSDEBase.RightHandSideMethod
NonlinearRightHandSide <: AbstractRightHandSide

A 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 function
  • f!::Function : $f$ but in-place
  • Df::Function : $\mathcal{D}f$, the Jacobian of $f$ with respect to $u$
  • Df!::Function : $\mathcal{D}f$ but in-place
source
NSDEBase.RösslerFunction
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...)::InitialValueProblem

returns an InitialValueProblem for the Rössler equations.

source
NSDEBase.SRHSMethod
SplitRightHandSide <: AbstractRightHandSide

A 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$
source
NSDEBase.SimplePendulumFunction
SimplePendulum(u0=[π/4, 0.0], tspan=(0.0, 2π/3 * √9.81))::InitialValueProblem
SimplePendulum(u0, t0, tN; kwargs...)::InitialValueProblem

returns an InitialValueProblem for the simple pendulum problem.

source
NSDEBase.VanDerPolFunction
VanDerPol(u0=[1.0, 0.0], tspan=(0.0, 1.0); μ=1.0)::InitialValueProblem
VanDerPol(u0, t0, tN; kwargs...)::InitialValueProblem

returns an InitialValueProblem for the Van der Pol equation (in first-order form).

source