Numerical contracts and validation
These signatures and docstrings are rendered directly from the implementation. They define admissible geometry, degree relations, physical constraints and operator compatibility. They document implementation contracts. Consult the original publications linked in Methods for the hypotheses of their analyses.
Source modules
Dimension-dependent polynomial hypotheses for the MHM flux estimator.
The sufficient degree condition follows Theorem 5.2 of Barrenechea et al. (2026).
validate_estimator_face_partitions(continuous: Iterable[bool], subface_counts: Iterable[int]) -> None
Require independent subface polynomials for the cited estimator theorem.
Equation (3.1) and Theorem 5.2 use tests supported on each individual skeletal subface in dimensions two and three. C0 over several subfaces excludes these tests. C0 on one subface coincides with its DG polynomial space; canonical RT reconstruction is not restricted by this condition.
minimum_estimator_degree(trace_degree: int, dimension: int) -> int
Return ell+d from Theorem 5.2 for simplicial MHM in dimension two or three.
This is the sufficient polynomial condition used by the estimator. It is not a prerequisite for merely constructing canonical RT moments or for solving every primal MHM discretization.
validate_estimator_spaces(local_degree: int, trace_degree: int, reconstruction_degree: int, dimension: int) -> None
Require k>=ell+d and ell<=m<=k without conflating RT existence with error estimates.
Physical point ownership and reference pullback for scalar and vector FEM fields.
volume_centroid(mesh: Any) -> FloatArray
Integrate the geometric center of affine cells or triangulated polygons.
Simplex and Cartesian cell coordinates integrate exactly by their vertex means and positive cell measures. Polygon cells use their actual interior triangle partition, so a concave boundary's vertex mean is never substituted for its area moment. Curved and trilinear cells require a quadrature-based geometric moment and are deliberately excluded from this affine operation.
pullback_points(mesh: Any, points: Any, *, cells: Any = None) -> tuple[IntArray, FloatArray, FloatArray, FloatArray]
Locate physical points and return owner, reference point, Jacobian and determinant.
Affine simplex, rectangular, affine prismatic and trilinear hexahedral maps
are supported. Trilinear coordinates use Newton iteration on the actual
geometric map. Shared-interface evaluation chooses the first valid owner;
explicit cells preserve independently chosen one-sided values.
The Jacobian axes are (physical,reference), and det(J) is signed.
Explicit owners require storage proportional to the number of points,
independently of the total number of cells. Affine inverse maps and signed
determinants are computed once per distinct declared cell.
Dimension-specific sufficient compatibility conditions for declared vector traces.
require_strain_trace_compatibility(skeleton: SkeletonSpace, degree: int, refinement: int) -> None
Enforce the two-dimensional matching-mesh Fortin conditions of Lemma 4.5.
These are sufficient conditions, not a characterization of every stable pair. They prevent invisible trace modes before factorization. Continuous face subspaces inherit admissibility from their discontinuous containing space.