Extensible Programmatic Specification of Finite Element Methods
Theadora Fields Collin, Oded Stein, Gilbert Bernstein, Saman Amarasinghe
Key points
From the paper's conclusion- We address this problem by introducing ElementForge, a finite element system that is parametric over the literate mathematical specification of a finite element in a domain-specific language (DSL).
Abstract
Finite element methods (FEMs) are a powerful and ubiquitous tool for solving engineering problems. Experimenting with different finite elements can improve the quality and efficiency of solutions. In some cases, the wrong (but nonetheless most common) choice of finite element will produce solutions which converge to the wrong answer regardless of mesh resolution. However, in practice, the choice of finite element is not explored due to the complexity of re-deriving and re-implementing finite element methods. Trying a new finite element is challenging because practitioners must manually deduce formulas to use these elements and implement them within a potentially complex system. We address this problem by introducing ElementForge, a finite element system that is parametric over the literate mathematical specification of a finite element in a domain-specific language (DSL). The ElementForge compiler reasons about tensor spaces, tensors, and tensor bases from first principles to derive implementations of finite elements. The ElementForge compiler is able to automatically derive implementations of finite elements previously only derived by hand. Further, ElementForge minimally couples several key mathematical concepts, mainly tensor fields, mesh topologies, sparse tensors, and assembled finite element operators, to produce a complete finite element system that is parametric over the choice of element. Consequently, the elements derived by the compiler can be applied parametrically to new meshes, PDEs, and boundary conditions. We evaluate our system by implementing several simulations with different finite elements, demonstrating that our system can explore tradeoffs in generality, accuracy, speed, and representational complexity. For example, we are able to implement the Morley, Bell, Argyris, and Hermite like elements with less than 50 lines of code and use them all in a single simulation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Neural Spline Flow Diffeomorphisms for Pullback Finite Element Methods on Complex DomainsarXiv · 2026
- tgLang: A Domain-Specific Language for Geometry Processing and Computational Imaging Workflows.Journal of imaging · 2026
- Sliced Tensor Operators for Large-Scale Topology OptimizationarXiv · 2026
- DefElement: an encyclopedia of finite element definitionsComputational Science and Engineering · 2026
- A Polynomial-Scaling PDE Solver with Entanglement-Basis Tensor NetworksarXiv · 2026
- Agent4FreeFem: A Verification-Guided Framework for Autonomous Topology OptimizationarXiv · 2026