ODE Solvers
Interface
ClimaTimeSteppers.ClimaODEFunction — TypeClimaODEFunction(; 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 — TypeAbstractAlgorithmConstraintA 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 — TypeUnconstrainedIndicates that an algorithm may perform any supported operations.
ClimaTimeSteppers.SSP — TypeSSPIndicates 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 — TypeIMEXTableau(; 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 — TypeIMEXAlgorithm(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 — TypeExplicitTableau(; 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 — FunctionExplicitAlgorithm(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 — TypeARS111An 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 — TypeARS121An 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 — TypeARS122An IMEX ARK algorithm from [8], section 2, with 1 implicit stage, 2 explicit stages, and 2nd order accuracy. Also called IMEX midpoint.
ClimaTimeSteppers.ARS233 — TypeARS233An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 3 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.ARS232 — TypeARS232An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARS222 — TypeARS222An IMEX ARK algorithm from [8], section 2, with 2 implicit stages, 2 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARS343 — TypeARS343An IMEX ARK algorithm from [8], section 2, with 3 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.ARS443 — TypeARS443An IMEX ARK algorithm from [8], section 2, with 4 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.IMKG232a — TypeIMKG232aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG232b — TypeIMKG232bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 3 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG242a — TypeIMKG242aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG242b — TypeIMKG242bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG243a — TypeIMKG243aAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 4 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG252a — TypeIMKG252aAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG252b — TypeIMKG252bAn IMEX ARK algorithm from [9], Table 3, with 2 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG253a — TypeIMKG253aAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG253b — TypeIMKG253bAn IMEX ARK algorithm from [9], Table 3, with 3 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254a — TypeIMKG254aAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254b — TypeIMKG254bAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG254c — TypeIMKG254cAn IMEX ARK algorithm from [9], Table 3, with 4 implicit stages, 5 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.IMKG342a — TypeIMKG342aAn IMEX ARK algorithm from [9], Table 4, with 2 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.IMKG343a — TypeIMKG343aAn IMEX ARK algorithm from [9], Table 4, with 3 implicit stages, 4 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.SSP222 — TypeSSP222An IMEX SSPRK algorithm from [10], with 2 implicit stages, 2 explicit stages, and 2nd order accuracy. Also called SSP2(222) in [11].
ClimaTimeSteppers.SSP322 — TypeSSP322An IMEX SSPRK algorithm from [10], with 3 implicit stages, 2 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.SSP332 — TypeSSP332An 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 — TypeSSP333(; β = 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 — TypeSSP433An IMEX SSPRK algorithm from [10], with 4 implicit stages, 3 explicit stages, and 3rd order accuracy. Also called SSP3(433) in [11].
ClimaTimeSteppers.DBM453 — TypeDBM453An IMEX ARK algorithm from [13], Appendix A, with 4 implicit stages, 5 explicit stages, and 3rd order accuracy.
ClimaTimeSteppers.HOMMEM1 — TypeHOMMEM1An IMEX ARK algorithm from [14], section 4.1, with 5 implicit stages, 6 explicit stages, and 2nd order accuracy.
ClimaTimeSteppers.ARK2GKC — TypeARK2GKC(; 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 — TypeARK437L2SA1An 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 — TypeARK548L2SA2An 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 — TypeSSPKnothSSPKnoth 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 — TypeSSP22HeunsAn SSPRK algorithm from [17], with 2 stages and 2nd order accuracy. Also called Heun's method ([18]).
ClimaTimeSteppers.SSP33ShuOsher — TypeSSP33ShuOsherAn SSPRK algorithm from [17], with 3 stages and 3rd order accuracy.
ClimaTimeSteppers.RK4 — TypeRK4The RK4 algorithm from [19], a Runge-Kutta method with 4 stages and 4th order accuracy.
Old LSRK Interface
ClimaTimeSteppers.ForwardEulerODEFunction — TypeForwardEulerODEFunction(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 — TypeLowStorageRungeKutta2N <: 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 — TypeLSRK54CarpenterKennedy()The 4th-order, 5-stage [LowStorageRungeKutta2N])(ref) scheme from Solution 3 of [20].
ClimaTimeSteppers.LSRK144NiegemannDiehlBusch — TypeLSRK144NiegemannDiehlBusch()The 4th-order, 14-stage, [LowStorageRungeKutta2N])(ref) scheme of [21] with optimized stability region
ClimaTimeSteppers.LSRKEulerMethod — TypeLSRKEulerMethod()An implementation of explicit Euler method using LowStorageRungeKutta2N infrastructure. This is mainly for debugging.
Old Multirate Interface
ClimaTimeSteppers.Multirate — TypeMultirate(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.MultirateInfinitesimalStep — TypeMultirateInfinitesimalStepMultirate Infinitesimal Step (MIS) methods of [4] and [5].
The available implementations are:
ClimaTimeSteppers.MIS2 — TypeMIS2()The MIS2 Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS3C — TypeMIS3C()The MIS3C Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS4 — TypeMIS4()The MIS4 Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.MIS4a — TypeMIS4a()The MIS4a Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.TVDMISA — TypeTVDMISA()The TVDMISA Total Variation Diminishing (TVD) Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.TVDMISB — TypeTVDMISB()The TVDMISB Total Variation Diminishing (TVD) Multirate Infinitesimal Step (MIS) method of [5].
ClimaTimeSteppers.WickerSkamarockRungeKutta — TypeWickerSkamarockRungeKutta <: 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 — TypeWSRK2()The 2 stage, 2nd order RK2 scheme of [6].
ClimaTimeSteppers.WSRK3 — TypeWSRK3()The 3 stage, 2nd order (3rd order for linear problems) RK3 scheme of [7].