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 formula identity.
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 slot stores:
- one hot entry for the fastest repeated-hit access path,
- one small bounded ring buffer of owned cached quadratures.
Lookup order is:
- hot entry,
- bounded per-slot cache,
- lazy construction on miss.
Hits in the bounded cache are promoted to the hot slot. Misses are inserted into the bounded cache in round-robin order and then promoted to the hot slot.
Key
The cache key is the address of the quadrature formula object:
This design assumes that callers obtain quadrature formulas from a canonical source such as PolytopeQuadratureFormula, so that the same logical formula has a stable object identity.
Namespaces
- namespace Rodin
- The Rodin library for finite element methods and shape optimization.
- namespace Rodin::Geometry
- Namespace Geometry.
Classes
- class Rodin::Geometry::PolytopeQuadrature
- Cached quadrature attached to one specific polytope.
- class Rodin::Geometry::PolytopeQuadratureIndex
- Thread-safe cache of polytope quadratures.