A tutorial-driven introduction to the parallel finite element library FEMPAR v1.0.0
This work is a user guide to the FEMPAR scientific software library. FEMPAR is an open-source object-oriented framework for the simulation of partial differential equations (PDEs) using finite element methods on distributed-memory platforms. It provides a rich set of tools for numerical discretization and built-in scalable solvers for the resulting linear systems of equations. An application expert that wants to simulate a PDE-governed problem has to extend the framework with a description of the weak form of the PDE at hand (and additional perturbation terms for non-conforming approximations). We show how to use the library by going through three different tutorials. The first tutorial simulates a linear PDE (Poisson equation) in a serial environment for a structured mesh using both continuous and discontinuous Galerkin finite element methods. The second tutorial extends it with adaptive mesh refinement on octree meshes. The third tutorial is a distributed-memory version of the previous one that combines a scalable octree handler and a scalable domain decomposition solver. The exposition is restricted to linear PDEs and simple geometries to keep it concise. The interested user can dive into more tutorials available in the FEMPAR public repository to learn about further capabilities of the library, e.g., nonlinear PDEs and nonlinear solvers, time integration, multi-field PDEs, block preconditioning, or unstructured mesh handling.
💡 Research Summary
This paper serves as a comprehensive user guide for FEMPAR (Finite Element PARallel) version 1.0.0, an open‑source, object‑oriented framework written primarily in modern Fortran (2003/2008) for the numerical solution of partial differential equations (PDEs) using finite element methods on distributed‑memory architectures. The authors first outline the high‑level design of the library, emphasizing its support for arbitrary‑order Lagrangian elements, curl‑ and div‑conforming elements, and both n‑cube and n‑simplex meshes. FEMPAR can handle continuous and discontinuous Galerkin (DG) discretizations, provides built‑in handling of hanging nodes for h‑adaptive meshes, and integrates the p4est library for scalable octree management. A central feature is the internal linear algebra module, which includes a highly scalable domain‑decomposition solver based on the Balancing Domain Decomposition by Constraints (BDDC) method; this solver has been demonstrated to scale up to 1.75 million MPI tasks on the JUQUEEN supercomputer.
The core of the paper is a tutorial‑driven exposition consisting of three progressively more complex examples. Tutorial 1 solves a Poisson problem on a structured mesh in serial, illustrating both continuous Galerkin and Interior Penalty DG formulations. The user defines a derived class of the abstract discrete integration type to supply cell‑wise and facet‑wise integrals, then assembles the global matrix and solves the resulting linear system. Tutorial 2 builds on the first by adding adaptive mesh refinement (AMR) on octree meshes. It shows how to drive p4est for parallel octree partitioning, compute error indicators, and perform local refinement while preserving conformity through hanging‑node treatment. Tutorial 3 transfers the adaptive Poisson solver to a distributed‑memory environment. It demonstrates the full parallel workflow: mesh partitioning, global degree‑of‑freedom (DoF) numbering across MPI ranks, assembly of the global matrix in parallel, and the use of the built‑in BDDC preconditioner to solve the linear system efficiently. Each tutorial follows a uniform program skeleton: import of FEMPAR modules, declaration of parameters and data‑type instances, a main execution block that initializes FEMPAR, sets up the problem, runs the solver, and finalizes, plus a “contains” section with helper subroutines. This consistent structure makes it easy for new users to navigate the library’s extensive functionality.
Installation is simplified through Docker containers that encapsulate all required dependencies for both serial and parallel builds, in debug or release configurations. The authors provide a brief guide to pulling the official FEMPAR Docker image, compiling the tutorial programs, and executing them. For users preferring a native build, the GitHub repository (https://github.com/fempar/fempar) contains detailed instructions, as well as a large collection of additional tutorials covering nonlinear PDEs, time integration, multiphysics coupling, block preconditioning, and unstructured mesh handling.
Beyond the tutorials, the paper highlights FEMPAR’s broader applicability: it has been employed in turbulent flow simulations, magnetohydrodynamics, monotonic finite elements, unfitted finite elements, embedded boundary methods, additive manufacturing, and electromagnetic/superconducting problems. While the library can interface with external linear algebra packages such as PETSc, its own scalable solvers and preconditioners reduce external dependencies for many typical applications.
In summary, FEMPAR v1.0.0 offers a full‑stack solution for high‑performance finite element analysis, combining a rich set of discretization tools, robust parallel data structures, and state‑of‑the‑art domain‑decomposition solvers. The tutorial‑driven approach presented in this paper lowers the entry barrier for new users, while the underlying design provides ample flexibility for developers to extend the framework to advanced, multiphysics, and nonlinear problems.
Comments & Academic Discussion
Loading comments...
Leave a Comment