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.
翻译:本文记录了在Firedrake(一个通过有限元方法数值求解偏微分方程的Python库)中实现$\texttt{RestrictedFunctionSpace}$类的过程。内容包括对Firedrake现有$\texttt{FunctionSpace}$类的介绍及其关键特性的说明。基于现有$\texttt{FunctionSpace}$类,本文探讨了Firedrake求解器在施加Dirichlet边界条件时的能力局限,以及$\texttt{RestrictedFunctionSpace}$类如何通过不同设计消除这些问题。这些内容将从数学角度和代码抽象层面进行双重分析。最后,通过测试与对比实验,论证了$\texttt{RestrictedFunctionSpace}$类为用户带来的优势。研究结果表明,该类的应用能有效消除系统Dirichlet边界条件相关的特征值,从而显著提升了Firedrake中特征值求解器的性能。