Skip to contents

Exponential integrators of OrdinaryDiffEqExponentialRK for semilinear problems u' = A u + f(u, t), given as SplitODEProblem(L, f, u0, tspan) with a SciML operator L (such as MatrixOperator(A) or DiagonalOperator(d)), or for any ODEProblem, whose Jacobian at the start of each step is then the linear part (from the jac_fn of the ODEFunction when given, otherwise by finite differences).

Usage

LawsonEuler(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

NorsettEuler(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

ETD1(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

ETDRK2(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

ETDRK3(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

ETDRK4(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

HochOst4(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

Friedli(krylov = FALSE, m = 30, iop = 0, autodiff = NULL)

ETD2()

Arguments

krylov

Whether to use Krylov approximations instead of precomputed operators.

m

Krylov subspace dimension.

iop

Incomplete orthogonalization length (0 for full Arnoldi).

autodiff

An ADType for the Jacobian of an ODEProblem without jac_fn.

Value

An algorithm object.

Details

LawsonEuler() is the first order Lawson Euler method, NorsettEuler() (alias ETD1()) the first order exponential Euler method, ETDRK2(), ETDRK3() and ETDRK4() the exponential time differencing Runge-Kutta methods of orders 2 to 4, HochOst4() the fourth order method of Hochbruck and Ostermann with stiff order 4, Friedli() Friedli's fourth order method, and ETD2() the second order exponential time differencing multistep method (split problems only). These are fixed step methods. With krylov = FALSE (the default) the exponential and phi functions of the operator are computed once (this needs a SplitODEProblem; a last step shortened to reach the final time gets its own operators, where upstream steps past it); with krylov = TRUE their actions are approximated in Krylov subspaces of dimension m, with incomplete orthogonalization of length iop (0 for full Arnoldi; Lanczos for symmetric operators). Either way the steps use the operator as constructed, as upstream does for out of place problems: an update function of the operator only enters through the right-hand side. The Krylov form of HochOst4() uses the third stage in its fifth stage, as the precomputed form does (upstream repeats the second there).

Examples

L <- MatrixOperator(matrix(c(-2, 1, 1, -2), 2))
prob <- SplitODEProblem(L, function(u, p, t) -u * u * u, c(1, 0.5), c(0, 1))
solve(prob, ETDRK4(), dt = 0.1)$u[[11]]
#> [1] 0.2295149 0.2156527
solve(prob, LawsonEuler(krylov = TRUE, m = 2), dt = 0.1)$u[[11]]
#> [1] 0.2215677 0.2089639