qmat.qdelta.diag
QDelta coefficients based on minimization approaches. In particular, generates the diagonal coefficients from [Caklovic et al., 2024].
Examples
>>> from qmat.qcoeff.collocation import Collocation
>>> coll = Collocation(nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
>>>
>>> from qmat import genQDeltaCoeffs
>>> QDelta = genQDeltaCoeffs("MIN-SR-NS", nodes=coll.nodes)
>>>
>>> from qmat.qdelta.diag import MIN_SR_S, MIN_SR_FLEX
>>> minSRS= MIN_SR_S(coll.nNodes, coll.nodeType, coll.quadType)
>>> QDelta = minSRS.getQDelta()
>>> minSRFLEX = MIN_SR_FLEX(coll.nNodes, coll.nodeType, coll.quadType)
>>> QD1, QD2, QD3 = minSRFLEX.genCoeffs(k=[1,2,3])
Classes
Naive diagonal coefficients based on spectral radius optimization. |
|
Base (unregistered) class for diagonal coefficients stored in tables. |
|
Magic diagonal coefficients from [Speck, 2021]. |
|
Diagonal coefficients from [van der Houwen & Sommeijer, 1991]. |
|
Diagonal MIN-SR-NS coefficients from [Caklovic et al., 2024]. |
|
Diagonal MIN-SR-S coefficients from [Caklovic et al., 2024]. |
|
Diagonal MIN-SR-FLEX coefficients from [Caklovic et al., 2024] |
|
Diagonal coefficients allowing order jump |
|
Diagonal coefficients allowing order jump while still maintaining high stability |
|
Diagonal coefficients build on divided node (1 here) |
|
Diagonal coefficients build on divided node (2 here) |
|
Diagonal coefficients build on divided node (3 here) |
|
Diagonal coefficients build on divided node (4 here) |
|
Diagonal coefficients build on divided node (5 here) |
Functions
|
Utility function to check k parameter for k-dependent generators |
|
Module Contents
- class MIN(Q, **kwargs)[source]

Naive diagonal coefficients based on spectral radius optimization.
- aliases = ['MIN-Speck']
- class FromTable(nNodes, nodeType, quadType, **kwargs)[source]

Base (unregistered) class for diagonal coefficients stored in tables.
- nNodes
- nodeType
- quadType
- static extractParams(qGen: qmat.qcoeff.collocation.Collocation) dict[source]
Extract from a \(Q\)-generator object all parameters required to instantiate the \(Q_\Delta\)-generator
- property size
Dimension of the approximated \(Q\)-coefficients (number of nodes)
- class MIN3(nNodes, nodeType, quadType, **kwargs)[source]

Magic diagonal coefficients from [Speck, 2021].
- aliases = ['Magic_Numbers']
- class MIN_VDHS(nNodes, nodeType, quadType, **kwargs)[source]

Diagonal coefficients from [van der Houwen & Sommeijer, 1991].
- aliases = ['VDHS']
- class MIN_SR_NS(nodes, **kwargs)[source]

Diagonal MIN-SR-NS coefficients from [Caklovic et al., 2024].
- aliases = ['MIN-SR-NS', 'MIN_GT']
- 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
Dimension of the approximated \(Q\)-coefficients (number of nodes)
- class MIN_SR_S(nNodes, nodeType, quadType, **kwargs)[source]

Diagonal MIN-SR-S coefficients from [Caklovic et al., 2024].
- Parameters:
nNodes (int) – Number of nodes.
nodeType (str) – Type of node distribution, see
qmat.nodes.NodesGeneratorfor available types.quadType (str) – Quadrature type for the nodes, see
qmat.nodes.NodesGeneratorfor available types.**kwargs – Additional parameters given during a generic call, not used by this class.
- aliases = ['MIN-SR-S']
- coll
- nodeType
- quadType
- static extractParams(qGen: qmat.qcoeff.collocation.Collocation) dict[source]
Extract from a \(Q\)-generator object all parameters required to instantiate the \(Q_\Delta\)-generator
- property size
Dimension of the approximated \(Q\)-coefficients (number of nodes)
- computeCoeffs(M, a=None, b=None)[source]
Compute diagonal coefficients for a given number of nodes M. If a and b are given, then it uses as initial guess:
>>> a * nodes**b / M
If a is not given, then do not care about b and uses as initial guess:
>>> nodes / M
- Parameters:
M (int) – Number of collocation nodes.
a (float, optional) – a coefficient for the initial guess.
b (float, optional) – b coefficient for the initial guess.
- Returns:
coeffs (array) – The diagonal coefficients.
nodes (array) – The nodes associated to the current coefficients.
- class MIN_SR_FLEX(nNodes, nodeType, quadType, **kwargs)[source]

Diagonal MIN-SR-FLEX coefficients from [Caklovic et al., 2024]
- Parameters:
nNodes (int) – Number of nodes.
nodeType (str) – Type of node distribution, see
qmat.nodes.NodesGeneratorfor available types.quadType (str) – Quadrature type for the nodes, see
qmat.nodes.NodesGeneratorfor available types.**kwargs – Additional parameters given during a generic call, not used by this class.
- aliases = ['MIN-SR-FLEX']
- class Jumper(nodes, **kwargs)[source]

Diagonal coefficients allowing order jump
- aliases = ['JUMPER', 'FB']
- class FlexJumper(nodes, **kwargs)[source]

Diagonal coefficients allowing order jump while still maintaining high stability
- aliases = ['FLEX-JUMPER', 'FB2']
- class DNODES(nodes, **kwargs)[source]

Diagonal coefficients build on divided node (1 here)
- divider = 1
- aliases = ['DNODES-1']
- class DNODES2(nodes, **kwargs)[source]

Diagonal coefficients build on divided node (2 here)
- divider = 2
- aliases = ['DNODES-2']
- class DNODES3(nodes, **kwargs)[source]

Diagonal coefficients build on divided node (3 here)
- divider = 3
- aliases = ['DNODES-3']

