PETSC FIREDRAKE '26: PETSC ANNUAL USER MEETING AND FIREDRAKE '26
PROGRAM FOR FRIDAY, JUNE 5TH
Days:
previous day
all days

View: session overviewtalk overview

09:00-10:00 Session 18: Firedrake Applications 3
09:00
The challenges of small scales with phase-field models

ABSTRACT. Tracking a moving boundary in a multiphase system can be challenging. Instead, the phase-field method implicitly locates the interface and phase changes are modelled to occur smoothly over a small width, ε. However, phase-field models contain small time and length scales which lead to uniform spatial discretisation performing poorly in the sharp-interface limit as ε tends to 0. Achieving an ε-robust solver requires an adaptive moving mesh and effective preconditioning of the iterative method. We consider two models of an ice-water system—one phenomenological and one thermodynamically derived—and implement some of these techniques in Firedrake and the spectral solver Dedalus. Then, we compare the accuracy and efficiency of Firedrake and Dedalus.

09:20
Auxiliary gradient flows for generalized Newtonian models

ABSTRACT. We consider the minimization of variational energies on an open, bounded domain $\Omega \subset \mathbb{R}^d$, $d = 2,3$, of the form \[ \int_\Omega \phi(|Du|)\,dx - F(u), \] where $\phi$ is an $N$-function and $D$ denotes either the gradient of a scalar field or the symmetric gradient of a vector field. Such models arise in nonlinear diffusion, optimal design, and generalized Newtonian fluid flows. The associated Euler--Lagrange equations are nonlinear and potentially degenerate or singular, posing significant challenges for the numerical solution process, and often necessitating adaptive mesh refinement.

We introduce an auxiliary-field reformulation that shifts the nonlinearity from the state equation to a scalar auxiliary variable encoding the magnitude of the gradient or strain. This yields a variationally consistent framework admitting an interpretation as a gradient flow of a reduced energy in a suitable metric space, in which the original problem is recast as a sequence of uniformly elliptic linear subproblems coupled with an ordinary differential equation enforcing the nonlinear constitutive relation; in this perspective, classical schemes such as the Ka\v{c}anov iteration arise as operator-splitting methods corresponding to an infinite time-step limit.

We present analytical results together with strong numerical evidence supporting the expected convergence behavior of the method. In addition, we propose an adaptive time-stepping strategy that enhances robustness and efficiency, making the approach competitive with, and in some regimes superior to, standard Newton methods with backtracking applied directly to the nonlinear system. Numerical experiments are demonstrated for a range of models, including the $p$-Laplacian, $p$-Stokes, Carreau--Yasuda, regularized Bingham flows, and optimal design problems.

09:40
Robust Preconditioning for the Boussinesq Equations through Patch-wise Multigrid Smoother

ABSTRACT. We present recent progress on parameter-robust preconditioners for implicitly discretised fluid equations in small aspect ratio domains, motivated by oceanic modelling. The central difficulty is that thin-layer geometries produce severely anisotropic meshes, for which standard preconditioners fail to be robust. Our approach addresses this through a multigrid method with vertex-patch line smoothers, acting on an auxiliary shifted operator that isolates the velocity-buoyancy block.

Building on earlier work for the mixed Poisson equation, we now report results for the incompressible Boussinesq system in a two-dimensional vertical slice. Key advances include: (i) extension to the fully nonlinear system, with SNES-based results on the Skamarock-Klemp test case; (ii) an improved analysis of the shift parameter if we linearise the equation around the state of rest, providing a principled bound in place of the previously heuristic choice; and (iii) the use of the Irksome package to automate construction of the auxiliary operator preconditioner, which may be of broader interest to the Firedrake community for implicit Runge-Kutta methods. We demonstrate the robustness of the solver with respect to aspect ratio and mesh spacing, and report iteration counts and timings. Future work targets extension to three-dimensional domains with full implicit time integration.

10:00-10:45Coffee Break
10:45-11:45 Session 19: Firedrake Development 2
10:45
Using profiling to provide performance insights and make improvements to Gusto

ABSTRACT. Gusto is a code library which uses Firedrake to implement stable and accurate discretisations for geophysical fluid equations relevant to the Met Office numerical weather prediction and climate model. The flexibility of this approach enables Gusto to be used as a rapid prototyping platform. Although the focus of Gusto is flexibility it is nevertheless valuable to consider performance, as good performance speeds up time to science and can make larger calculations feasible.

Performance tuning is best carried out as a systematic exercise based on evidence. Profilers are the way to gather this evidence, gain insight into the performance of the application and identify potential performance improvements.

In this talk we will present results from using the TAU tool to profile a 3D baroclinic wave calculation implemented in Gusto. The profiling results provided valuable performance insights by showing where the application was spending significant time, and significantly which part of the algorithm this related to. The profiling identified improvements which could readily be implemented, for example switching off expensive diagnostics, and also helped identify the source of a performance regression following a solver update.

11:05
Expanding the definition of a finite element

ABSTRACT. A core feature of the success of the finite element method, the Ciarlet definition of the components of a finite element has been used for many years. The experience of these decades (and the subsequent implementations) has exposed several key deficiencies. In particular, Ciarlet’s definition is missing information about the global continuity of the mesh and how the degrees of freedom map to each other under the relative orientation of the mesh entities. A new definition of a finite element, addressing these issues, has been proposed. The new definition also incorporates information about the symmetries of the elements, using ideas from Group Theory.

Alongside this definition, a new software package, FUSE, has been developed. FUSE provides a domain specific language for the definition and enables elements defined in this way to be used directly in Firedrake.

This talk will cover the new definition, its current use in FUSE and future developments.

11:25
Back to the Source: Turning Devito into a Bidirectional Compiler

ABSTRACT. Devito is a Python-based compiler implementing optimised stencil computation from a SymPy-based domain-specific language, which employs automated code generation and just-in-time compilation to execute computational kernels on CPUs and GPUs.

A lot of developer time is spent ensuring the output of the Devito compiler is correct and optimised. However, complex optimisations can make debugging difficult; when a segmentation fault is generated on a new architecture, navigating from the low-level code back to the original symbolic equation that triggered it is a painstaking process.

This disconnect can be especially problematic for our end users, who are domain specialists and rely on the mathematics, but may lack familiarity with the underlying compiler architecture.

To bridge the gap, we present our work that turns Devito into a bidirectional compiler, demonstrating how it is used in debugging and user support. By taking advantage of the immutability of Devito objects and intercepting the relevant part of the abstract syntax tree, we can generate minimal failing examples, effectively allowing developers to time-travel through the compilation passes back to the source equation.

We also explore the tool's place in the wider software stack and consider whether having a bidirectional compiler might be useful for other code generation frameworks.

11:45-13:30Lunch Break
13:30-14:50 Session 20: Firedrake Applications 4
13:30
Finite element algorithms for the irreversible thermodynamics of battery electrolytes

ABSTRACT. We model lithium-ion battery electrolytes using the PDEs of irreversible thermodynamics (Onsager--Stefan--Maxwell equations). The PDEs account for cross-diffusion, electromigration, and the transport of heat and momentum in thermodynamically non-ideal mixtures. Our finite element algorithms use a mélange of advanced Firedrake features: R space, EquationBC, Irksome, ngsPETSc...

13:50
Exploring Next-Gen Batteries for Hybrid-Electric Aviation by Means of Firedrake

ABSTRACT. Short-haul flights bear a realistic potential for partial electrification with batteries. However, it can be shown by simple arguments that this will require a transition from the 'gold standard' of Lithium-Ion batteries to next-gen batteries with higher energy density. Although this is a rapidly progressing field, one major challenge is to additionally meet conflicting requirements, e.g. rate-capability and cycle life. Scale-resolved simulations can aid to find desired technical optima and to identify critical factors in these novel battery systems. For this purpose, we developed a numerical framework using Firedrake. We will show insights from the promising class of Lithium-Sulfur batteries, how numerics influences these results and first steps towards how electrochemistry couples to hydrodynamic effects.

14:10
Nonlinear superconducting models in Firedrake: optimization, mesh adaptation, and cloud execution

ABSTRACT. We present recent work on the simulation and optimisation of nonlinear superconducting electromagnetic models in Firedrake. Our setting is the low-frequency Maxwell H-formulation, with strongly nonlinear constitutive laws that can lead to convergence difficulties, particularly at high field strengths.

Building on our recent work on magnetic cloaking, we use Pyadjoint and Fireshape to perform PDE-constrained optimization for both material and shape design. In the context of shape optimization, maintaining mesh quality during large geometry updates is a practical challenge. We address this by incorporating metric-based mesh adaptation using Animate, allowing optimization to proceed without degradation of mesh quality.

We also report on solver behaviour in cloud enviroments (e.g. Google Colab), together with stress tests in high-field regimes that expose convergence issues in nonlinear superconducting models. We compare selected simulations with results obtained using COMSOL Multiphysics in terms of accuracy and efficiency. We discuss how this Firedrake-based workflow supports cloud-accessible superconducting simulation and optimization without reliance on commercial multiphysics software.

14:30
Helicity-preserving finite element schemes for magnetohydrodynamics

ABSTRACT. Magnetic relaxation drives plasma toward lower-energy equilibria under helicity constraints. In ideal MHD, helicity is locally conserved; in resistive settings like Taylor relaxation, only global helicity is preserved, permitting local reconnection. We present two structure-preserving finite element methods based on finite element exterior calculus and Lagrange multipliers, which enforce helicity conservation at these two different levels. Applied to the magneto-frictional system (gradient flow of MHD), our schemes preserve a discrete Arnold inequality and maintain nontrivial magnetic topology over long time. Numerical experiments on braided and knotted fields confirm that local helicity preservation prevents spurious reconnection, while global-only conservation allows further relaxation. We then apply the relaxation idea to MHD turbulence model to preserve ideal invariants and capture the selective decay mechanism, which is believed to be a mechanism leading to the formation of large magnetic eddies.

14:50-15:30Coffee Break
15:30-16:50 Session 21: Firedrake Time Stepping
15:30
Energy conserving discretisations for the rotating shallow water equations

ABSTRACT. I will present a fully discrete energy conserving discretisation for the rotating shallow water equations on the sphere, using compatible finite element methods combined with the continuous Petrov-Galerkin method, enabled by Firedrake and Irksome. This will start by discussing energy conserving time discretisations in general before specialising to the rotating SWE. I will show some reformulation tricks that allow for efficient solution of these equations. If time allows, I will also provide updates about a modified version of the scheme that provides local energy conservation.

15:50
A comparison of time-parallel deferred correction methods for atmospheric modelling in Gusto

ABSTRACT. Accurate and efficient time integration is a critical component of Numerical Weather Prediction (NWP) and climate modelling. The current approach in the Met Office’s next‑generation dynamical core, GungHo, rely on a serial-in-time, low-order, iterative semi‑implicit timestepping scheme coupled with Flux‑Form Semi‑Lagrangian (FFSL) finite‑volume transport scheme. As computational scales increase, exploiting parallelism in the time dimension is becoming increasingly important.

This work evaluates the potential of time‑parallel Deferred Correction (DC) methods as a viable alternative to these traditional schemes. They have been implemented in Gusto, a dynamical core toolkit closely related to GungHo and built using Firedrake. In this talk, I examine two strategies for introducing temporal parallelism:

1. Revisionist Integral Deferred Correction (RIDC), which parallelises across correction sweeps, and 2. Spectral Deferred Correction (SDC) using time‑parallel (diagonal) preconditioners, which parallelises across collocation nodes.

I will present results for a suite of standard dynamical core test cases for the compressible Euler equations. We demonstrate how time‑parallel DC algorithms can improve temporal accuracy and offer meaningful opportunities for reducing wall‑clock time.

Together, these developments highlight the promise of DC-based integrators as a pathway toward more scalable and efficient time-stepping in next‑generation atmospheric models.

16:10
Enforcing bounds constraints in Firedrake

ABSTRACT. The solutions to many partial differential equations (PDE) satisfy certain bounds constraints (e.g. non-negativity), but standard finite element discretizations may not preserve these constraints. We circumvent well-known order barriers for linear methods by enforcing the bounds constraints through variational inequalities instead of variational equations.

In this talk, we will describe this approach for both stationary and time-dependent problems. A straightforward Firedrake implementation gives excellent numerical solutions for model problems including convection-diffusion, the heat equation, and the Cahn-Hilliard equation, but many open questions remain about deploying scalable solution algorithms for the resulting discrete complementarity problems.

16:30
Finite elements in time in Irksome

ABSTRACT. The typical approach for constructing finite element discretisations for time-dependent PDEs is to (1) construct a variational semi-discretisation, discretised in space only, then (2) define the time discretisation using a Runge–Kutta (RK) method. Finite-element-in-time (or variational-in-time) schemes represent an alternative: One views functions as having a domain on a full space-time slab (the product of the spatial domain and the time interval) and constructs the variational discretisation directly over that slab.

For either (i) certain low-order quadrature rules in time, or (ii) linear systems, these reduce to collocation RK methods; in the general higher-order case however, the schemes are distinct. Various analytic results, particularly in the preservation of conservation laws and dissipation inequalities, motivate the use of finite-element-in-time schemes, however their support in general finite-element software has historically lagged behind that of RK methods.

In this talk, we will give an introduction to finite elements in time. We will show how finite-element-in-time schemes may now be used in Irksome, with various examples on conservative and dissipate systems demonstrating their performance relative to classical RK methods.