qmat

Main sub-packages 📦

  • qcoeff : to generate the \(Q\)-coefficients (Butcher tables)

  • qdelta : to generate \(Q_\Delta\) approximations for \(Q\) matrices

Secondary sub-packages 🍭

  • solvers : implementations of time-integration solvers that make use of qmat-generated coefficients

  • playgrounds: non-tested but documented codes with experiments or small applications with qmat

Utility modules ⚙️

  • lagrange : Barycentric polynomial approximations (integral, interpolation, derivative)

  • nodes : generation of multiple types of quadrature nodes

  • mathutils : utility functions for math operations

  • utils : utility functions for the whole package

Examples

>>> from qmat import genQCoeffs, genQDeltaCoeffs
>>>
>>> # Coefficients of a specific collocation method
>>> nodes, weights, Q = genQCoeffs(
>>>     "Collocation", nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
>>>
>>> # QDelta matrix from Implicit-Euler based SDC
>>> QDelta = genQDeltaCoeffs("IE", nodes=nodes)
>>>
>>> # Butcher table of the classical explicit RK4 method
>>> c, b, A = genQCoeffs("ERK4")
>>> from qmat import Q_GENERATORS, QDELTA_GENERATORS
>>> print(Q_GENERATORS)         # list all available generator classes for Q coefficients
>>> print(QDELTA_GENERATORS)    # list all available generator classes for QDelta approximations

Submodules