Adaptive Mesh Generation via Optimal Transport

MRes Thesis — Imperial College London, 2015. Supervised by Dr. Hilary Weller & Dr. Phil Browne, Department of Meteorology, University of Reading. Read the thesis.

The Problem

Numerical weather prediction and climate modelling require solving partial differential equations on computational meshes. Traditional uniform grids waste computational resources: they over-resolve smooth regions while potentially missing important small-scale features like weather fronts, convective systems, and boundary layers.

Adaptive mesh refinement addresses this by concentrating mesh points where they're most needed. This thesis focuses on r-adaptive methods (mesh redistribution) that move existing mesh points optimally without changing mesh topology — a particularly elegant approach that preserves mesh quality while improving resolution.

Centroidal Voronoi Tessellation: random point distribution (left) vs optimised mesh distribution concentrated around a density function (right).
Centroidal Voronoi Tessellation: random point distribution (left) vs optimised mesh distribution concentrated around a density function (right).

The Mathematical Framework

The goal is to find a mesh transformation that equidistributes a monitor function M(x). The monitor function is large where we want high resolution (e.g., near weather fronts) and small in smooth regions.

The equidistribution problem can be formulated as finding a map F that satisfies:

M(x)I+H(ϕ)=cM(\mathbf{x}) \cdot |I + H(\phi)| = c

where φ is a scalar potential, H(φ) is its Hessian matrix, and c is a constant. This is the Monge-Ampère equation — a fully nonlinear elliptic PDE that arises naturally in optimal transport theory.

The mesh transformation is then given by the gradient of φ:

xnew=xold+ϕ\mathbf{x}_{new} = \mathbf{x}_{old} + \nabla\phi

Three Numerical Methods

The thesis implements and compares three approaches for solving the Monge-Ampère equation:

MethodApproachParameters
PMAParabolic relaxation with time-steppingRequires γ tuning
FPFixed-point iterationRequires γ tuning
AL (Novel)Alternative linearisationParameter-free

The Alternative Linearisation (AL) Method

The key contribution of this thesis is the Alternative Linearisation method, which introduces a novel way to linearise the Monge-Ampère equation:

I+H(ϕ)=I+H(ϕˉ)+H(ψ)+(Aψ)|I + H(\phi)| = |I + H(\bar{\phi})| + |H(\psi)| + \nabla \cdot (A \cdot \nabla\psi)

where φ̄ is the previous iterate and ψ is the correction. The crucial advantage is that this formulation requires no tuning parameters — it converges reliably across different monitor functions without adjustment.

Test Cases

Two radially symmetric monitor functions were used to test the methods:

Ring Function

Concentrates mesh points in a ring around the origin. A moderately challenging test case.

Bell Function

Concentrates mesh points at the centre. More challenging — the FP method fails without careful tuning.

The monitor functions are defined as:

M(r)=1+α1exp(α2(ra)2)M(r) = 1 + \alpha_1 \exp\left(-\alpha_2 (r - a)^2\right)

where r is the distance from the origin, a is the location of maximum refinement (a=0.25 for ring, a=0 for bell), and α₁, α₂ control the magnitude and sharpness.

Key Results

Performance Comparison

  • AL method converges in ~50 iterations for both test cases without any parameter tuning
  • FP method fails on the bell function without very careful γ selection
  • PMA method requires different γ values for different monitor functions
  • The 1/d power law (where d is dimension) significantly improves stability across all methods

Implementation

The methods were implemented using OpenFOAM for finite volume discretisation, with Python (NumPy, SciPy, Matplotlib) for analysis and visualisation.

Monitor Function (Python)
import numpy as np

def monitor_function(x, y, a=0.25, alpha1=10, alpha2=200):
    """
    Compute monitor function M(r) = 1 + alpha1 * exp(-alpha2 * (r-a)^2)

    Parameters:
        a: location of maximum refinement (0 for bell, 0.25 for ring)
        alpha1: magnitude of refinement
        alpha2: sharpness of refinement region
    """
    r = np.sqrt(x**2 + y**2)
    return 1 + alpha1 * np.exp(-alpha2 * (r - a)**2)

# Example: Ring function
M_ring = monitor_function(X, Y, a=0.25, alpha1=10, alpha2=200)

# Example: Bell function (more challenging)
M_bell = monitor_function(X, Y, a=0, alpha1=50, alpha2=100)

Applications

Adaptive mesh methods have broad applications across computational science:

  • Numerical Weather Prediction — resolving weather fronts and convective systems
  • Climate Modelling — adaptive resolution for multi-scale phenomena
  • Computational Fluid Dynamics — tracking shocks and boundary layers
  • Astrophysics — resolving gravitational collapse and accretion disks

Conclusions

Key Contributions

  • Developed a novel parameter-free linearisation for the Monge-Ampère equation
  • Demonstrated robust convergence across different monitor functions
  • Provided systematic comparison of three numerical methods
  • Established foundation for adaptive mesh methods in meteorology

This work contributed to the ongoing development of adaptive mesh methods for weather and climate prediction, where efficient resolution of localised features remains a significant computational challenge.