Skip to main content

Generation of Q-coefficients for Spectral Deferred Corrections (and other time-integration methods ...)

Project description

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 general multi-stages time-integration methods (like Runge-Kutta, etc ...).

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.

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 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.

Links

Project details


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.12.tar.gz (388.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: qmat-0.1.12.tar.gz
  • Upload date:
  • Size: 388.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qmat-0.1.12.tar.gz
Algorithm Hash digest
SHA256 258cfe0e50b2ce89e0bef7ee8b0dcb85ca8801d8a50fb2f48c466181d0f8e063
MD5 9ffae1e31e427bdca6f85d6b32eeef2f
BLAKE2b-256 5dae98bdd5e133c476e9153ac12a74e012301e248c30514d1040d238a6d190b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page