Should `VectorElement` and `TensorElement` be subclasses of `MixedElement`?
Changes required to support vertex cells led to questions about the design decision of having VectorElement and TensorElement be subclasses of MixedElement.
Originally posted by @wence- in https://github.com/FEniCS/ufl/pull/30 :
I would advocate keeping
MixedElementonly for a "bag of unrelated elements" and create newVector/TensorElementclasses that rank-augment an existingFiniteElementobject. One could then go one step further and just makeVectorElementa functional constructor for aTensorElement.
Probably the reason that VectorElement and TensorElement in UFL are MixedElement, because FFC implemented them such.
I now think that there shouldn’t be an inheritance hierarchy for finite element objects at all really. Instead there should be some abstract interface that they have to conform too and concrete implementations should just implement that interface. This would eliminate a lot of the anti patterns in the current inheritance hierarchy where either the superclass constructor is not called, or it is called multiple times from different places (see eg vectorelement).
this would be a breaking change because form compilers and assembly libraries would need to adapt to the new structure.