The IMEX multistep methods of Ascher, Ruuth and Wetton (OrdinaryDiffEqBDF)
for a SplitODEProblem() u' = f1(u, p, t) + f2(u, p, t): f1 (stiff)
is treated implicitly by a BDF formula and f2 explicitly by
extrapolation. SBDF(order) has orders 1 to 4 and fixed steps;
IMEXEuler() is SBDF(1) and SBDF2(), SBDF3(), SBDF4() the
higher orders. With ark = TRUE the explicit term is evaluated at the
explicit Euler predictor (an additive Runge-Kutta form);
IMEXEulerARK() is SBDF(1, ark = TRUE). The step restarts at order 1
when the step size changes. The Jacobian of f1 is the jac of the
SplitFunction() or finite differences.
Usage
SBDF(order, ark = FALSE, extrapolant = "linear", autodiff = NULL)
SBDF2(...)
SBDF3(...)
SBDF4(...)
IMEXEuler(...)
IMEXEulerARK(...)Arguments
- order
The order (1 to 4).
- ark
Evaluate
f2at the explicit Euler predictor.- extrapolant
The initial guess of the Newton iteration:
"linear"or"constant".- autodiff
As for
ImplicitEuler().- ...
Arguments of
SBDF()other thanorder.
Examples
f1 <- function(u, p, t) -100 * u
f2 <- function(u, p, t) 1 + 0 * u
prob <- SplitODEProblem(f1, f2, 1, c(0, 1))
sol <- solve(prob, SBDF2(), dt = 1 / 20)
sol(1)
#> [1] 0.01
solve(prob, IMEXEuler(), dt = 1 / 20)$retcode
#> [1] "Success"