Skip to main content

QMat Package

Read the Docs Repo status CI pipeline codecov PyPI - Package PyPI - Downloads

qmat is a python package to generate matrix coefficients related to Collocation methods, Spectral Deferred Corrections (SDC), and more generally for Runge-Kutta methods.

It allows to generate $Q$-coefficients for multi-stages methods (equivalent to Butcher tables) :

$$ Q\text{-coefficients : } \begin{array}{c|c} \tau & Q \ \hline & w^\top \end{array} \quad \Leftrightarrow \quad \begin{array}{c|c} c & A \ \hline & b^\top \end{array} \quad\text{(Butcher table)} $$

and many different lower-triangular approximations of the $Q$ matrix, named $Q_\Delta$, which are key elements for Spectral Deferred Correction (SDC), or more general Iterated Runge-Kutta Methods. It also contains generic time-integration solvers based on $Q$ and $Q_\Delta$ coefficients, that can be used for quick testing and experiments.

DOI

Installation

pip install qmat

🔍 See more detailed instructions for conda environment, development, ...

Basic usage

📜 If you are already familiar with those concepts, you can use this package like this :

from qmat import genQCoeffs, genQDeltaCoeffs

# Coefficients or 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")

🔔 If you are not familiar with SDC or related methods, and want to learn more about it, checkout the latest documentation build and in particular the step by step notebook tutorials

For any contribution, please checkout out (very cool) Contribution Guidelines and the current Development Roadmap.

Projects relying on qmat

  • pySDC : Python implementation of the spectral deferred correction (SDC) approach and its flavors, esp. the multilevel extension MLSDC and PFASST.
  • SWEET : Shallow Water Equation Environment for Tests, Awesome! (C++).

Links

Developers

How to cite

@software{lunet_2025_16911004,
  author       = {Lunet, Thibaut and Baumann, Thomas and Speck, Robert},
  title        = {Parallel-in-Time/qmat},
  month        = aug,
  year         = 2025,
  publisher    = {Zenodo},
  version      = {v0.1.19},
  doi          = {10.5281/zenodo.16911004},
  url          = {https://doi.org/10.5281/zenodo.16911004},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmat-0.1.20.tar.gz (1.3 MB view details)

Uploaded Source

File details

Details for the file qmat-0.1.20.tar.gz.

File metadata

  • Download URL: qmat-0.1.20.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for qmat-0.1.20.tar.gz
Algorithm Hash digest
SHA256 8dc919954a72ac1f810b92acdff396fd5e7d4c9f15e5437e266c78557842e50d
MD5 096c3c9c52b8e77ee471cf71a842ff86
BLAKE2b-256 61de6aa70c5d57704a955df65b7a928a3de897423fdb0d6162b33fcc6d1a2ce3

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmat-0.1.20.tar.gz:

Publisher: publish.yml on Parallel-in-Time/qmat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page