QF namespace
Module for defining quadrature formulae over reference polytopes.
The QF (Quadrature Formula) module provides numerical integration rules for computing integrals over reference polytopes. These quadrature rules approximate integrals by weighted sums of function evaluations:
where is a reference polytope, are the quadrature points, and are the associated weights.
Available Quadrature Rules
| Rule | Class | Polytopes | Exactness |
|---|---|---|---|
| Centroid | QF:: | All types | Degree 1 (linear). Single point at barycenter. |
| Gauss-Legendre | QF:: | All types | Degree for points (1D). Tensor-product or Duffy transform for higher dimensions. |
| Gauss-Lobatto | QF:: | Segments | Degree for points. Includes endpoints (useful for spectral methods). |
| Grundmann-Möller | QF:: | Simplices only | Degree for parameter . Designed specifically for simplicial elements. |
Automatic Selection
During assembly, the quadrature order is automatically chosen based on the polynomial degree of the finite element space and the integrands. Users can also specify a quadrature rule explicitly:
QF::GaussLegendre qf(Polytope::Type::Triangle, 5); // order 5 on triangles
Higher-Dimensional Construction
- Tensor-product geometries (quadrilaterals, hexahedra): constructed via tensor products of 1D Gauss-Legendre rules.
- Simplicial geometries (triangles, tetrahedra): the Duffy transformation maps tensor-product rules to the simplex, or Grundmann-Möller rules are used natively.
Rodin provides quadrature rules for all supported polytope types (segments, triangles, quadrilaterals, tetrahedra, hexahedra, wedges).
Classes
- class Centroid
- Single-point centroid quadrature formula.
- class GaussLegendre
- Gauss-Legendre quadrature formula on reference polytopes.
- class GaussLobatto
- Gauss-Lobatto quadrature formula on reference polytopes.
- class GrundmannMoller
- Grundmann-Möller simplex quadrature formula.
- class PolytopeQuadratureFormula
- Generic quadrature formula dispatcher for all polytope types.
- class QuadratureFormulaBase
- Abstract base class for quadrature formulas.