# `dedalus.core.timesteppers`

ODE solvers for timestepping.

## Module Contents

schemes
class MultistepIMEX(pencil_length, domain)

Base class for implicit-explicit multistep methods.

Parameters
• pencil_length (int) – Number of coefficients in a single pencil

• domain (domain object) – Problem domain

Notes

These timesteppers discretize the system

M.dt(X) + L.X = F

into the general form

aj M.X(n-j) + bj L.X(n-j) = cj F(n-j)

where j runs from {0, 0, 1} to {amax, bmax, cmax}.

The system is then solved as

(a0 M + b0 L).X(n) = cj F(n-j) - aj M.X(n-j) - bj L.X(n-j)

where j runs from {1, 1, 1} to {cmax, amax, bmax}.

References

1. Wang and S. J. Ruuth, Journal of Computational Mathematics 26, (2008).*

• Our coefficients are related to those used by Wang as:

amax = bmax = cmax = s aj = α(s-j) / k(n+s-1) bj = γ(s-j) cj = β(s-j)

stages = 1
step(solver, dt)

class CNAB1(pencil_length, domain)

1st-order Crank-Nicolson Adams-Bashforth scheme [Wang 2008 eqn 2.5.3]

Implicit: 2nd-order Crank-Nicolson Explicit: 1st-order Adams-Bashforth (forward Euler)

amax = 1
bmax = 1
cmax = 1
classmethod compute_coefficients(timesteps, iteration)
class SBDF1(pencil_length, domain)

1st-order semi-implicit BDF scheme [Wang 2008 eqn 2.6]

Implicit: 1st-order BDF (backward Euler) Explicit: 1st-order extrapolation (forward Euler)

amax = 1
bmax = 1
cmax = 1
classmethod compute_coefficients(timesteps, iteration)
class CNAB2(pencil_length, domain)

2nd-order Crank-Nicolson Adams-Bashforth scheme [Wang 2008 eqn 2.9]

Implicit: 2nd-order Crank-Nicolson Explicit: 2nd-order Adams-Bashforth

amax = 2
bmax = 2
cmax = 2
classmethod compute_coefficients(timesteps, iteration)
class MCNAB2(pencil_length, domain)

2nd-order modified Crank-Nicolson Adams-Bashforth scheme [Wang 2008 eqn 2.10]

Implicit: 2nd-order modified Crank-Nicolson Explicit: 2nd-order Adams-Bashforth

amax = 2
bmax = 2
cmax = 2
classmethod compute_coefficients(timesteps, iteration)
class SBDF2(pencil_length, domain)

2nd-order semi-implicit BDF scheme [Wang 2008 eqn 2.8]

Implicit: 2nd-order BDF Explicit: 2nd-order extrapolation

amax = 2
bmax = 2
cmax = 2
classmethod compute_coefficients(timesteps, iteration)
class CNLF2(pencil_length, domain)

2nd-order Crank-Nicolson leap-frog scheme [Wang 2008 eqn 2.11]

Implicit: ?-order wide Crank-Nicolson Explicit: 2nd-order leap-frog

amax = 2
bmax = 2
cmax = 2
classmethod compute_coefficients(timesteps, iteration)
class SBDF3(pencil_length, domain)

3rd-order semi-implicit BDF scheme [Wang 2008 eqn 2.14]

Implicit: 3rd-order BDF Explicit: 3rd-order extrapolation

amax = 3
bmax = 3
cmax = 3
classmethod compute_coefficients(timesteps, iteration)
class SBDF4(pencil_length, domain)

4th-order semi-implicit BDF scheme [Wang 2008 eqn 2.15]

Implicit: 4th-order BDF Explicit: 4th-order extrapolation

amax = 4
bmax = 4
cmax = 4
classmethod compute_coefficients(timesteps, iteration)
class RungeKuttaIMEX(pencil_length, domain)

Base class for implicit-explicit multistep methods.

Parameters
• pencil_length (int) – Number of fields in problem

• domain (domain object) – Problem domain

Notes

These timesteppers discretize the system

M.dt(X) + L.X = F

by constructing s stages

M.X(n,i) - M.X(n,0) + k Hij L.X(n,j) = k Aij F(n,j)

where j runs from {0, 0} to {i, i-1}, and F(n,i) is evaluated at time

t(n,i) = t(n,0) + k ci

The s stages are solved as

(M + k Hii L).X(n,i) = M.X(n,0) + k Aij F(n,j) - k Hij L.X(n,j)

where j runs from {0, 0} to {i-1, i-1}.

The final stage is used as the advanced solution*:

X(n+1,0) = X(n,s) t(n+1,0) = t(n,s) = t(n,0) + k

• Equivalently the Butcher tableaus must follow

b_im = H[s, :] b_ex = A[s, :] c[s] = 1

References

1. Ascher, S. J. Ruuth, and R. J. Spiteri, Applied Numerical Mathematics (1997).

step(solver, dt)

class RK111(pencil_length, domain)

1st-order 1-stage DIRK+ERK scheme [Ascher 1997 sec 2.1]

stages = 1
c
A
H
class RK222(pencil_length, domain)

2nd-order 2-stage DIRK+ERK scheme [Ascher 1997 sec 2.6]

stages = 2
γ
δ
c
A
H
class RK443(pencil_length, domain)

3rd-order 4-stage DIRK+ERK scheme [Ascher 1997 sec 2.8]

stages = 4
c
A
H
class RKSMR(pencil_length, domain)

(3-ε)-order 3rd-stage DIRK+ERK scheme [Spalart 1991 Appendix]

stages = 3
c
A
H