ODE Solvers
Interface
ClimaTimeSteppers.ClimaODEFunction — Type
ClimaODEFunction(; T_imp!, [dss!], [cache!], [cache_imp!])
ClimaODEFunction(; T_exp!, T_lim!, [T_imp!], [lim!], [dss!], [cache!], [cache_imp!])
ClimaODEFunction(; T_exp_lim!, [T_imp!], [lim!], [dss!], [cache!], [cache_imp!])Container for all functions used to advance through a timestep: - T_imp!(T_imp, u, p, t): sets the implicit tendency - T_exp!(T_exp, u, p, t): sets the component of the explicit tendency that is not passed through the limiter - T_lim!(T_lim, u, p, t): sets the component of the explicit tendency that is passed through the limiter - T_exp_lim!(T_exp, T_lim, u, p, t): fused alternative to the separate functions T_exp! and T_lim! - lim!(u, p, t, u_ref): applies the limiter to every state u that has been incremented from u_ref by the explicit tendency component T_lim! - dss!(u, p, t): applies direct stiffness summation to every state u, except for intermediate states generated within the implicit solver - cache!(u, p, t): updates the cache p to reflect the state u before the first timestep and on every subsequent timestepping stage - cache_imp!(u, p, t): updates the components of the cache p that are required to evaluate T_imp! and its Jacobian within the implicit solver By default, lim!, dss!, and cache! all do nothing, and cache_imp! is identical to cache!. Any of the tendency functions can be set to nothing in order to avoid corresponding allocations in the integrator.
ClimaTimeSteppers.AbstractAlgorithmConstraint — Type
AbstractAlgorithmConstraintA mechanism for constraining which operations can be performed by an algorithm for solving ODEs.
For example, an unconstrained algorithm might compute a Runge-Kutta stage by taking linear combinations of tendencies; i.e., by adding quantities of the form dt * tendency(state). On the other hand, a "strong stability preserving" algorithm can only take linear combinations of "incremented states"; i.e., it only adds quantities of the form state + dt * coefficient * tendency(state).
ClimaTimeSteppers.Unconstrained — Type
UnconstrainedIndicates that an algorithm may perform any supported operations.
ClimaTimeSteppers.SSP — Type
SSPIndicates that an algorithm must be "strong stability preserving", which makes it easier to guarantee that the algorithm will preserve monotonicity properties satisfied by the initial state. For example, this ensures that the algorithm will be able to use limiters in a mathematically consistent way.
ClimaTimeSteppers.IMEXTableau — Type
IMEXTableau(; a_exp, b_exp, c_exp, a_imp, b_imp, c_imp)A wrapper for an IMEX Butcher tableau (or, more accurately, a pair of Butcher tableaus, one for explicit tendencies and the other for implicit tendencies). Only a_exp and a_imp are required arguments; the default values for b_exp and b_imp assume that the algorithm is FSAL (first same as last), and the default values for c_exp and c_imp assume that it is internally consistent.
The explicit tableau must be strictly lower triangular, and the implicit tableau must be lower triangular (only DIRK algorithms are currently supported).
ClimaTimeSteppers.IMEXAlgorithm — Type
IMEXAlgorithm(tableau, newtons_method, [constraint])
IMEXAlgorithm(name, newtons_method, [constraint])Constructs an IMEX algorithm for solving ODEs, with an optional name and constraint. The first constructor accepts any IMEXTableau and an optional constraint, leaving the algorithm unnamed. The second constructor automatically determines the tableau and the default constraint from the algorithm name, which must be an IMEXARKAlgorithmName.
ClimaTimeSteppers.ExplicitTableau — Type
ExplicitTableau(; a, b, c)A wrapper for an explicit Butcher tableau. Only a is a required argument; the default value for b assumes that the algorithm is FSAL (first same as last), and the default value for c assumes that it is internally consistent. The matrix a must be strictly lower triangular.
ClimaTimeSteppers.ExplicitAlgorithm — Function
ExplicitAlgorithm(tableau, [constraint])
ExplicitAlgorithm(name, [constraint])Constructs an explicit algorithm for solving ODEs, with an optional name and constraint. The first constructor accepts any ExplicitTableau and an optional constraint, leaving the algorithm unnamed. The second constructor automatically determines the tableau and the default constraint from the algorithm name, which must be an ERKAlgorithmName.
Note that using an ExplicitAlgorithm is merely a shorthand for using an IMEXAlgorithm with the same tableau for explicit and implicit tendencies (and without Newton's method).
IMEX Algorithm Names
ClimaTimeSteppers.ARS111 — Type
ARS111An IMEX ARK algorithm from [8], section 2, with 1 implicit stage, 1 explicit stage and 1st order accuracy. Also called IMEX Euler or forward-backward Euler; equivalent to OrdinaryDiffEq.IMEXEuler.
ClimaTimeSteppers.ARS121 — Type
ARS121An IMEX ARK algorithm from [8], section 2, with 1 implicit stage, 2 explicit stages, and 1st order accuracy. Also called IMEX Euler or forward-backward Euler; equivalent to OrdinaryDiffEq.IMEXEulerARK.
ClimaTimeSteppers.ARS122 — Type
ARS122An IMEX ARK algorithm from [8], section 2, with 1 implicit stage, 2 explicit stages, and 2nd order accuracy. Also called IMEX midpoint.
ClimaTimeSteppers.ARS233 — Type
ARS233An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 3 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.ARS232 — Type
ARS232An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARS222 — Type
ARS222An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 2 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARS343 — Type
ARS343An IMEX ARK algorithm from [8], section 2, with 3 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.ARS443 — Type
ARS443An IMEX ARK algorithm from [8], section 2, with 4 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.IMKG232a — Type
IMKG232aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG232b — Type
IMKG232bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG242a — Type
IMKG242aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG242b — Type
IMKG242bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG243a — Type
IMKG243aAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG252a — Type
IMKG252aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG252b — Type
IMKG252bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG253a — Type
IMKG253aAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG253b — Type
IMKG253bAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254a — Type
IMKG254aAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254b — Type
IMKG254bAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254c — Type
IMKG254cAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG342a — Type
IMKG342aAn IMEX ARK algorithm from [9], Table 4, with 2 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.IMKG343a — Type
IMKG343aAn IMEX ARK algorithm from [9], Table 4, with 3 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.SSP222 — Type
SSP222An IMEX SSPRK algorithm from [10], with 2 implicit stages, 2 explicit stages, and 2nd order accuracy. Also called SSP2(222) in [11].
ClimaTimeSteppers.SSP322 — Type
SSP322An IMEX SSPRK algorithm from [10], with 3 implicit stages, 2 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.SSP332 — Type
SSP332An IMEX SSPRK algorithm from [10], with 3 implicit stages, 3 explicit stages, and 2nd order accuracy. Also called SSP2(332)a in [11].
ClimaTimeSteppers.SSP333 — Type
SSP333(; β = 1/2 + √3/6)Family of IMEX SSPRK algorithms parametrized by the value β from [12], Section 3.2, with 3 implicit stages, 3 explicit stages, and 3rd order accuracy. The default value of β results in an SDIRK algorithm, which is also called SSP3(333)c in [11].
ClimaTimeSteppers.SSP433 — Type
SSP433An IMEX SSPRK algorithm from [10], with 4 implicit stages, 3 explicit stages, and 3rd order accuracy. Also called SSP3(433) in [11].
ClimaTimeSteppers.DBM453 — Type
DBM453An IMEX ARK algorithm from [13], Appendix A, with 4 implicit stages, 5 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.HOMMEM1 — Type
HOMMEM1An IMEX ARK algorithm from [14], section 4.1, with 5 implicit stages, 6 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARK2GKC — Type
ARK2GKC(; paper_version = false)An IMEX ARK algorithm from [15] with 2 implicit stages, 3 explicit stages, and 2nd order accuracy. If paper_version = true, the algorithm uses coefficients from the paper. Otherwise, it uses coefficients that make it more stable but less accurate.
ClimaTimeSteppers.ARK437L2SA1 — Type
ARK437L2SA1An IMEX ARK algorithm from [16], Table 8, with 6 implicit stages, 7 explicit stages, and 4th order accuracy. Written as ARK4(3)7L[2]SA₁ in the paper.
ClimaTimeSteppers.ARK548L2SA2 — Type
ARK548L2SA2An IMEX ARK algorithm from [16], Table 8, with 7 implicit stages, 8 explicit stages, and 5th order accuracy. Written as ARK5(4)8L[2]SA₂ in the paper.
ClimaTimeSteppers.SSPKnoth — Type
SSPKnothSSPKnoth is a second-order Rosenbrock method developed by Oswald Knoth.
The coefficients are the same as in CGDycore.jl, except that for C we add the diagonal elements too. Note, however, that the elements on the diagonal of C do not really matter because C is only used in its lower triangular part. We add them mostly to match literature on the subject
Explicit Algorithm Names
ClimaTimeSteppers.SSP22Heuns — Type
SSP22HeunsAn SSPRK algorithm from [17], with 2 stages and 2nd order accuracy. Also called Heun's method ([18]).
ClimaTimeSteppers.SSP33ShuOsher — Type
SSP33ShuOsherAn SSPRK algorithm from [17], with 3 stages and 3rd order accuracy.
ClimaTimeSteppers.RK4 — Type
RK4The RK4 algorithm from [19], a Runge-Kutta method with 4 stages and 4th order accuracy.
Old LSRK Interface
ClimaTimeSteppers.ForwardEulerODEFunction — Type
ForwardEulerODEFunction(f; jac_prototype, Wfact, tgrad)An ODE function wrapper where f(un, u, p, t, dt) provides a forward Euler update
un .= u .+ dt * f(u, p, t)ClimaTimeSteppers.LowStorageRungeKutta2N — Type
LowStorageRungeKutta2N <: DistributedODEAlgorithmA class of low-storage Runge-Kutta algorithms, which use only one additional copy of the state vector $u$ (often referred to as $2N$ schemes).
The available implementations are:
ClimaTimeSteppers.LSRK54CarpenterKennedy — Type
LSRK54CarpenterKennedy()The 4th-order, 5-stage [LowStorageRungeKutta2N])(ref) scheme from Solution 3 of [20].
ClimaTimeSteppers.LSRK144NiegemannDiehlBusch — Type
LSRK144NiegemannDiehlBusch()The 4th-order, 14-stage, [LowStorageRungeKutta2N])(ref) scheme of [21] with optimized stability region
ClimaTimeSteppers.LSRKEulerMethod — Type
LSRKEulerMethod()An implementation of explicit Euler method using LowStorageRungeKutta2N infrastructure. This is mainly for debugging.
Old Multirate Interface
ClimaTimeSteppers.Multirate — Type
Multirate(fast, slow)A multirate Runge–Kutta scheme, combining fast and slow algorithms
slow can be any algorithm providing methods for the following functions
init_inner(prob, outercache, dt)update_inner!(innerinteg, outercache, f_slow, u, p, t, dt, stage)
Algorithms which currently support this are:
ClimaTimeSteppers.MIS2 — Type
MIS2()The MIS2 Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS3C — Type
MIS3C()The MIS3C Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS4 — Type
MIS4()The MIS4 Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS4a — Type
MIS4a()The MIS4a Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.TVDMISA — Type
TVDMISA()The TVDMISA Total Variation Diminishing (TVD) Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.TVDMISB — Type
TVDMISB()The TVDMISB Total Variation Diminishing (TVD) Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.WickerSkamarockRungeKutta — Type
WickerSkamarockRungeKutta <: DistributedODEAlgorithmClass of multirate algorithms developed in [6] and [7], which can be used as slow methods in Multirate.
These require two additional copies of the state vector $u$.
Available implementations are:
ClimaTimeSteppers.WSRK2 — Type
WSRK2()The 2 stage, 2nd order RK2 scheme of [6].
ClimaTimeSteppers.WSRK3 — Type
WSRK3()The 3 stage, 2nd order (3rd order for linear problems) RK3 scheme of [7].