qmat.qdelta.timestepping
Submodule for QDelta coefficients based on time-stepping scheme. Allows to build equivalent SDC sweeps as those introduced in the original paper from [Dutt, Greengard & Rokhlin, 2000].
Examples
>>> from qmat.qcoeff.collocation import Collocation
>>> coll = Collocation(nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
>>>
>>> from qmat import genQDeltaCoeffs
>>> QDelta = genQDeltaCoeffs("IE", nodes=coll.nodes)
>>>
>>> from qmat.qdelta.timestepping import TRAP
>>> gen = TRAP(nodes=coll.nodes)
>>> SDelta, dTau = gen.genCoeffs(form="N2N", dTau=True)
Classes
Base class for time-stepping based \(Q_\Delta\) approximations |
|
Approximation based on Backward Euler steps between the nodes |
|
Approximation based on Forward Euler steps between the nodes |
|
Approximation based on Trapezoidal Rule between the nodes |
|
Approximation based on parallel Backward Euler steps from zero to nodes |
|
Approximation based on parallel Trapezoidal Rule from zero to nodes |
Module Contents
- class TimeStepping(nodes, tLeft=0, **kwargs)[source]

Base class for time-stepping based \(Q_\Delta\) approximations
- Parameters:
nodes (list-like) – Normalized nodes in increasing order.
tLeft (float, optional) – Left bound for the nodes. The default is 0.
**kwargs – Additional parameters given in a generic call, ignored by this class.
- deltas: numpy.ndarray
Differences between nodes
- nodes: numpy.ndarray
Array of normalized nodes
- tLeft: float = 0
Left bound for the nodes
- static extractParams(qGen: qmat.qdelta.QGenerator) dict[source]
Extract from a \(Q\)-generator object all parameters required to instantiate the \(Q_\Delta\)-generator
- property size: int
Dimension of the approximated \(Q\)-coefficients (number of nodes)
- class BE(nodes, tLeft=0, **kwargs)[source]

Approximation based on Backward Euler steps between the nodes
- aliases = ['IE']
- class FE(nodes, tLeft=0, **kwargs)[source]

Approximation based on Forward Euler steps between the nodes
- aliases = ['EE']
- computeQDelta(k=None)[source]
Compute and returns the \(Q_\Delta\) matrix, has to be implemented in the specialized class.
- Parameters:
k (int, optional) – Iteration number of the approximation. The default is None.
- Returns:
QDelta
- Return type:
np.ndarray
- property dTau: numpy.ndarray
The \(\delta_\tau\) coefficients associated to \(Q_\Delta\)
- class TRAP(nodes, tLeft=0, **kwargs)[source]

Approximation based on Trapezoidal Rule between the nodes
- aliases = ['CN']
- computeQDelta(k=None)[source]
Compute and returns the \(Q_\Delta\) matrix, has to be implemented in the specialized class.
- Parameters:
k (int, optional) – Iteration number of the approximation. The default is None.
- Returns:
QDelta
- Return type:
np.ndarray
- property dTau: numpy.ndarray
The \(\delta_\tau\) coefficients associated to \(Q_\Delta\)
- class BEPAR(nodes, tLeft=0, **kwargs)[source]

Approximation based on parallel Backward Euler steps from zero to nodes
- aliases = ['IEpar']
- class TRAPAR(nodes, tLeft=0, **kwargs)[source]

Approximation based on parallel Trapezoidal Rule from zero to nodes
- computeQDelta(k=None)[source]
Compute and returns the \(Q_\Delta\) matrix, has to be implemented in the specialized class.
- Parameters:
k (int, optional) – Iteration number of the approximation. The default is None.
- Returns:
QDelta
- Return type:
np.ndarray
- property dTau: numpy.ndarray
The \(\delta_\tau\) coefficients associated to \(Q_\Delta\)