qmat.playgrounds.tibo.imex
Classes
Base class for an IMEX differential operator |
|
Coefficient based solver class for IMEX differential operators. |
Module Contents
- class CoeffSolverIMEX(diffOp, tEnd=1, nSteps=1, t0=0)[source]

Coefficient based solver class for IMEX differential operators.
- diffOp: DiffOpIMEX = None
Differential Operator implementing \(f(u,t)\).
- solve(QI, wI, QE, wE, uNum=None)[source]
Solve the ODE considering lower-triangular \(Q\) coefficients.
This is equivalent to the classical implementation of a generic Runge-Kutta method using its Butcher table. For each time-step, it defines a node solution (or stage) \(u_{m}\) that is solved using previously computed node solution :
\[u_{m} - \Delta{t}q_{m,m}f(u_m,t_m) = u_0 + \Delta{t}\sum_{j=1}^{m-1}q_{m,j}f(u_j, t_j),\]where \(t_m = t_0 + \tau_m\) and \(q_{i,j}\) are the coefficients \(Q\). Finally, the step update is done using all computed node solutions :
\[u(t_0+\Delta{t}) \simeq u_0 + \sum_{m=1}^{M} \omega_{m} f(u_m, t_m),\]where \(\omega_{m}\) are the weights associated to the \(Q\)-coefficients. If no weights are provided, then it simply uses the last node solution for the step update :
\[u(t_0+\Delta{t}) \simeq u_M\]- Parameters:
Q (np.2darray-like) – The lower-triangular \(Q\)-coefficients matrix.
weights (np.1darray-like) – The associated :math:omega_{m}` weights. If not provided, use the last node solution for the update (requires \(\tau_{M} = 1\)).
uNum (np.ndarray, optional) – Array of shape (nSteps+1,*uShape), that can be use to store the result and avoid creating it internally. The default is None.
tInit (float, optional) – Initial time offset to be added to solver’s own t0 for successive solve calls. The default is 0.
- Returns:
uNum – Array of shape (nSteps+1,*uShape) that stores the solution at each time-step.
- Return type:
np.ndarray
