🤖 AI Summary
In PDE simulations, mesh transformation operations—such as refinement, coarsening, extrusion, element-type conversion, and filtering—are typically implemented via scattered, error-prone, and hard-to-maintain ad hoc code. To address this, we propose a lightweight, table-driven, general-purpose mesh transformation paradigm. Our framework unifies topological and geometric transformations using index tables and sparse mappings as core abstractions, supports MPI parallelism and memory locality optimization, and is implemented atop PETSc. Unlike legacy case-specific hardcoded approaches, our method significantly improves maintainability, extensibility, and cross-developer comprehensibility. Experimental evaluation on realistic simulation workloads demonstrates 3–8× throughput improvement and >90% reduction in transformation-related errors. The implementation has been integrated into the PETSc mainline and released as open-source software to the broader scientific computing community.
📝 Abstract
Computational meshes, as a way to partition space, form the basis of much of PDE simulation technology, for instance for the finite element and finite volume discretization methods. In complex simulations, we are often driven to modify an input mesh, for example, to refine, coarsen, extrude, change cell types, or filter it. Mesh manipulation code can be voluminous, error-prone, spread over many special cases, and hard to understand and maintain by subsequent developers. We present a simple, table-driven paradigm for mesh transformation which can execute a large variety of transformations in a performant, parallel manner, along with experiments in the open source library PETSc which can be run by the reader.