Skip to main content

Quadrature rules

The online encylopedia of quadrature rules is a reference website that lists quadrature rules on a range of domains.

Quadrature rules are sets of points and weights that are used to approximate integrals. If ${p_0,\dots,p_{n-1}}\subset\mathbb{R}^d$ and ${w_0,\dots,w_{n-1}}\subset\mathbb{R}$ are the points and weights (repectively) of the quadrature rule for a single integral, then:

$$\int f(x),\mathrm{d}x \approx \sum_{i=0}^{n-1}f(p_i)w_i$$

Website

Before building the online encylopedia of quadrature rules, you must first install qrtools from the python directory:

cd python
python3 -m pip install .

The online encylopedia of quadrature rules website can then be built by running:

cd website
python3 build.py

Libraries

All of the quadrature rules included in the online encylopedia of quadrature rules are included in the quadraturerules library, which is available in the following languages:

Language Badges
C Test and build C library
C++ Test and build C++ library
Fortran Test and build Fortran 90 library
FORTRAN 77 Test and build Fortran 77 library
Julia Test and build Julia library
Python Test and build Python library PyPI
Rust Test and build Rust library crates.io docs.rs

Before building any of the libraries, you must first install qrtools from the python directory:

cd python
python3 -m pip install .

You can then build the libraries using the build.py script in the library directory. For example, to build the python library, you can run:

cd library
python build.py python

and to build the rust library, you can run:

cd library
python build.py rust

Python library

The quadraturerules Python library is available on PyPI. It can be installed by running:

python -m pip install quadraturerules

Usage

The library's function single_integral_quadrature can be used to get the points and weights of quadrature rules for a single integral. For example the following snippet will create an order 3 Xiao--Gimbutas rule on a triangle:

from quadraturerules import Domain, QuadratureRule, single_integral_quadrature

points, weights = single_integral_quadrature(
    QuadratureRule.XiaoGimbutas,
    Domain.Triangle,
    3,
)

Note that the points returned by the library are represented using barycentric coordinates.

Generating the library

The Python quadraturerules library can be generated from the templates in the online encyclopedia of quadrature rules GitHub repo. First clone the repo and move into the library directory:

git clone https://github.com/quadraturerules/quadraturerules.git
cd quadraturerules/library

The Python library can then be generated by running:

python build.py python

This will create a directory called python.build containing the Python source code.

Tests can then be run by moving into this folder and using pytest:

cd python.build
python -m pytest test/

Metadata

Release files for quadraturerules 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quadraturerules 0.12.0
File Size Uploaded Provenance
quadraturerules-0.12.0.tar.gz 1.2 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for quadraturerules 0.12.0
File Interpreter ABI Platform
quadraturerules-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.4 MB

Release files / quadraturerules-0.12.0.tar.gz

Download URL quadraturerules-0.12.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
57ad9fe6c9499947a72f46e2471e2ce508386e8d297a0c9dd1cf7aa7dcec917e
BLAKE2b-256 checksum
How to use checksums
0888a0919dd1ad5e8716e75812f6da3086dee62cfde022720f15f1b1751ce99f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Release files / quadraturerules-0.12.0-py3-none-any.whl

Download URL quadraturerules-0.12.0-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7bd97b48f1d20fa9a7cca444d5a45e15054948ced6d8f65e17a49fff64a33bfa
BLAKE2b-256 checksum
How to use checksums
e8fcf5dfd530947f336792c547f82631e10b2d301880b7ee266688311046ea78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

Security for quadraturerules 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for quadraturerules-0.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page