From Simplex Splitting to Native Mixed Cells — and Mesher Rough Edges
Why splitting structured quad, prism, and hex PMLs into triangles and tetrahedra broke accuracy and rotational symmetry, and which meshing pathologies remain.
Early architectural contract ADR 0004 drew a clean line between meshing and physics: SimplexMesh — triangles in 2D, tetrahedra in 3D — was the sole mesh type any PDE kernel read. When femcore::meshing generated structured rectangular absorbing layers (Quad in 2D, Prism and Hex in 3D), Mesh::discretise() dutifully cut every quadrilateral into two triangles, every prism into three tetrahedra, and every hexahedron into six chiral tetrahedra before handing the model to a solver.
Like the solver port, the adaptation and structured-meshing core (femmesh in docs/ports/meshers/PROVENANCE.md) was written from scratch in zero-dependency Rust without ever reading GPL/LGPL mesh generators (Gmsh, TetGen, CGAL, Mmg). Unifying the mesh types (R01, R09) quickly cured 0-based vs 1-based boundary label confusion — yet keeping the simplex-splitting assumption inside Physics::solve quietly hurt open-boundary accuracy (ADR 0128).
How Simplex Splitting Damaged Structured Absorbing Layers
Cutting tensor-product PML shells into simplices broke three physical properties simultaneously:
- Bloated DOFs and oblique edge orientation: Cutting quads, prisms, and hexahedra multiplied PML cell counts by 2×–6× and inflated 3D absorbing-layer Nédélec DOFs by 29%–57%, directly slowing
LBL^Hfactorisations. Worse, diagonal tetrahedral edges skewed vector basis functions across normal attenuation and tangential propagation axes. - Broken rotational symmetry: Splitting square or cylindrical hexahedral layers with a preferred diagonal hand breaks $C_{4v}$ mirror symmetry, artificially lifting degenerate doublet frequencies inside symmetric waveguides and cavities.
- Logarithmic tangential locking under singular stretch poles: In Rational PMLs and Infinite Elements, coordinate metrics diverge like $(1 - t)^{-2}$ as the shell maps physical coordinates toward infinity. Simplicial shape functions couple radial decay with transverse interpolation and lock severely, creating artificial reflection unless pushed far from the device.
ADR 0128 replaced that splitting contract with native MixedDiscretisation (femcore::mesh::mixed, fem_mixed, edge_mixed): Tri + Quad in 2D and Tet + Prism + Hex in 3D remain uncut all the way into physics assembly, enforced by canonical $D_3$/$D_4$ face permutations and a zero-transition-pyramid conformity invariant (validate_conforming). On Nédélec curl-curl cavities, native Hex/Prism edges preserve discrete cohomology ($|K G_{1,2}|_\infty < 10^{-13}$) and $C_{4v}$ doublet degeneracy ($|\Delta f / f| < 10^{-13}$), while pure-simplex models continue through untouched fast paths and field output projects lazily on write (MixedToSimplexProjector) without altering HDF5 or XDMF formats.
Concentric boundary extrusion also ended the older workflow (ADR 0052, ADR 0069) where users had to pad a dummy CAD box by +thickness and boolean-slice up to 26 corner domains by hand. Today geom::Op::Pml extrudes outward directly across seven canonical Cartesian, cylindrical, and spherical topologies, backed by validate_pml_ray_invariance so illegal spherical shells cutting flat multi-layer wafers ($\partial_R \varepsilon \neq 0$) or cylindrical shells pierced by waveguides are caught before meshing.
Rough Edges Still Visible in Practice
Even with native mixed cells and curved order-2 tetrahedra (ADR 0082, ADR 0110), ROUGH_SPOTS.md and benchmark validation runs record several meshing pathologies that users still encounter:
- 200–300 nm planar fillet locking in
sheet3d: When densely sampled polygon arcs create tiny fillet chords along zero-thickness superconducting traces, 2D constrained Ruppert refinement exhaustsmax_steiner_multiplier, stalling volumetric FEM refinement (365.6%error on the S1.4 multi-qubit reference unless routed through 3-layerplanar_bemat4.04%median error in1.03 s). - Slanted rhombic periodic cells (
R29): Axis-aligned periodic boundary pairs match node counts reliably, whereas slantedPolygonwalls in non-orthogonal hexagonal unit cells can trigger degenerate sub-nanometre segment repeats inside Ruppert splitting — mismatching vertex counts between paired Floquet walls unless run on rectangular supercells. - Curved geometry scope limits (
R32,R33): Enabling quadraticcurvedelements bends boundaries inems::cavityand conformalsheet3d_curvearcs (ADR 0121), yet 3Dsmsanddfsstill read straight cell geometry, and creases where two curved faces meet — or where a curved face meets a periodic twin — remain piecewise linear. - Unscaled
add_sizelocal corner patches inconvergence_check(R11b): Standard uniform refinement scales global element sizes and wavelength rules while leaving explicit geometryadd_sizezones unchanged (ADR 0061). On anchor-loss MEMS resonators dominated by singular re-entrant corner stresses, bulk-only refinement can converge artificially slowly (~4% $Q$ shift between coarse steps) unlessscale_sizes(ADR 0112) or corner patches are adjusted deliberately.
Exposing diagnostics such as min_pml_scaled_jacobian, Ruppert Steiner exhaustion messages, and explicit layer-fraction filtering (layer_frac) ensures these geometric limits surface as clear warnings rather than quiet numerical bias.