Dynamic composition of solvers for coupled problems in DOLFINx

Martin Řehoř (Rafinex S.à r.l., 🇱🇺)
Jack S. Hale (University of Luxembourg, 🇱🇺)
Monday session 2 (Zoom) (15:00–16:30 GMT)
View slides (pdf) (available under a CC BY-NC-ND 4.0 license)

Recent developments in DOLFINx allow for the block assembly of linear algebraic systems arising from discretisations of coupled partial differential equations. Each algebraic block represents a subproblem associated with a coupling of the unknown fields. Designing and implementing robust and scalable solution and preconditioning strategies for block-structured linear systems is an active area of research.

In this contribution we show how DOLFINx can now exploit one of the most significant features of PETSc; the dynamic composition of the hierarchical solver and preconditioner options at runtime, see Brown et al [1]. The idea is inspired by the work of Kirby and Mitchell [2] that was originally implemented in the Firedrake Project.

One of the most significant benefits of the approach is the possibility to construct advanced preconditioners that require structure beyond a purely algebraic problem description, eg the pressure-convection-diffusion (PCD) approximation of the Schur complement for the Navier–Stokes equations, see Silvester et al [3].

We illustrate the capabilities of our implementation on examples ranging from incompressible flow of a viscous fluid, through temperature-driven convection, to flows described by rate-type viscoelastic fluid models.


  • [1] J. Brown, M. G. Knepley, D. A. May, L. C. McInnes, and B. Smith. Composable Linear Solvers for Multiphysics, Proceedings of the 2012 11th International Symposium on Parallel and Distributed Computing (ISPDC '12), IEEE Computer Society, USA, 55–62, 2012. [DOI: 10.1109/ISPDC.2012.16]
  • [2] R. Kirby, and L. Mitchell. Solver Composition Across the PDE/Linear Algebra Barrier, SIAM Journal on Scientific Computing 40, 2017. [DOI: 10.1137/17M1133208]
  • [3] D. Silvester, H. Elman, and A. Wathen. Finite Elements and Fast Iterative Solvers: with applications in incompressible fluid dynamics, 2014. [DOI: 10.1093/acprof:oso/9780199678792.001.0001]