evoxels.timesteppers
Classes
|
First-order exponential Euler (ETD1) method for semilinear problems. |
|
First order Euler forward scheme. |
|
First‐order IMEX Fourier pseudo‐spectral scheme |
|
Runge-Kutta-Chebyshev Scheme of order 1. |
|
Runge-Kutta-Chebyshev Scheme of order 2. |
|
Classical explicit Runge-Kutta Scheme of order 4. |
Abstract interface for single‐step timestepping schemes. |
- class evoxels.timesteppers.ExponentialEuler(problem: SemiLinearODE, dt: float)
First-order exponential Euler (ETD1) method for semilinear problems.
Implementation of the exponential time differencing method of order 1 (ETD1) described in Hochbruck, Lubich, Selhofer (1998), doi:10.1137/S1064827595295337 Update:
u_{n+1} = u_n + dt * varphi_1(dt L) * rhs(u_n)
- where
varphi_1(z) = (exp(z) - 1) / z.
- __init__(problem: SemiLinearODE, dt: float) None
- dt: float
- property order: int
Temporal order of accuracy.
- phi1(z)
Compute varphi_1(z) = (exp(z)-1)/(z)
with special handling for small v to avoid loss of significance. Coefficients for the degree-6 Padé approximation are taken from Hochbruck, Lubich, Selhofer (1998), doi:10.1137/S1064827595295337
- phiPade(z, Q, Ncoeff, Dcoeff)
Evaluate (Q,Q)-Padé approximation of phi-function
This routine evaluates the exponential-integrator varphi_1(z) = (exp(z)-1)/z as the rational approximation
varphi_1(z) ≈ P_Q(z) / R_Q(z),
where P_Q and R_Q are degree-Q polynomials with coefficients given by Ncoeff and Dcoeff, respectively. It is used for arguments z near zero, where the direct formula suffers from loss of significance due to cancellation.
- problem: SemiLinearODE
- step(t: float, u: Any) Any
Take one timestep from t to (t+dt).
- Parameters:
t – Current time
u – Current state
- Returns:
Updated state at t + dt.
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.ForwardEuler(problem: ODE, dt: float)
First order Euler forward scheme.
- dt: float
- property order: int
Temporal order of accuracy.
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.PseudoSpectralIMEX(problem: SemiLinearODE, dt: float)
First‐order IMEX Fourier pseudo‐spectral scheme
aka semi-implicit Fourier spectral method; see [Zhu and Chen 1999, doi:10.1103/PhysRevE.60.3564] for more details.
- __init__(problem: SemiLinearODE, dt: float) None
- dt: float
- property order: int
Temporal order of accuracy.
- problem: SemiLinearODE
- step(t: float, u: Any) Any
Take one timestep from t to (t+dt).
- Parameters:
t – Current time
u – Current state
- Returns:
Updated state at t + dt.
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.RKC1(problem: ODE, dt: float, polygrad: int = 4, damping: float = 0.05)
Runge-Kutta-Chebyshev Scheme of order 1.
Based on the publication “Convergence properties of the Runge-Kutta-Chebyshev method” by Verwer, Hundsdorfer, Sommeijer (1990), doi: 10.1007/BF01386405
- damping: float = 0.05
- dt: float
- property order: int
Temporal order of accuracy.
- polygrad: int = 4
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.RKC2(problem: ODE, dt: float, polygrad: int = 4, damping: float = 0.15384615384615385)
Runge-Kutta-Chebyshev Scheme of order 2.
Based on the publication “Convergence properties of the Runge-Kutta-Chebyshev method” by Verwer, Hundsdorfer, Sommeijer (1990), doi: 10.1007/BF01386405
- damping: float = 0.15384615384615385
- dt: float
- property order: int
Temporal order of accuracy.
- polygrad: int = 4
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.RungeKutta4(problem: ODE, dt: float)
Classical explicit Runge-Kutta Scheme of order 4.
- dt: float
- property order: int
Temporal order of accuracy.
- step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.
- class evoxels.timesteppers.TimeStepper
Abstract interface for single‐step timestepping schemes.
- abstract property order: int
Temporal order of accuracy.
- step(t: float, u: Any) Any
Take one timestep from t to (t+dt).
- Parameters:
t – Current time
u – Current state
- Returns:
Updated state at t + dt.
- abstractmethod step_dt(t: float, dt: float, u: Any) Any
Take one timestep from
ttot + dt.