Structure-Preserving Nonlinear Filtering for Continuous and Discontinuous Galerkin Spectral/hp Element Methods

Vidhi Zala, Robert M. Kirby, Akil Narayan

Introduction

Numerical partial differential equation (PDE) solvers are essential for simulating complex physical phenomena, ranging from fluid dynamics to blood coagulation. Many advanced solvers, such as the finite element method (FEM), represent fields using piecewise polynomials. However, high-order polynomials are prone to oscillations—known as the Gibbs phenomenon—which can lead to physically impossible results, such as negative chemical concentrations or negative mass. These unphysical values are not just mathematically incorrect; they can cause sensitive nonlinear simulations to crash.

Unphysical oscillations in a concentration simulation near an injury site, where the unconstrained solution dips below zero.

A Nonintrusive Filtering Approach

This paper introduces a nonintrusive, post-processing nonlinear filter based on convex optimization to enforce physical constraints (like positivity and mass conservation). Unlike "intrusive" methods that require rewriting the core numerical scheme, this filter can be bolted onto existing solvers.

The process follows a simple three-step workflow:

  1. Unconstrained Step: The PDE solver computes the next time step normally.
  2. The Check: The algorithm identifies elements where constraints (e.g., positivity) are violated.
  3. The Filter: If a violation occurs, the algorithm projects the unconstrained solution onto a "feasible set" using an iterative algorithm based on signed distance functions to find the closest valid polynomial representation.

Implementation: DG vs. CG

The filter is adapted for two major spatial discretizations:

  • Discontinuous Galerkin (DG): Because DG elements are mathematically isolated, the optimization can be decoupled and run independently on each element. This makes the filter highly efficient and parallelizable.
  • Continuous Galerkin (CG): Because CG elements are coupled, the filter requires a global optimization step, which involves inverting a global mass matrix. While feasible in 1D, scaling this to 2D or 3D remains a computational challenge.

Key Results and Performance

Surprisingly, forcefully projecting a solution to enforce constraints does not destroy the high-order accuracy of the Galerkin method. Empirical tests in both $h$-convergence (mesh refinement) and $p$-convergence (increasing polynomial degree) show that the filtered solutions match the error rates of unconstrained solutions almost perfectly.

The filtering workflow (top) and a comparison (bottom) showing how the constrained solution successfully maintains positivity compared to the unconstrained solver.

In stiff diffusion-reaction tests, where source terms can easily blow up if fed invalid data, the filtered solver successfully maintained strict positivity. Furthermore, a "flagging" system ensures the filter is only applied where necessary, keeping computational overhead typically below 20% of the total simulation time.

Conclusion

The structure-preserving nonlinear filter offers a robust way to ensure physical validity in high-order simulations without sacrificing accuracy or stability. While highly effective for DG methods, future research will focus on extending the CG formulation to higher dimensions by addressing the costs of global matrix inversion.

Summary updated

BibTeX
@article{zala2021structure,
  author = {Vidhi Zala and Robert M. Kirby and Akil Narayan},
  title = {{Structure-Preserving Nonlinear Filtering for Continuous and Discontinuous Galerkin Spectral/hp Element Methods}},
  journal = {SIAM J. Sci. Comput.},
  year = {2021},
  doi = {10.1137/20m1337223},
}
Figure