Skip to content

Provide a local finite-element build by prismatic-product of two LFEs

Simon Praetorius requested to merge feature/tensor-product into master

Summary

The goal of this MR is to allow a generic construction of finite elements as tensor products of existing finite element implementations.

Let \{\phi_i\}_{i=1}^{m} and \{\psi_j\}_{j=1}^{n} be two sets of basis functions defining the local finite elements \Phi=(T_1,\mathbb{P}_1,\Sigma_1) and \Psi=(T_2,\mathbb{P}_2,\Sigma_2). Then I want to construct the new product finite-element \Pi=(T_1\times T_2, \mathbb{P}_{12}, \Sigma_{12}) with T_1\times T_2 the prismatic product of the two reference elements T_1 and T_2, see also dune-geometry!250. The basis functions that span \mathbb{P}_{12} will be defined as \pi_{ij}(x) = \phi_i(x_1)\cdot\psi_j(x_2) where x=(x_1,x_2) is the formal splitting of the coordinates, based on the dimensions of T_1 and T_2.

ToDo: formally define \Sigma_{12}

Implementation

The local basis functions are just products of two sets of functions. This is easy to implement. The only question is how to number the resulting set of basis functions? In order to clearly define the numbering, I have added a layout template parameter from the Std::mdspan implementation in dune-common to the local finite-element and local basis, correspondingly. This layout defines a mapping for the indices. The default is Std::layout_right, corresponding to a row-wise numbering.

For me, it is not so clear what a product of two basis functions of different range type would be. Only the case that one of the two range types is scalar is obvious. Thus, the implementation is restricted to that case, more specifically, the second factor must have a scalar range type. This could probably be made more flexible to allow the swapping of the two.

Currently, the partial derivatives are not implemented.

The local coefficients are defined in a generic way. This must be thoroughly reviewed and tested.

Since we do not have any information about the type of interpolation the two local finite-elements provide, and, for example, we do not export the set of Lagrange points to evaluate, the interpolation of the product space is defined as a generic L2-projection instead. Maybe this could be customized somehow. Maybe a meta wrapper providing a tensor product of Lagrange-type interpolations could be implemented later.

Applications

For space-time FEM one might want to choose a space LFE and the time LFE independently. Maybe the space basis is vector valued, maybe just the polynomial degrees are different. With the PrismaticProduct of local finite-elements, this can easily be achieved.

Another application is the definition of some local finite elements on all standard geometry types by a canonical product construction. E.g. the LagrangePrismLocalFiniteElement is currently only defined up to order 2. But one could easily define the product of Lagrange on the triangle and line of any order. Thus, we could fill the gap. Another example are the Lobatto basis functions !203. It is a lot of effort to define them for all geometry types, but essentially this is just a product construction. What is missing currently is the definition for prisms and pyramids. The pyramid is a conical product of a quad and a line. This is not yet supported by this MR, but maybe we could do a similar product construction also in that case. The dynamic order Lagrange basis functions might be constructed in such a generic way already.

ToDo

  • Check that the LocalKeys in the coefficients class are defined correctly, maybe add a corresponding test
  • Check the name of the local finite-element. PrismaticProduct directly in the Dune namespace might lead to name collisions. Maybe better PrismaticProductLocalFiniteElement
  • Review the constraint of scalar range for the second factor. Can this be generalized? Can this at least be swapped with the range constraint for the first factor?
  • Implement or delete the copy and move operations. Discuss the need for the shared_ptr storage of the local finite-elements.
  • Squash commits
  • Add Changelog entry
Edited by Simon Praetorius

Merge request reports

Loading