dedalus.core.timesteppers
¶
ODE solvers for timestepping.
Module Contents¶
-
STORE_LU
¶
-
PERMC_SPEC
¶
-
USE_UMFPACK
¶
-
class
MultistepIMEX
(nfields, domain)¶ Base class for implicit-explicit multistep methods.
Parameters: - nfields (int) – Number of fields in problem
- 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
- 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)
-
step
(self, solver, dt)¶ Advance solver by one timestep.
-
class
CNAB1
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
SBDF1
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
CNAB2
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
MCNAB2
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
SBDF2
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
CNLF2
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
SBDF3
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
SBDF4
¶ Bases:
dedalus.core.timesteppers.MultistepIMEX
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
(self, timesteps, iteration)¶
-
-
class
RungeKuttaIMEX
(nfields, domain)¶ Base class for implicit-explicit multistep methods.
Parameters: - nfields (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
- Ascher, S. J. Ruuth, and R. J. Spiteri, Applied Numerical Mathematics (1997).
-
step
(self, solver, dt)¶ Advance solver by one timestep.
-
class
RK111
¶ Bases:
dedalus.core.timesteppers.RungeKuttaIMEX
1st-order 1-stage DIRK+ERK scheme [Ascher 1997 sec 2.1]
-
stages
= 1¶
-
c
¶
-
A
¶
-
H
¶
-
-
class
RK222
¶ Bases:
dedalus.core.timesteppers.RungeKuttaIMEX
2nd-order 2-stage DIRK+ERK scheme [Ascher 1997 sec 2.6]
-
stages
= 2¶
-
γ
¶
-
δ
¶
-
c
¶
-
A
¶
-
H
¶
-