
FEniCSx-pctools: Tools for PETSc Block Linear Algebra Preconditioning in FEniCSx
Abstract
Discretising partial differential equations with the finite element method leads to large linear systems of equations that must be solved. When these systems have a natural block structure due to multiple field variables, using iterative solvers with carefully designed preconditioning strategies that exploit the underlying physical structure becomes necessary for an efficient and scalable solution process. FEniCSx Preconditioning Tools (FEniCSx-pctools) is a software package that eases the specification of PETSc (Portable, Extensible Toolkit for Scientific Computation) block preconditioning strategies on linear systems assembled using the DOLFINx finite element solver of the FEniCS Project. The package automatically attaches all necessary metadata so that preconditioning strategies can be applied via PETSc’s standard options database to monolithic and block assembled systems. The documented examples include a simple mixed Poisson system and more complex pressure convection-diffusion approach to preconditioning the Navier–Stokes equations. We show weak parallel scaling on a coupled Navier–Stokes–Fourier system up to 8192 MPI (Message Passing Interface) processes, demonstrating the applicability of the approach to large-scale problems.
FEniCSx-pctools is available under the LGPLv3 or later license and is developed on GitLab https://gitlab.com/rafinex-external-rifle/fenicsx-pctools. The documentation is available at https://rafinex-external-rifle.gitlab.io/fenicsx-pctools/c.
© 2025 Martin Řehoř, Jack S. Hale, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.