Contributing to the online encyclopedia of quadrature rules

Making suggestions

If you want to suggest changes to the online encyclopedia of quadrature rules, please use the issue tracker on GitHub.

Contributing directly

Submitting a pull request

If you want to directly submit changes to the online encyclopedia of quadrature rules, you can do this by forking the GitHub repository, making changes, then submitting a pull request. If you want to contribute, but are unsure where to start, have a look at the issue tracker for issues labelled "good first issue".

Adding a quadrature rule

Rules in the online encyclopedia of quadrature rules are defined using files in the rules/ folder. A yaml file called Qxxxxxx.qr (where xxxxxx is the next unused index) is used to define a family of rules. The entries in this yaml file are:

NameRequiredDescription
nameThe name of the rule (ascii), with ‑‑ used between names of different people (eg Gauss‑‑Legendre).
alt‑namesAlternative names of the rule.
integral‑typeThe type of the integral (default: single).
integrandThe integrand that the quadrature rule can be used to approximate.
notesNotes about the quadrature rule.
referencesReferences to where the rule is defined.

Alongside this yaml file, a folder called Qxxxxxx is included, which contants a series of yaml files called *.rule. Each of these files contains the points and weights for an instance of the quadrature family on a given domain with a given order. At the top of this file, metadata in included in yaml format between two lines containing only ‑‑. These entries in the metadata are used:

NameRequiredDescription
domainThe domain of the integral.
orderThe order (or degree) of the rule.

After the metadata, the points and weights are given in format point_0 point_1 ... | weight (where (point_0, point_1, ...) are the barycentric coordinates of a quadrature point) with one line for each pair of points.

Testing your contribution

When you open a pull request, a series of tests and style checks will run via GitHub Actions. (You may have to wait for manual approval for these to run.) These tests and checks must pass before the pull request can be merged. If the tests and checks fail, you can click on them on the pull request page to see where the failure is happening.

Code of conduct

We expect all our contributors to follow our code of conduct. Any unacceptable behaviour can be reported to Matthew (quadraturerules@mscroggs.co.uk).