Skip to content

add template parameter for range type to lagrange basis

Summary

This MR adds a template parameter to the LagrangePreBasis, for setting the local-basis range type.

Details

Following a discussion in issue #44 , the lagrange basis was fixed to range type double for the PQkLocalFiniteElement. This is resolved with this MR, by adding the range template parameter. It is defaulted to double so that no changes in user code should be necessary, especially when you only use the generator function lagrange<k>() or lagrange(k).

The range type is added as last template parameter to the pre-basis, node, and node-indexset.

Example:

// compile-time order
auto basis0 = makeBasis(gridView, lagrange<k>()); // range type = double
auto basis1 = makeBasis(gridView, lagrange<k, float>());

// run-time order
auto basis2 = makeBasis(gridView, lagrange(k)); // range type = double
auto basis3 = makeBasis(gridView, lagrange<float>(k));
Edited by Simon Praetorius

Merge request reports