Skip to content

Add refined-LagrangeBasis as alternative to P2 basis

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

Summary

The RefinedLagrangeBasis is based on the RefinedP[0|1]LocalFiniteElement and represents piecewise constant/linear Lagrange finite elements on a refined simplex element. The implementation is based on the code for LagrangeBasis.

Example

Construct the RefinedLagrangeBasis using the basis factory refinedLagrange<k>() for k in {0,1}:

using namespace Dune::Functions::BasisFactory;
auto basis1 = makeBasis(gridView, refinedLagrange<1>());
// or with specified range type:
auto basis2 = makeBasis(gridView, refinedLagrange<1,float>());

Limitations

  • The local finite-element implements only a 1-level refinement. Probably this could be extended to multi-level refinement (maybe also future work)

TODO

  • Add changelog entry
  • Maybe simplify the code using mcmg mappers directly
Edited by Simon Praetorius

Merge request reports

Loading