arXiv2026
Background: Over the last two decades, considerable effort in the applied mathematics community has been devoted to the development of polytopal methods, i.e., numerical methods for partial differential equations that support meshes more general than those used by traditional finite element methods. Despite their flexibility and attractive mathematical properties, polytopal methods have a steep implementation curve and, to date, no easily accessible open-source software framework has been available for their systematic implementation. Methods: In this article, we introduce poly_rust, a new software library implementing a domain-specific language (DSL) specifically designed for polytopal methods. poly_rust provides high-level constructs for expressing a wide range of such methods using a syntax that closely mirrors their mathematical formulation, thereby substantially lowering the implementation barrier for both newcomers and experienced users. Results: The library facilitates the rapid implementation, testing, and comparison of polytopal discretizations, making these methods more accessible to researchers, applied scientists, engineers, and students. In our vision, this will foster their dissemination beyond the numerical analysis community and encourage their adoption by practitioners in a broad range of application fields. It will also contribute to reproducibility of results, as DSL files are text files that can be easily made available, stored, and exchanged. Conclusions: poly_rust introduces, to our knowledge, the first DSL specifically tailored to polytopal methods. By combining mathematical expressiveness, ease of implementation, and an open-source framework, it provides a common platform for developing, sharing, reproducing, and comparing polytopal schemes, with the ambition of becoming a reference tool for the wider scientific community.