implicit
Definitions of implicit time marching schemes for a scalar transport equation.
- class BDF2(mesh, root=None, **default)
Class responsible for implementing an implicit 2nd-order backward differentiation formula that updates the current solution (\(t = t^{n}\)) to the next time step (\(t = t^{n+1}\)), using also the previous solution (\(t = t^{n-1}\)). Namely,
\[\widetilde{\bm{M}} \bm{u}^{n+1} + \bm{B} \bm{u}^{n+1} = \widetilde{\bm{M}} \Big( \frac{4}{3} \bm{u}^{n} - \frac{1}{3} \bm{u}^{n-1}\Big),\]where \(\widetilde{\bm{M}} = \frac{3}{2\delta t} \int_{D} u v\, d\bm{x}\) is the weighted mass matrix and \(\bm{B}\) is the matrix associated with the spatial bilinear form, see
add_symbolic_spatial_forms()
for the implementation.
- class DIRKSchemes(mesh, root=None, **default)
Interface class responsible for configuring a generic diagonally-implicit Runge-Kutta scheme that updates the current solution (\(t = t^{n}\)) to the next time step (\(t = t^{n+1}\)), using s-stages. Namely,
\[\begin{split}\widetilde{\bm{M}} \bm{u}^{n+1} &= \widetilde{\bm{M}} \bm{u}^{n} - \frac{1}{a_{ii}} \sum_{i=1}^{s} b_i \bm{B} \bm{y}_{i},\\ \widetilde{\bm{M}}_{i} \bm{y}_{i} + \bm{B} \bm{y}_{i} &= \widetilde{\bm{M}}_{i} \bm{u}^{n} - \frac{1}{a_{ii}} \sum_{j=1}^{i-1} a_{ij} \bm{B} \bm{y}_{j},\end{split}\]where
\(\widetilde{\bm{M}}_{i} = \frac{1}{a_{ii}\delta t} \int_{D} u v\, d\bm{x}\) is the ith stage-weighted mass matrix.
\(\widetilde{\bm{M}}\) is based on \(a_{ii}=1\).
\(\bm{y}_{i}\) is the solution at the ith stage.
\(a_{ij}\) and \(b_{i}\) are taken from the Butcher of a specific scheme.
Finally, \(\bm{B}\) is the matrix associated with the spatial bilinear form, see
add_symbolic_spatial_forms()
for the implementation.
- class ImplicitEuler(mesh, root=None, **default)
Class responsible for implementing an implicit (backwards-)Euler time-marching scheme that updates the current solution (\(t = t^{n}\)) to the next time step (\(t = t^{n+1}\)). Namely,
\[\widetilde{\bm{M}} \bm{u}^{n+1} + \bm{B} \bm{u}^{n+1} = \widetilde{\bm{M}} \bm{u}^{n},\]where \(\widetilde{\bm{M}} = \frac{1}{\delta t} \int_{D} u v\, d\bm{x}\) is the modified mass matrix and \(\bm{B}\) is the matrix associated with the spatial bilinear form, see
add_symbolic_spatial_forms()
for the implementation.
- class ImplicitSchemes(mesh, root=None, **default)
- class SDIRK22(mesh, root=None, **default)
Updates the solution via a 2-stage 2nd-order (stiffly-accurate) singly diagonally-implicit Runge-Kutta (SDIRK). Taken from Section 2.6 in [2]. Its corresponding Butcher tableau is:
\[\begin{split}\begin{array}{c|cc} \alpha & \alpha & 0 \\ 1 & 1 - \alpha & \alpha \\ \hline & 1 - \alpha & \alpha \end{array}\end{split}\]where \(\alpha = (2 - \sqrt{2})/2\).
- Note:
No need to explicitly form the solution at the next time step, since this is a stiffly-accurate method, i.e. \(\bm{u}^{n+1} = \bm{y}_{2}\).
- class SDIRK33(mesh, root=None, **default)
Updates the solution via a 3-stage 3rd-order (stiffly-accurate) singly diagonally-implicit Runge-Kutta (SDIRK). Taken from Section 2.7 in [2]. Its corresponding Butcher tableau is:
\[\begin{split}\begin{array}{c|ccc} 0.4358665215 & 0.4358665215 & 0 & 0 \\ 0.7179332608 & 0.2820667392 & \phantom{-}0.4358665215 & 0 \\ 1 & 1.2084966490 & -0.6443631710 & 0.4358665215 \\ \hline & 1.2084966490 & -0.6443631710 & 0.4358665215 \end{array}\end{split}\]- Note:
No need to explicitly form the solution at the next time step, since this is a stiffly-accurate method, i.e. \(\bm{u}^{n+1} = \bm{y}_{3}\).