Table of Contents
Fetching ...

Implementing a Restricted Function Space Class in Firedrake

Emma Rothwell

TL;DR

This work introduces RestrictedFunctionSpace, a new Firedrake class that restricts the solution space to $V_0$ (interior DOFs) for solving variational problems while preserving outputs in $V$, thereby eliminating boundary DOFs from the solve and improving eigenproblem stability. The implementation spans the top-level class, PETSc/Cython relabeling, PyOP2 data structures, UFL form signatures, and parallel components, with extensive testing and comparisons against the standard FunctionSpace. Key contributions include a boundary_set interface, reordering of DOFs so boundary DOFs are excluded from assembly, and automatic space replacement in eigenproblems via a restrict option, all while maintaining compatibility with existing Firedrake workflows. The results demonstrate equivalent solution accuracy to unrestricted spaces for variational problems, but with significantly improved eigenvalue behavior and reduced matrix sizes, offering practical benefits for large-scale PDE solves and more faithful enforcement of Dirichlet boundary conditions.

Abstract

The implementation process of a $\texttt{RestrictedFunctionSpace}$ class in Firedrake, a Python library which numerically solves partial differential equations through the use of the finite element method, is documented. This includes an introduction to the current $\texttt{FunctionSpace}$ class in Firedrake, and the key features that it has. With the current $\texttt{FunctionSpace}$ class, the limitations of the capabilities of the solvers in Firedrake when imposing Dirichlet boundary conditions are explored, as well as what the $\texttt{RestrictedFunctionSpace}$ class does differently to remove these issues. These will be considered in both a mathematical way, and in the code as an abstraction of the mathematical ideas presented. Finally, the benefits to the user of the $\texttt{RestrictedFunctionSpace}$ class are considered, and demonstrated through tests and comparisons. This leads to the conclusion that in particular, the eigensolver in Firedrake is improved through the use of the $\texttt{RestrictedFunctionSpace}$, through the removal of eigenvalues associated with the Dirichlet boundary conditions for a system.

Implementing a Restricted Function Space Class in Firedrake

TL;DR

This work introduces RestrictedFunctionSpace, a new Firedrake class that restricts the solution space to (interior DOFs) for solving variational problems while preserving outputs in , thereby eliminating boundary DOFs from the solve and improving eigenproblem stability. The implementation spans the top-level class, PETSc/Cython relabeling, PyOP2 data structures, UFL form signatures, and parallel components, with extensive testing and comparisons against the standard FunctionSpace. Key contributions include a boundary_set interface, reordering of DOFs so boundary DOFs are excluded from assembly, and automatic space replacement in eigenproblems via a restrict option, all while maintaining compatibility with existing Firedrake workflows. The results demonstrate equivalent solution accuracy to unrestricted spaces for variational problems, but with significantly improved eigenvalue behavior and reduced matrix sizes, offering practical benefits for large-scale PDE solves and more faithful enforcement of Dirichlet boundary conditions.

Abstract

The implementation process of a class in Firedrake, a Python library which numerically solves partial differential equations through the use of the finite element method, is documented. This includes an introduction to the current class in Firedrake, and the key features that it has. With the current class, the limitations of the capabilities of the solvers in Firedrake when imposing Dirichlet boundary conditions are explored, as well as what the class does differently to remove these issues. These will be considered in both a mathematical way, and in the code as an abstraction of the mathematical ideas presented. Finally, the benefits to the user of the class are considered, and demonstrated through tests and comparisons. This leads to the conclusion that in particular, the eigensolver in Firedrake is improved through the use of the , through the removal of eigenvalues associated with the Dirichlet boundary conditions for a system.
Paper Structure (23 sections, 1 theorem, 38 equations, 19 figures, 1 table, 4 algorithms)

This paper contains 23 sections, 1 theorem, 38 equations, 19 figures, 1 table, 4 algorithms.

Key Result

Theorem 1

Lax-Milgram Theorem: If $a(u, v)$ is both continuous and coercive, and $G(v)$ is coercive, then there exists a unique $u$ solving the variational problem $a(u, v) = G(v) \forall v \in V$.

Figures (19)

  • Figure 1: The Lagrange element on a reference triangle, using degree 4 polynomials. The dots represent point evaluation of $u$.
  • Figure 2: The unit square of two Lagrange degree 4 elements, with boundary conditions labelled.
  • Figure 3: Scatter plot of the first 300 eigenvalues of the Oceanic basin modes problem. These eigenvalues are generated for the shift parameter $\theta = 0$ (red) and $\theta = 2$ (blue)
  • Figure 4: One possible numbering of the Lagrange element, with topological entities also numbered.
  • Figure 5: One possible global numbering of the problem described in Figure \ref{['poisson-picture']}.
  • ...and 14 more figures

Theorems & Definitions (8)

  • Definition 1
  • Definition 2
  • Definition 3
  • Definition 4
  • Theorem 1
  • Definition 5
  • Definition 6
  • Definition 7