Skip to content

Make order of Lagrange basis public

Simon Praetorius requested to merge feature/order-of-lagrange-basis into master

Summary

The Lagrange(DG)Basis is defined in terms of local LagrangeFiniteElements. Those local functions have a polynomial order defined and this can be accessed. Since the global basis defines on each element the same polynomial order, it would be very helpful to access this order information directly. It is available. There is even a function exporting the polynomial order, but it is made protected. This MR changes this and makes this function public.

Note, I do not propose to introduce an order() function in all bases, just in those where it is a useful information. Extracting the polynomial order of a basis is otherwise quite complicated. One has to 1. bind the associated node to an element. 2. access the local finite-element and 3. extract the order. But since it is a global information, it would be easier to access this directly.

Use-cases

  • precomputing the polynomial order for a quadrature rule for a (bi)linear form
  • transforming the basis
  • checking convergence orders
Edited by Simon Praetorius

Merge request reports