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 — Type
An abstract type for parameters of embedded Runge-Kutta solvers.
NSDERungeKutta.AbstractButcherTableau — Type
An abstract type for Butcher tableaus.
NSDERungeKutta.AbstractNewtonParameters — Type
An abstract type for parameters of Newton steps in implicit Runge-Kutta solvers.
NSDERungeKutta.AbstractRungeKuttaCache — Type
An abstract type for caching intermediate computations in Runge-Kutta solvers.
NSDERungeKutta.AbstractRungeKuttaParameters — Type
An abstract type for Runge-Kutta solver parameters.
NSDERungeKutta.AbstractRungeKuttaSolution — Type
An abstract type for Runge-Kutta solutions of NSDEBase.AbstractInitialValueProblems.
NSDERungeKutta.AbstractRungeKuttaSolver — Type
An abstract type for Runge-Kutta solvers of NSDEBase.AbstractInitialValueProblems.
NSDERungeKutta.AbstractStepSize — Type
An abstract type for time-step sizes, useful for embedded solvers.
NSDERungeKutta.AdaptiveParameters — Type
AdaptiveParameters <: AbstractAdaptiveParametersA 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 — Type
ButcherTableau <: AbstractButcherTableauA 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)b_dense :: AbstractMatrix{<:Real}: matrix where col j is powers of theta for stage j
Functions
butchertableau : return matrix of parameters.
NSDERungeKutta.DiagonallyImplicitRungeKuttaSolver — Type
DiagonallyImplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for diagonally-implicit solvers.
Constructors
DiagonallyImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
DIRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizenewton :: AbstractNewtonParametersadaptive :: AbstractAdaptiveParameters
Methods
(solver::DiagonallyImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::DiagonallyImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ExplicitExponentialRungeKuttaSolver — Type
ExplicitExponentialRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for an exponential explicit AbstractRungeKuttaSolver.
Constructors
ExplicitExponentialRungeKuttaSolver(tableau, stepsize[, adaptive])
ExRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizeadaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitExponentialRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitExponentialRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ExplicitRungeKuttaSolver — Type
ExplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizeadaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ImplicitExplicitRungeKuttaSolver — Type
ImplicitExplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for implicit-explicit solvers.
Constructors
ImplicitExplicitRungeKuttaSolver(implicitableau, explicitableau, stepsize, newton[, adaptive])
IERK(args...; kwargs...)Arguments
implicitableau :: AbstractButcherTableauexplicitableau :: AbstractButcherTableaustepsize :: AbstractStepSizenewton :: AbstractNewtonParametersadaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ImplicitRungeKuttaSolver — Type
ImplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for implicit solvers.
Constructors
ImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
IRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizenewton :: AbstractNewtonParametersadaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.NewtonParameters — Type
NewtonParameters <: AbstractNewtonParametersA 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 — Type
RungeKuttaSolution <: AbstractRungeKuttaSolutionA composite type for an AbstractRungeKuttaSolution obtained using an AbstractRungeKuttaSolver.
Constructors
RungeKuttaSolution(u, t, k)
RungeKuttaSolution(problem, solver; dense=false)Arguments
u :: AbstractVector{<:AbstractVector{<:Number}}: numerical solutiont :: AbstractVector{<:Real}: time gridk :: AbstractVector{<:AbstractVector{<:AbstractVector{<:Number}}}: stages history (for dense output)
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, tableau::AbstractButcherTableau)Evaluates the dense output solution at tₚ using the stored stages and tableau coefficients.
NSDERungeKutta.RungeKuttaSolution — Method
(solution::RungeKuttaSolution)(tₚ::Real)interpolates solution using linear splines, approximating its value at tₚ.
NSDERungeKutta.StepSize — Type
StepSize <: AbstractStepSizeA composite type for the step-size a Runge-Kutta solver.
Constructors
StepSize(h::Real)Functions
stepsize : returns (last) step-size
Base.firstindex — Method
firstindex(solution::RungeKuttaSolution)returns the first index of solution.
Base.getindex — Method
getindex(solution::RungeKuttaSolution, v::AbstractVector) :: RungeKuttaSolutionreturns a new RungeKuttaSolution containing the fields of solution at the indices v.
Base.getindex — Method
getindex(solution::RungeKuttaSolution, i::Integer) :: RungeKuttaSolutionreturns new a RungeKuttaSolution containing the fields of solution at index i.
Base.lastindex — Method
lastindex(solution::RungeKuttaSolution)returns the last index of solution.
Base.length — Method
length(solution::RungeKuttaSolution)returns the number of time steps in solution.
Base.setindex! — Method
setindex!(solution::RungeKuttaSolution, values::RungeKuttaSolution, v::AbstractVector)stores the fields of values into the fields of solution at the specified indices v.
Base.setindex! — Method
setindex!(solution::RungeKuttaSolution, values::RungeKuttaSolution, i::Integer)stores the fields of values into the fields of solution at the specified index i. Assumes values contains data for a single time step (e.g. from getindex).
Base.setindex! — Method
setindex!(solution::RungeKuttaSolution, values::Tuple, i::Integer)stores the values from values into the fields of solution at the specified index i. If solution is dense (has k), values must be a 3-tuple (u, t, k). Otherwise, values must be a 2-tuple (u, t).
NSDEBase.solve — Method
solve(problem::AbstractInitialValueProblem, solver::AbstractRungeKuttaSolver; dense::Bool=false, kwargs...) :: RungeKuttaSolutioncomputes the solution of problem using solver.
NSDERungeKutta.BackwardEuler — Method
BackwardEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
ImplicitEuler(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 1st-order backward Euler method.
NSDERungeKutta.BogackiShampine — Method
BogackiShampine(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 3rd-order Bogacki-Shampine method with 2nd-order error estimate.
NSDERungeKutta.Butcher5 — Method
Butcher5(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 5th-order Butcher method.
NSDERungeKutta.Butcher6 — Method
Butcher6(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 6th-order Butcher method.
NSDERungeKutta.Butcher7 — Method
Butcher7(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 7th-order Butcher method.
NSDERungeKutta.CrankNicolson — Method
CrankNicolson(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
LobattoIIIA2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order Crank-Nicolson method.
NSDERungeKutta.DIRK — Method
DiagonallyImplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for diagonally-implicit solvers.
Constructors
DiagonallyImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
DIRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizenewton :: AbstractNewtonParametersadaptive :: AbstractAdaptiveParameters
Methods
(solver::DiagonallyImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::DiagonallyImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.DP54 — Method
DormandPrince54(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
DP54(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 5th-order Dormand-Prince method with 4th-order error estimate.
NSDERungeKutta.DormandPrince54 — Method
DormandPrince54(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
DP54(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 5th-order Dormand-Prince method with 4th-order error estimate.
NSDERungeKutta.ERK — Method
ExplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizeadaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ETDEuler — Method
ETDEuler(; h::Real=0.0) :: ExplicitExponentialRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 1st-order stiff Exponential-Time-Differencing Euler method. ```
NSDERungeKutta.ETDRK4 — Method
ETDRK4(; h::Real=0.0) :: ExplicitExponentialRungeKuttaSolverreturns an ExplicitExponentialRungeKuttaSolver for the 2nd-order stiff Exponential-Time-Differencing Runge-Kutta method.
NSDERungeKutta.Euler — Method
Euler(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitEuler(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 1st-order Euler method. ```
NSDERungeKutta.ExRK — Method
ExplicitExponentialRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for an exponential explicit AbstractRungeKuttaSolver.
Constructors
ExplicitExponentialRungeKuttaSolver(tableau, stepsize[, adaptive])
ExRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizeadaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitExponentialRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitExponentialRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ExplicitEuler — Method
Euler(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitEuler(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 1st-order Euler method. ```
NSDERungeKutta.ExplicitMidpoint — Method
Midpoint(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitMidpoint(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 2nd-order mid-point method.
NSDERungeKutta.F45 — Method
Fehlberg45(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F45(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 4th-order Fehlberg method with 5th-order error estimate.
NSDERungeKutta.F78 — Method
Fehlberg78(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F78(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 7th-order Fehlberg method with 8th-order error estimate.
NSDERungeKutta.Fehlberg45 — Method
Fehlberg45(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F45(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 4th-order Fehlberg method with 5th-order error estimate.
NSDERungeKutta.Fehlberg78 — Method
Fehlberg78(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
F78(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 7th-order Fehlberg method with 8th-order error estimate.
NSDERungeKutta.GaussLegendre2 — Method
ImplicitMidpoint(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
GaussLegendre2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order implicit midpoint method.
NSDERungeKutta.GaussLegendre4 — Method
GaussLegendre4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 4th-order Gauß-Legendre method.
NSDERungeKutta.GaussLegendre6 — Method
GaussLegendre6(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 6th-order Gauß–Legendre method.
NSDERungeKutta.Heun2 — Method
Heun2(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 2nd-order Heun method.
NSDERungeKutta.Heun3 — Method
Heun3(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 3rd-order Heun method.
NSDERungeKutta.HeunEuler — Method
HeunEuler(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 2nd-order Heun-Euler method with 1st-order error estimate.
NSDERungeKutta.IERK — Method
ExplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for explicit solvers.
Constructors
ExplicitRungeKuttaSolver(tableau, stepsize[, adaptive])
ERK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizeadaptive :: AbstractAdaptiveParameters
Methods
(solver::ExplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ExplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.IMEXEuler — Method
IMEXEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
IMEXSSP1_111(args...; kwargs...) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 1st-order IMEXEuler method.
NSDERungeKutta.IMEXSSP1_111 — Method
IMEXEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolver
IMEXSSP1_111(args...; kwargs...) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 1st-order IMEXEuler method.
NSDERungeKutta.IMEXSSP2_222 — Method
IMEXSSP2_222(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 2nd-order IMEX-SSP2(2,2,2) L-stable scheme.
NSDERungeKutta.IMEXSSP2_322 — Method
IMEXSSP2_322(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 2nd-order IMEX-SSP2(3,2,2) stiffly-accurate scheme.
NSDERungeKutta.IMEXSSP2_332 — Method
IMEXSSP2_332(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 2nd-order IMEX-SSP2(3,3,2) stiffly-accurate scheme.
NSDERungeKutta.IMEXSSP3_332 — Method
IMEXSSP3_332(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitExplicitRungeKuttaSolverreturns an ImplicitExplicitRungeKuttaSolver for the 3rd-order IMEX-SSP3(3,3,2) L-stable scheme.
NSDERungeKutta.IRK — Method
ImplicitRungeKuttaSolver <: AbstractRungeKuttaSolverA composite type for implicit solvers.
Constructors
ImplicitRungeKuttaSolver(tableau, stepsize, newton[, adaptive])
IRK(args...; kwargs...)Arguments
tableau :: AbstractButcherTableaustepsize :: AbstractStepSizenewton :: AbstractNewtonParametersadaptive :: AbstractAdaptiveParameters
Methods
(solver::ImplicitRungeKuttaSolver)(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem) :: RungeKuttaSolution
(solver::ImplicitRungeKuttaSolver)(problem::AbstractInitialValueProblem) :: RungeKuttaSolutionreturns the solution of a problem using solver.
NSDERungeKutta.ImplicitEuler — Method
BackwardEuler(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
ImplicitEuler(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 1st-order backward Euler method.
NSDERungeKutta.ImplicitMidpoint — Method
ImplicitMidpoint(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
GaussLegendre2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order implicit midpoint method.
NSDERungeKutta.KTS — Method
NSDERungeKutta.KuttaNystrom5 — Method
KuttaNystrom5(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 5th-order Kutta-Nyström method.
NSDERungeKutta.LobattoIII2 — Method
LobattoIII2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order Lobatto III method.
NSDERungeKutta.LobattoIII4 — Method
LobattoIII4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 4th-order Lobatto III method.
NSDERungeKutta.LobattoIIIA2 — Method
CrankNicolson(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolver
LobattoIIIA2(args...; kwargs...) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order Crank-Nicolson method.
NSDERungeKutta.LobattoIIIA4 — Method
LobattoIIIA4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 4th-order Lobatto IIIA method.
NSDERungeKutta.LobattoIIIB4 — Method
LobattoIIIB4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 4th-order Lobatto IIIB method.
NSDERungeKutta.LobattoIIIC2 — Method
LobattoIIIC2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 2nd-order Lobatto IIIC method.
NSDERungeKutta.LobattoIIIC4 — Method
LobattoIIIC4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 4th-order Lobatto IIIC method.
NSDERungeKutta.Midpoint — Method
Midpoint(; h::Real=0.0) :: ExplicitRungeKuttaSolver
ExplicitMidpoint(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 2nd-order mid-point method.
NSDERungeKutta.RK3 — Method
NSDERungeKutta.RK4 — Method
RungeKutta4(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK4(args...; kwargs...)returns an ExplicitRungeKuttaSolver for the 4th-order Runge-Kutta method.
NSDERungeKutta.RadauI3 — Method
RadauI3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 3rd-order Radau I method.
NSDERungeKutta.RadauI5 — Method
RadauI5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 5th-order Radau I method.
NSDERungeKutta.RadauIA3 — Method
RadauIA3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 3rd-order Radau IA method.
NSDERungeKutta.RadauIA5 — Method
RadauIA5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 5th-order Radau IA method.
NSDERungeKutta.RadauII3 — Method
RadauII3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 3rd-order Radau II method.
NSDERungeKutta.RadauII5 — Method
RadauII5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 5th-order Radau II method.
NSDERungeKutta.RadauIIA3 — Method
RadauIIA3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 3rd-order Radau IIA method.
NSDERungeKutta.RadauIIA5 — Method
RadauIIA5(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: ImplicitRungeKuttaSolverreturns an ImplicitRungeKuttaSolver for the 5th-order Radau IIA method.
NSDERungeKutta.Ralston2 — Method
Ralston2(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 2nd-order Ralston method.
NSDERungeKutta.Ralston3 — Method
Ralston3(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 3rd-order Ralston method.
NSDERungeKutta.Ralston4 — Method
Ralston4(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 4th-order Ralston method.
NSDERungeKutta.Rule38 — Method
Rule38(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 4th-order 3/8-rule method.
NSDERungeKutta.RungeKutta3 — Method
RungeKutta3(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK3(args...; kwargs...)returns an ExplicitRungeKuttaSolver for the 3rd-order Kutta method.
NSDERungeKutta.RungeKutta4 — Method
RungeKutta4(; h::Real=0.0) :: ExplicitRungeKuttaSolver
RK4(args...; kwargs...)returns an ExplicitRungeKuttaSolver for the 4th-order Runge-Kutta method.
NSDERungeKutta.SDIRK2 — Method
SDIRK2(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 2nd-order SDIRK method.
NSDERungeKutta.SDIRK3 — Method
SDIRK3(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 3rd-order SDIRK method.
NSDERungeKutta.SDIRK4 — Method
SDIRK4(; h::Real=0.0, εᵣ::Real=1e-3, Mₙ::Integer=10) :: DiagonallyImplicitRungeKuttaSolverreturns an DiagonallyImplicitRungeKuttaSolver for the 4th-order SDIRK method.
NSDERungeKutta.SSPRK3 — Method
SSPRK3(; h::Real=0.0) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 3rd-order Strong-Stability-Preserving Runge-Kutta method.
NSDERungeKutta.V65 — Method
Verner65(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
V65(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 6th-order Verner method with 5th-order error estimate.
NSDERungeKutta.Verner65 — Method
Verner65(; h::Real=0.0, εₐ::Real=0.0, εᵣ::Real=1e-5, Mₙ::Integer=100, save_stepsizes::Bool=false) :: ExplicitRungeKuttaSolver
V65(args...; kwargs...) :: ExplicitRungeKuttaSolverreturns an ExplicitRungeKuttaSolver for the 6th-order Verner method with 5th-order error estimate.
NSDERungeKutta.butchertableau — Method
butchertableau(solver::AbstractRungeKuttaSolver) :: AbstractMatrixreturns the Butcher tableau of a solver as a matrix.
NSDERungeKutta.compensated_sum — Method
compensated_sum(sum::T, addend::T, error::Ref{T}) where T<:AbstractFloatAdds addend to sum using the Kahan-Babuška-Neumaier algorithm to minimize floating-point round-off error. The accumulated error is stored in the error Ref.
NSDERungeKutta.extract — Method
extract(solution::RungeKuttaSolution, v::AbstractVector) :: RungeKuttaSolutionreturns the variables of solution indicated by the indices v.
NSDERungeKutta.extract — Method
extract(solution::RungeKuttaSolution, i::Integer) :: RungeKuttaSolutionreturns the i-th variable of solution. i = 0 returns t.
NSDERungeKutta.extract — Method
extract(solution::RungeKuttaSolution) :: RungeKuttaSolutionreturns all variables of solution, including t.
NSDERungeKutta.is_strictly_lower_triangular — Method
is_strictly_lower_triangular(A::AbstractMatrix) :: BoolReturns true if all entries on and above the main diagonal of A are zero.
NSDERungeKutta.numtimesteps — Method
numtimesteps(solution::RungeKuttaSolution)returns the number of time steps in solution.
NSDERungeKutta.numvariables — Method
numvariables(solution::RungeKuttaSolution)returns the number of variables in solution.
NSDERungeKutta.solve! — Method
solve!(solution::AbstractRungeKuttaSolution, problem::AbstractInitialValueProblem, solver::AbstractRungeKuttaSolver; dense::Bool=false) :: RungeKuttaSolutioncomputes the solution of problem using solver.
NSDERungeKutta.stability_function — Method
stability_function(Z::AbstractMatrix, tableau::AbstractButcherTableau) :: AbstractMatrix
stability_function(Z::AbstractMatrix, solver::AbstractRungeKuttaSolver) :: AbstractMatrixComputes the matrix stability function $R(Z) = I + (b^\top \otimes Z) (I \otimes I - A \otimes Z)^{-1} (\mathbb{1} \otimes I)$. This builds and solves a Kronecker system of size $sN \times sN$; avoid for large systems.
NSDERungeKutta.stability_function — Method
stability_function(z::Number, tableau::AbstractButcherTableau) :: Number
stability_function(z::Number, solver::AbstractRungeKuttaSolver) :: NumberComputes the scalar stability function $R(z) = 1 + z b^\top (I - zA)^{-1} \mathbb{1}$.
NSDERungeKutta.stepsize — Method
stepsize(solver::AbstractRungeKuttaSolver) :: Realreturns the step-size of a solver.