qmat.qdelta.algebraic

Submodule for QDelta coefficients based on algebraic approaches, in particular the LU trick from [Weiser, 2014].

Examples

>>> from qmat.qcoeff.collocation import Collocation
>>> coll = Collocation(nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
>>>
>>> from qmat import genQDeltaCoeffs
>>> QDelta = genQDeltaCoeffs("LU", Q=coll.Q)
>>>
>>> from qmat.qdelta.algebraic import LDU
>>> gen = LDU(Q=coll.Q)
>>> QDelta = gen.getQDelta()

Classes

PIC

Picard approximation (zeros)

Exact

Takes Q (exact approximation)

LU

LU approximation from [Weiser, 2014]

LU2

LU approximation from [Weiser, 2014] multiplied by 2

QPar

Approximation using diagonal of Q

GS

Approximation using lower triangular part of Q

LDU

Diagonal approximation using LDU factorization

Module Contents

class PIC(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.PIC

Picard approximation (zeros)

aliases = ['Picard']
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

class Exact(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.Exact

Takes Q (exact approximation)

aliases = ['EXACT']
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

class LU(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.LU

LU approximation from [Weiser, 2014]

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

class LU2(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.LU2

LU approximation from [Weiser, 2014] multiplied by 2

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

class QPar(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.QPar

Approximation using diagonal of Q

aliases = ['Qpar', 'Qdiag']
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

class GS(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.GS

Approximation using lower triangular part of Q

aliases = ['GaussSeidel']
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

class LDU(Q, **kwargs)[source]
Inheritance diagram of qmat.qdelta.algebraic.LDU

Diagonal approximation using LDU factorization

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