Linear multipoint constraints in FEniCSx

Jørgen Schartum Dokken (University of Cambridge, 🇬🇧)
Garth Wells (University of Cambridge, 🇬🇧)
Chris Richardson (University of Cambridge, 🇬🇧)
Monday session 2 (Zoom) (15:00–16:30 GMT)
View slides (pdf) (available under a CC BY 4.0 license)

In the finite element method, it is common to encounter boundary conditions such as the Dirichlet, Neumann and Robin boundary condition. However, the zero-slip condition, \(\boldsymbol{u}\cdot \boldsymbol{n} = 0\) does not fall under either of these categories when the domain boundary is not aligned with the coordinate axes. For this problem the boundary condition can be written as a linear combination of the degrees of freedom collocated at a boundary coordinate. In this talk, we present a method for enforcing linear multipoint constraints in the FEniCSx framework using master-minion matrix reduction. The multipoint constraint framework is written as a separate module that can be used alongside FEniCSx, supporting all variational forms written in the unified form language. The main components of the module is the multipoint constraint class, which handles communication of non-local degrees of freedom for parallel execution, and custom assemblers for the element-wise matrix reduction operation. Additionally, the module includes several specialized constructors for boundary conditions such as the periodic and zero-slip boundary condition. We illustrate the applicability of the module to non-trivial constraints by solving a contact problem on a non-conforming mesh.