The implementation of
LagrangeSimplexLocalCoefficients is very cluttered and inconsistent:
- Construction from permutation needlessly throws for dim=1.
- Text of thrown exceptions is misleading or incorrect.
- For dim>3 compile time failure should be preferred.
- Code duplication for dim=2: Constructor from permutation uses ´generateLocalKeys()` while default constructor is implemented separately.
LocalKeygeneration for dim=1,dim=2,dim=3 are spread over multiple methods, dim=2 and dim=3 are implemented very differently.
LocalKeygeneration code is completely undocumented. While dim=2 is easy to understand, this is not true for dim=3.
generateLocalKeys()needlessly takes a its
std::arrayargument by value.
- Ordering/position of Lagrange points is not documented.
LocalKeyordering of surface DOFs is not documented.
Semantics of permutation interface is not documented property:
vertexMapa forward or backward permutation?
- How do the obtained finite elements differ?
Which invariants (per-subentity
LocalKeyordering) are guaranteed?
This should also be documented in the
Some of these are easy to fix. However, most need a deeper look into the code, maybe some refactoring of the 3d code, and careful testing.