NSDERungeKutta.jl
This is the documentation of NSDERungeKutta.jl, a Julia package implementing Runge-Kutta methods.
API
All exported types and functions are considered part of the public API, and thus documented in this manual.
NSDERungeKutta.AbstractAdaptiveParameters
— TypeAn abstract type for parameters of embedded Runge-Kutta solvers.
NSDERungeKutta.AbstractButcherTableau
— TypeAn abstract type for Butcher tableaus.
NSDERungeKutta.AbstractNewtonParameters
— TypeAn abstract type for parameters of Newton steps in implicit Runge-Kutta solvers.
NSDERungeKutta.AbstractRungeKuttaCache
— TypeAn abstract type for caching intermediate computations in Runge-Kutta solvers.
NSDERungeKutta.AbstractRungeKuttaParameters
— TypeAn abstract type for Runge-Kutta solver parameters.
NSDERungeKutta.AbstractRungeKuttaSolution
— TypeAn abstract type for Runge-Kutta solutions of NSDEBase.AbstractInitialValueProblem
s.
NSDERungeKutta.AbstractRungeKuttaSolver
— TypeAn abstract type for Runge-Kutta solvers of NSDEBase.AbstractInitialValueProblem
s.
NSDERungeKutta.AbstractStepSize
— TypeAn abstract type for time-step sizes, useful for embedded solvers.
NSDERungeKutta.AdaptiveParameters
— TypeAdaptiveParameters <: AbstractAdaptiveParameters
A composite type for the parameters of an adaptive AbstractRungeKuttaSolver
.
Constructors
AdaptiveParameters(εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100)
Arguments
εₐ :: Real
: absolute toleranceεᵣ :: Real
: relative toleranceMₙ :: Integer
: maximum number of iterations
NSDERungeKutta.ButcherTableau
— TypeButcherTableau <: AbstractButcherTableau
A composite type for the Butcher tableau of a Runge-Kutta solver:
\[\begin{array}{c|c} c & A \\ \hline p & b^\intercal \\ q & d^\intercal \end{array}\]
Constructors
ButcherTableau(A, b, c, s, p[, d, q])
ButcherTableau(tableau::AbstractMatrix{<:Real})
Arguments
A :: AbstractMatrix{<:Real}
: matrix of coefficientsb :: AbstractVector{<:Real}
: vector of weightsc :: AbstractVector{<:Real}
: vector of nodess :: Integer
: number of stagesp :: Integer
: order of accuracyd :: AbstractVector{<:Real}
: embedding's vector of weights (can benothing
)q :: Integer
: embedding's order of accuracy (can benothing
)
Functions
butchertableau
: return matrix of parameters.
NSDERungeKutta.DiagonallyImplicitRungeKuttaSolver
— TypeDiagonallyImplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for diagonally-implicit solvers.
Constructors
DiagonallyImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
DIRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
newton :: AbstractNewtonParameters
adaptive :: AbstractAdaptiveParameters
Methods
(solver::DiagonallyImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::DiagonallyImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ExplicitExponentialRungeKuttaSolver
— TypeExplicitExponentialRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for an exponential explicit AbstractRungeKuttaSolver
.
Constructors
ExplicitExponentialRungeKuttaSolver(tableau, stepsize[, adaptive])
ExRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitExponentialRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitExponentialRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ExplicitRungeKuttaSolver
— TypeExplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ImplicitExplicitRungeKuttaSolver
— TypeImplicitExplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for implicit-explicit solvers.
Constructors
ImplicitExplicitRungeKuttaSolver(implicitableau, explicitableau, stepsize, newton[, adaptive])
IERK(args...; kwargs...)
Arguments
implicitableau :: AbstractButcherTableau
explicitableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
newton :: AbstractNewtonParameters
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ImplicitRungeKuttaSolver
— TypeImplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for implicit solvers.
Constructors
ImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
IRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
newton :: AbstractNewtonParameters
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.NewtonParameters
— TypeNewtonParameters <: AbstractNewtonParameters
A composite type for the parameters of simplified Newton.
Constructors
NewtonParameters(; εᵣ=1e-3, Mₙ=10)
Arguments
εᵣ :: Real
: relative toleranceMₙ :: Integer
: maximum number of iterations
NSDERungeKutta.RungeKuttaSolution
— TypeRungeKuttaSolution <: AbstractRungeKuttaSolution
A composite type for an AbstractRungeKuttaSolution
obtained using an AbstractRungeKuttaSolver
.
Constructors
RungeKuttaSolution(u, t)
RungeKuttaSolution(problem, solver)
Arguments
u :: AbstractVector{<:AbstractVector{<:Number}}
: numerical solutiont :: AbstractVector{<:Real}
: time grid
Functions
extract
: extract all values for a specific variablefirstindex
: get the first indexgetindex
: get specified value(s) and timelastindex
: get the last indexlength
: get the number of time stepssetindex!
: set value(s) and timenumtimesteps
: get the number of time stepsnumvariables
: get the number of variables
NSDERungeKutta.RungeKuttaSolution
— Method(solution::RungeKuttaSolution)(tₚ::Real, f::Function)
uses Hermite's cubic splines to interpolate solution
and approximate its value at tₚ
. Note that it needs the derivative function f(u, t)
, e.g. from an NSDEBase.AbstractRightHandSide
subtype.
NSDERungeKutta.RungeKuttaSolution
— Method(solution::RungeKuttaSolution)(tₚ::Real)
interpolates solution
using linear splines, approximating its value at tₚ
.
NSDERungeKutta.StepSize
— TypeStepSize <: AbstractStepSize
A composite type for the step-size a Runge-Kutta solver.
Constructors
StepSize(h::Real)
Functions
stepsize
: returns (last) step-size
Base.firstindex
— Methodfirstindex(solution::RungeKuttaSolution)
returns the first index of solution
.
Base.getindex
— Methodgetindex(solution::RungeKuttaSolution, v::AbstractVector) :: RungeKuttaSolution
returns a new RungeKuttaSolution
containing the fields of solution
at the indices v
.
Base.getindex
— Methodgetindex(solution::RungeKuttaSolution, i::Integer) :: RungeKuttaSolution
returns new a RungeKuttaSolution
containing the fields of solution
at index i
.
Base.lastindex
— Methodlastindex(solution::RungeKuttaSolution)
returns the last index of solution
.
Base.length
— Methodlength(solution::RungeKuttaSolution)
returns the number of time steps in solution
.
Base.setindex!
— Methodsetindex!(solution::RungeKuttaSolution, values::RungeKuttaSolution, v::AbstractVector)
stores the fields of values
into the fields of solution
at the specified indices v
.
Base.setindex!
— Methodsetindex!(solution::RungeKuttaSolution, values::RungeKuttaSolution, i::Integer)
stores the fields of values
into the fields of solution
at the specified index i
.
Base.setindex!
— Methodsetindex!(solution::RungeKuttaSolution, values::Tuple, i::Integer)
stores the values from values
into the fields of solution
at the specified index i
.
Base.size
— Methodsize(solution::RungeKuttaSolution)
returns a tuple containing the number of variables and time steps in solution
.
NSDEBase.solve
— Methodsolve(problem::AbstractInitialValueProblem, solver::AbstractRungeKuttaSolver) :: RungeKuttaSolution
computes the solution of problem
using solver
.
NSDERungeKutta.BackwardEuler
— MethodBackwardEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
ImplicitEuler(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 1st-order backward Euler method.
NSDERungeKutta.BogackiShampine
— MethodBogackiShampine(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 3rd-order Bogacki-Shampine method with 2nd-order error estimate.
NSDERungeKutta.Butcher5
— MethodButcher5(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 5th-order Butcher method.
NSDERungeKutta.Butcher6
— MethodButcher6(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 6th-order Butcher method.
NSDERungeKutta.Butcher7
— MethodButcher7(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 7th-order Butcher method.
NSDERungeKutta.CrankNicolson
— MethodCrankNicolson(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
LobattoIIIA2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order Crank-Nicolson method.
NSDERungeKutta.DIRK
— MethodDiagonallyImplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for diagonally-implicit solvers.
Constructors
DiagonallyImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
DIRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
newton :: AbstractNewtonParameters
adaptive :: AbstractAdaptiveParameters
Methods
(solver::DiagonallyImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::DiagonallyImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.DP54
— MethodDormandPrince54(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
DP54(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 5th-order Dormand-Prince method with 4th-order error estimate.
NSDERungeKutta.DormandPrince54
— MethodDormandPrince54(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
DP54(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 5th-order Dormand-Prince method with 4th-order error estimate.
NSDERungeKutta.ERK
— MethodExplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ETDEuler
— MethodETDEuler(; h::Real=0.0) :: ExplicitExponentialRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 1st-order stiff Exponential-Time-Differencing Euler method. ```
NSDERungeKutta.ETDRK4
— MethodETDRK4(; h::Real=0.0) :: ExplicitExponentialRungeKuttaSolver
returns an ExplicitExponentialRungeKuttaSolver
for the 2nd-order stiff Exponential-Time-Differencing Runge-Kutta method.
NSDERungeKutta.Euler
— MethodEuler(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitEuler(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 1st-order Euler method. ```
NSDERungeKutta.ExRK
— MethodExplicitExponentialRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for an exponential explicit AbstractRungeKuttaSolver
.
Constructors
ExplicitExponentialRungeKuttaSolver(tableau, stepsize[, adaptive])
ExRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitExponentialRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitExponentialRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ExplicitEuler
— MethodEuler(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitEuler(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 1st-order Euler method. ```
NSDERungeKutta.ExplicitMidpoint
— MethodMidpoint(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitMidpoint(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 2nd-order mid-point method.
NSDERungeKutta.F45
— MethodFehlberg45(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F45(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 4th-order Fehlberg method with 5th-order error estimate.
NSDERungeKutta.F78
— MethodFehlberg78(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F78(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 7th-order Fehlberg method with 8th-order error estimate.
NSDERungeKutta.Fehlberg45
— MethodFehlberg45(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F45(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 4th-order Fehlberg method with 5th-order error estimate.
NSDERungeKutta.Fehlberg78
— MethodFehlberg78(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F78(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 7th-order Fehlberg method with 8th-order error estimate.
NSDERungeKutta.GaussLegendre2
— MethodImplicitMidpoint(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
GaussLegendre2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order implicit midpoint method.
NSDERungeKutta.GaussLegendre4
— MethodGaussLegendre4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 4th-order Gauß-Legendre method.
NSDERungeKutta.GaussLegendre6
— MethodGaussLegendre6(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 6th-order Gauß–Legendre method.
NSDERungeKutta.Heun2
— MethodHeun2(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 2nd-order Heun method.
NSDERungeKutta.Heun3
— MethodHeun3(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 3rd-order Heun method.
NSDERungeKutta.HeunEuler
— MethodHeunEuler(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 2nd-order Heun-Euler method with 1st-order error estimate.
NSDERungeKutta.IERK
— MethodExplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.IMEXEuler
— MethodIMEXEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
IMEXSSP1_111(args...; kwargs...) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 1st-order IMEXEuler method.
NSDERungeKutta.IMEXSSP1_111
— MethodIMEXEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
IMEXSSP1_111(args...; kwargs...) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 1st-order IMEXEuler method.
NSDERungeKutta.IMEXSSP2_222
— MethodIMEXSSP2_222(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 2nd-order IMEX-SSP2(2,2,2) L-stable scheme.
NSDERungeKutta.IMEXSSP2_322
— MethodIMEXSSP2_322(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 2nd-order IMEX-SSP2(3,2,2) stiffly-accurate scheme.
NSDERungeKutta.IMEXSSP2_332
— MethodIMEXSSP2_332(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 2nd-order IMEX-SSP2(3,3,2) stiffly-accurate scheme.
NSDERungeKutta.IMEXSSP3_332
— MethodIMEXSSP3_332(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
returns an ImplicitExplicitRungeKuttaSolver
for the 3rd-order IMEX-SSP3(3,3,2) L-stable scheme.
NSDERungeKutta.IRK
— MethodImplicitRungeKuttaSolver <: AbstractRungeKuttaSolver
A composite type for implicit solvers.
Constructors
ImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
IRK(args...; kwargs...)
Arguments
tableau :: AbstractButcherTableau
stepsize :: AbstractStepSize
newton :: AbstractNewtonParameters
adaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolution
returns the solution
of a problem
using solver
.
NSDERungeKutta.ImplicitEuler
— MethodBackwardEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
ImplicitEuler(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 1st-order backward Euler method.
NSDERungeKutta.ImplicitMidpoint
— MethodImplicitMidpoint(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
GaussLegendre2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order implicit midpoint method.
NSDERungeKutta.KTS
— MethodNSDERungeKutta.KuttaNystrom5
— MethodKuttaNystrom5(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 5th-order Kutta-Nyström method.
NSDERungeKutta.LobattoIII2
— MethodLobattoIII2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order Lobatto III method.
NSDERungeKutta.LobattoIII4
— MethodLobattoIII4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 4th-order Lobatto III method.
NSDERungeKutta.LobattoIIIA2
— MethodCrankNicolson(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
LobattoIIIA2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order Crank-Nicolson method.
NSDERungeKutta.LobattoIIIA4
— MethodLobattoIIIA4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 4th-order Lobatto IIIA method.
NSDERungeKutta.LobattoIIIB4
— MethodLobattoIIIB4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 4th-order Lobatto IIIB method.
NSDERungeKutta.LobattoIIIC2
— MethodLobattoIIIC2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 2nd-order Lobatto IIIC method.
NSDERungeKutta.LobattoIIIC4
— MethodLobattoIIIC4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 4th-order Lobatto IIIC method.
NSDERungeKutta.Midpoint
— MethodMidpoint(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitMidpoint(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 2nd-order mid-point method.
NSDERungeKutta.RK3
— MethodNSDERungeKutta.RK4
— MethodRungeKutta4(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK4(args...; kwargs...)
returns an ExplicitRungeKuttaSolver
for the 4th-order Runge-Kutta method.
NSDERungeKutta.RadauI3
— MethodRadauI3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 3rd-order Radau I method.
NSDERungeKutta.RadauI5
— MethodRadauI5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 5th-order Radau I method.
NSDERungeKutta.RadauIA3
— MethodRadauIA3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 3rd-order Radau IA method.
NSDERungeKutta.RadauIA5
— MethodRadauIA5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 5th-order Radau IA method.
NSDERungeKutta.RadauII3
— MethodRadauII3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 3rd-order Radau II method.
NSDERungeKutta.RadauII5
— MethodRadauII5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 5th-order Radau II method.
NSDERungeKutta.RadauIIA3
— MethodRadauIIA3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 3rd-order Radau IIA method.
NSDERungeKutta.RadauIIA5
— MethodRadauIIA5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolver
returns an ImplicitRungeKuttaSolver
for the 5th-order Radau IIA method.
NSDERungeKutta.Ralston2
— MethodRalston2(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 2nd-order Ralston method.
NSDERungeKutta.Ralston3
— MethodRalston3(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 3rd-order Ralston method.
NSDERungeKutta.Ralston4
— MethodRalston4(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 4th-order Ralston method.
NSDERungeKutta.Rule38
— MethodRule38(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 4th-order 3/8-rule method.
NSDERungeKutta.RungeKutta3
— MethodRungeKutta3(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK3(args...; kwargs...)
returns an ExplicitRungeKuttaSolver
for the 3rd-order Kutta method.
NSDERungeKutta.RungeKutta4
— MethodRungeKutta4(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK4(args...; kwargs...)
returns an ExplicitRungeKuttaSolver
for the 4th-order Runge-Kutta method.
NSDERungeKutta.SDIRK2
— MethodSDIRK2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 2nd-order SDIRK method.
NSDERungeKutta.SDIRK3
— MethodSDIRK3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 3rd-order SDIRK method.
NSDERungeKutta.SDIRK4
— MethodSDIRK4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
returns an DiagonallyImplicitRungeKuttaSolver
for the 4th-order SDIRK method.
NSDERungeKutta.SSPRK3
— MethodSSPRK3(; h::Real=0.0) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 3rd-order Strong-Stability-Preserving Runge-Kutta method.
NSDERungeKutta.V65
— MethodVerner65(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
V65(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 6th-order Verner method with 5th-order error estimate.
NSDERungeKutta.Verner65
— MethodVerner65(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
V65(args...; kwargs...) :: ExplicitRungeKuttaSolver
returns an ExplicitRungeKuttaSolver
for the 6th-order Verner method with 5th-order error estimate.
NSDERungeKutta.butchertableau
— Methodbutchertableau(solver::AbstractRungeKuttaSolver) :: AbstractMatrix
returns the Butcher tableau of a solver
as a matrix.
NSDERungeKutta.extract
— Methodextract(solution::RungeKuttaSolution, v::AbstractVector) :: RungeKuttaSolution
returns the variables of solution
indicated by the indices v
.
NSDERungeKutta.extract
— Methodextract(solution::RungeKuttaSolution, i::Integer) :: RungeKuttaSolution
returns the i
-th variable of solution
. i = 0
returns t
.
NSDERungeKutta.extract
— Methodextract(solution::RungeKuttaSolution) :: RungeKuttaSolution
returns all variables of solution
, including t
.
NSDERungeKutta.numtimesteps
— Methodnumtimesteps(solution::RungeKuttaSolution)
returns the number of time steps in solution
.
NSDERungeKutta.numvariables
— Methodnumvariables(solution::RungeKuttaSolution)
returns the number of variables in solution
.
NSDERungeKutta.solve!
— Methodsolve!(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem, solver::AbstractRungeKuttaSolver) :: RungeKuttaSolution
computes the solution
of problem
using solver
.
NSDERungeKutta.stepsize
— Methodstepsize(solver::AbstractRungeKuttaSolver) :: Real
returns the step-size of a solver
.
NSDERungeKutta.ℛ
— Methodℛ(Z::AbstractMatrix, tableau::AbstractButcherTableau) :: AbstractMatrix
ℛ(Z::AbstractMatrix, solver::AbstractRungeKuttaSolver) :: AbstractMatrix
returns the stability function of solver
.
NSDERungeKutta.ℛ
— Methodℛ(z::Number, tableau::AbstractButcherTableau) :: Number
ℛ(z::Number, solver::AbstractRungeKuttaSolver) :: Number
returns the stability function of solver
:
\[ R(z) = \frac{\det(I - z(A - \mathbb{1}b^\intercal))}{\det(I - zA)}.\]