ODE Solvers

Interface

ClimaTimeSteppers.ClimaODEFunctionType
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.

source
ClimaTimeSteppers.AbstractAlgorithmConstraintType
AbstractAlgorithmConstraint

A 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).

source
ClimaTimeSteppers.SSPType
SSP

Indicates 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.

source
ClimaTimeSteppers.IMEXTableauType
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).

source
ClimaTimeSteppers.IMEXAlgorithmType
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.

source
ClimaTimeSteppers.ExplicitTableauType
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.

source
ClimaTimeSteppers.ExplicitAlgorithmFunction
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).

source

IMEX Algorithm Names

ClimaTimeSteppers.ARS111Type
ARS111

An 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.

source
ClimaTimeSteppers.ARS121Type
ARS121

An 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.

source
ClimaTimeSteppers.ARS122Type
ARS122

An IMEX ARK algorithm from [8], section 2, with 1 implicit stage, 2 explicit stages, and 2nd order accuracy. Also called IMEX midpoint.

source
ClimaTimeSteppers.SSP222Type
SSP222

An IMEX SSPRK algorithm from [10], with 2 implicit stages, 2 explicit stages, and 2nd order accuracy. Also called SSP2(222) in [11].

source
ClimaTimeSteppers.SSP332Type
SSP332

An IMEX SSPRK algorithm from [10], with 3 implicit stages, 3 explicit stages, and 2nd order accuracy. Also called SSP2(332)a in [11].

source
ClimaTimeSteppers.SSP333Type
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].

source
ClimaTimeSteppers.SSP433Type
SSP433

An IMEX SSPRK algorithm from [10], with 4 implicit stages, 3 explicit stages, and 3rd order accuracy. Also called SSP3(433) in [11].

source
ClimaTimeSteppers.ARK2GKCType
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.

source
ClimaTimeSteppers.ARK437L2SA1Type
ARK437L2SA1

An 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.

source
ClimaTimeSteppers.ARK548L2SA2Type
ARK548L2SA2

An 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.

source
ClimaTimeSteppers.SSPKnothType
SSPKnoth

SSPKnoth 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

source

Explicit Algorithm Names

Old LSRK Interface

Old Multirate Interface