Rodin::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:

\[ \int_{\hat{K}} f(\hat{x}) \, d\hat{x} \approx \sum_{i=1}^n w_i \, f(\hat{x}_i) \]

where $ \hat{K} $ is a reference polytope, $ \hat{x}_i $ are the quadrature points, and $ w_i $ are the associated weights.

Available Quadrature Rules

RuleClassPolytopesExactness
CentroidQF::CentroidAll typesDegree 1 (linear). Single point at barycenter.
Gauss-LegendreQF::GaussLegendreAll typesDegree $ 2n-1 $ for $ n $ points (1D). Tensor-product or Duffy transform for higher dimensions.
Gauss-LobattoQF::GaussLobattoSegmentsDegree $ 2n-3 $ for $ n $ points. Includes endpoints (useful for spectral methods).
Grundmann-MöllerQF::GrundmannMollerSimplices onlyDegree $ 2s+1 $ for parameter $ s \geq 0 $ . 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.