PolytopeQuadrature.h file
Cached quadrature data attached to mesh polytopes.
This file defines:
- PolytopeQuadrature, which stores the mapped quadrature points associated with a specific quadrature formula on a specific polytope.
- PolytopeQuadratureIndex, a mesh-owned, thread-safe cache indexed by polytope dimension, polytope index, and quadrature persistent formula.
Purpose
Reference quadrature formulas belong to the QF module and live on reference polytopes. In contrast, this file provides a geometry-side cache of their realization on concrete mesh polytopes.
For a polytope and a reference quadrature formula , the realized quadrature consists of the mapped geometric points:
where is the polytope transformation.
Cache organization
The cache is organized as:
where:
- is the polytope dimension,
- is the polytope index within that dimension.
Each dimension stores formula-version entries, each owning a dense array of polytope slots. A hot formula pointer and a bounded formula lookup accelerate access; the complete formula index retains every published version.
Lookup order is:
- hot entry,
- bounded formula lookup and complete formula index,
- lazy construction on miss.
Hits are promoted to the hot formula pointer. New versions are appended to stable owned storage; previously borrowed quadratures are not replaced.
Key
The formula key is the address of a persistent immutable QuadratureFormula. Its samples and address remain valid until process termination. Earlier mapped samples remain alive until mesh geometry flush; changing integrator order selects a different published formula.
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::Geometry
- Meshes, geometric transformations, and mapped evaluation.
Classes
- class Rodin::Geometry::PolytopeQuadrature
- Cached quadrature attached to one specific polytope.
- class Rodin::Geometry::PolytopeQuadratureIndex
- Thread-safe cache of polytope quadratures.