Skip to content
/ qmat Public
forked from Parallel-in-Time/qmat

Package for the generation of coefficients used in Spectral Deferred Correction and related methods (Runge-Kutta, ...)

License

Notifications You must be signed in to change notification settings

lisawim/qmat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Links

About

Package for the generation of coefficients used in Spectral Deferred Correction and related methods (Runge-Kutta, ...)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%