qmat.qdelta.timestepping ======================== .. py:module:: qmat.qdelta.timestepping .. autoapi-nested-parse:: 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] `_. .. rubric:: 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 ------- .. autoapisummary:: qmat.qdelta.timestepping.TimeStepping qmat.qdelta.timestepping.BE qmat.qdelta.timestepping.FE qmat.qdelta.timestepping.TRAP qmat.qdelta.timestepping.BEPAR qmat.qdelta.timestepping.TRAPAR Module Contents --------------- .. py:class:: TimeStepping(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.TimeStepping :parts: 1 Base class for time-stepping based :math:`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. .. py:attribute:: deltas :type: numpy.ndarray Differences between nodes .. py:attribute:: nodes :type: numpy.ndarray Array of normalized nodes .. py:attribute:: tLeft :type: float :value: 0 Left bound for the nodes .. py:method:: extractParams(qGen: qmat.qdelta.QGenerator) -> dict :staticmethod: Extract from a :math:`Q`-generator object all parameters required to instantiate the :math:`Q_\Delta`-generator .. py:property:: size :type: int Dimension of the approximated :math:`Q`-coefficients (number of nodes) .. py:class:: BE(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.BE :parts: 1 Approximation based on Backward Euler steps between the nodes .. py:attribute:: aliases :value: ['IE'] .. py:method:: computeQDelta(k=None) Compute and returns the :math:`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** :rtype: np.ndarray .. py:class:: FE(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.FE :parts: 1 Approximation based on Forward Euler steps between the nodes .. py:attribute:: aliases :value: ['EE'] .. py:method:: computeQDelta(k=None) Compute and returns the :math:`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** :rtype: np.ndarray .. py:property:: dTau :type: numpy.ndarray The :math:`\delta_\tau` coefficients associated to :math:`Q_\Delta` .. py:class:: TRAP(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.TRAP :parts: 1 Approximation based on Trapezoidal Rule between the nodes .. py:attribute:: aliases :value: ['CN'] .. py:method:: computeQDelta(k=None) Compute and returns the :math:`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** :rtype: np.ndarray .. py:property:: dTau :type: numpy.ndarray The :math:`\delta_\tau` coefficients associated to :math:`Q_\Delta` .. py:class:: BEPAR(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.BEPAR :parts: 1 Approximation based on parallel Backward Euler steps from zero to nodes .. py:attribute:: aliases :value: ['IEpar'] .. py:method:: computeQDelta(k=None) Compute and returns the :math:`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** :rtype: np.ndarray .. py:class:: TRAPAR(nodes, tLeft=0, **kwargs) .. autoapi-inheritance-diagram:: qmat.qdelta.timestepping.TRAPAR :parts: 1 Approximation based on parallel Trapezoidal Rule from zero to nodes .. py:method:: computeQDelta(k=None) Compute and returns the :math:`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** :rtype: np.ndarray .. py:property:: dTau :type: numpy.ndarray The :math:`\delta_\tau` coefficients associated to :math:`Q_\Delta`