David A. Ham

LG
h-index21
7papers
1,435citations
Novelty39%
AI Score28

7 Papers

2.3NAJul 31, 2007
LBB Stability of a Mixed Discontinuous/Continuous Galerkin Finite Element Pair

C. J. Cotter, D. A. Ham, C. C. Pain et al.

We introduce a new mixed discontinuous/continuous Galerkin finite element for solving the 2- and 3-dimensional wave equations and equations of incompressible flow. The element, which we refer to as P1dg-P2, uses discontinuous piecewise linear functions for velocity and continuous piecewise quadratic functions for pressure. The aim of introducing the mixed formulation is to produce a new flexible element choice for triangular and tetrahedral meshes which satisfies the LBB stability condition and hence has no spurious zero-energy modes. We illustrate this property with numerical integrations of the wave equation in two dimensions, an analysis of the resultant discrete Laplace operator in two and three dimensions, and a normal mode analysis of the semi-discrete wave equation in one dimension.

4.3MSApr 9, 2018
TSFC: a structure-preserving form compiler

Miklós Homolya, Lawrence Mitchell, Fabio Luporini et al.

A form compiler takes a high-level description of the weak form of partial differential equations and produces low-level code that carries out the finite element assembly. In this paper we present the Two-Stage Form Compiler (TSFC), a new form compiler with the main motivation to maintain the structure of the input expression as long as possible. This facilitates the application of optimizations at the highest possible level of abstraction. TSFC features a novel, structure-preserving method for separating the contributions of a form to the subblocks of the local tensor in discontinuous Galerkin problems. This enables us to preserve the tensor structure of expressions longer through the compilation process than other form compilers. This is also achieved in part by a two-stage approach that cleanly separates the lowering of finite element constructs to tensor algebra in the first stage, from the scheduling of those tensor operations in the second stage. TSFC also efficiently traverses complicated expressions, and experimental evaluation demonstrates good compile-time performance even for highly complex forms.

11.9CEJul 16
Missing Physics Discovery through Fully Differentiable Finite Element-Based Machine Learning

Ado Farsi, Nacime Bouziani, David A Ham

Modelling physical systems with partial differential equations (PDEs) is central to science and engineering, yet in most real applications the PDE model is incomplete: relationships such as constitutive or thermal laws are unknown. Existing surrogate approaches close this gap by learning the PDE solution from data, but remain tied to a specific configuration (geometry, boundary conditions, discretisation) and recover the solution rather than the missing physics itself. We introduce FEML, an end-to-end differentiable framework that couples the known PDE with a machine-learned operator for the missing physics. Embedding the PDE solver into training lets this operator be learned directly from the PDE solution, even when its own output cannot be measured - for example, stress in constitutive laws. Because the operator is independent of the system configuration, a law learned in one setting transfers zero-shot to new geometries, boundary conditions, and discretisations, and can be inspected by domain specialists. FEML represents the operator with structure-preserving operator networks (SPONs), which retain key continuous properties at the discrete level. We demonstrate FEML across solid mechanics and thermal transport. From synthetic data we progressively discover an elastoplastic law - the nonlinear elastic response, then the plastic hardening law - and compose them into a foundation constitutive model that transfers zero-shot to a 3D torsion problem. Moving to real data, we learn coupled plastic-hardening and ductile-damage laws from a benchmark shear-coupon test, reproducing the measured response, including post-peak softening, to within the experimental scatter. Finally, we recover a temperature-dependent conductivity from transient heat-flow data and apply symbolic regression to the learned operator to extract a closed-form law matching the ground truth.

2.3MSNov 7, 2017
Exposing and exploiting structure: optimal code generation for high-order finite element methods

Miklós Homolya, Robert C. Kirby, David A. Ham

Code generation based software platforms, such as Firedrake, have become popular tools for developing complicated finite element discretisations of partial differential equations. We extended the code generation infrastructure in Firedrake with optimisations that can exploit the structure inherent to some finite elements. This includes sum factorisation on cuboid cells for continuous, discontinuous, H(div) and H(curl) conforming elements. Our experiments confirm optimal algorithmic complexity for high-order finite element assembly. This is achieved through several novel contributions: the introduction of a more powerful interface between the form compiler and the library providing the finite elements; a more abstract, smarter library of finite elements called FInAT that explicitly communicates the structure of elements; and form compiler algorithms to automatically exploit this exposed structure.

5.3LGMar 13, 2023Code
Physics-driven machine learning models coupling PyTorch and Firedrake

Nacime Bouziani, David A. Ham

Partial differential equations (PDEs) are central to describing and modelling complex physical systems that arise in many disciplines across science and engineering. However, in many realistic applications PDE modelling provides an incomplete description of the physics of interest. PDE-based machine learning techniques are designed to address this limitation. In this approach, the PDE is used as an inductive bias enabling the coupled model to rely on fundamental physical laws while requiring less training data. The deployment of high-performance simulations coupling PDEs and machine learning to complex problems necessitates the composition of capabilities provided by machine learning and PDE-based frameworks. We present a simple yet effective coupling between the machine learning framework PyTorch and the PDE system Firedrake that provides researchers, engineers and domain specialists with a high productive way of specifying coupled models while only requiring trivial changes to existing code.

11.5LGSep 9, 2024
Differentiable programming across the PDE and Machine Learning barrier

Nacime Bouziani, David A. Ham, Ado Farsi

The combination of machine learning and physical laws has shown immense potential for solving scientific problems driven by partial differential equations (PDEs) with the promise of fast inference, zero-shot generalisation, and the ability to discover new physics. Examples include the use of fundamental physical laws as inductive bias to machine learning algorithms, also referred to as physics-driven machine learning, and the application of machine learning to represent features not represented in the differential equations such as closures for unresolved spatiotemporal scales. However, the simulation of complex physical systems by coupling advanced numerics for PDEs with state-of-the-art machine learning demands the composition of specialist PDE solving frameworks with industry-standard machine learning tools. Hand-rolling either the PDE solver or the neural net will not cut it. In this work, we introduce a generic differentiable programming abstraction that provides scientists and engineers with a highly productive way of specifying end-to-end differentiable models coupling machine learning and PDE-based components, while relying on code generation for high performance. Our interface automates the coupling of arbitrary PDE-based systems and machine learning models and unlocks new applications that could not hitherto be tackled, while only requiring trivial changes to existing code. Our framework has been adopted in the Firedrake finite-element library and supports the PyTorch and JAX ecosystems, as well as downstream libraries.

1.2NAOct 12, 2014
On the shallow atmosphere approximation in finite element dynamical cores

C. J. Cotter, D. A. Ham, A. T. T. McRae et al.

We provide an approach to implementing the shallow atmosphere approximation in three dimensional finite element discretisations for dynamical cores. The approach makes use of the fact that the shallow atmosphere approximation metric can be obtained by writing equations on a three-dimensional manifold embedded in $\mathbb{R}^4$ with a restriction of the Euclidean metric. We show that finite element discretisations constructed this way are equivalent to the use of a modified three dimensional mesh for the construction of metric terms. We demonstrate our approach via a convergence test for a prototypical elliptic problem.