Unify LagrangeSimplexFiniteElement across dimensions
Compare changes
The LagrangeSimplexFiniteElement
contains 5 different code paths
to implement the basis and its derivatives:
There are good reasons for the first two special cases. Unfortunately the ones for dim=1,2,3 are all implemented differently for no good reason (except history) makes the code hard to read and understand.
This patch unifies the latter three implementations. While
there are still three branches, there is a very simple common
structure making the now making the code much simpler to understand.
The unified implementation basically follows the former
evaluateFunction()
implementation of the 3d case:
k
such that Lagrange points have integer
coordinates.This approach is now also used for evaluateJacobian()
and first order derivatives in
arbitrary order partial derivatives in partial()
extending the
support of the latter to dim=1 and dim=2.partial()
for dim=1,2,3-
For now the special implementation of second order
partial derivatives in 2d is kept, but could be updated
accordingly.
This includes the cleaned up test from !293 (merged). Hence the latter should be merged before.