Allow variant hints to be passed into VectorElement and TensorElement - #71
Conversation
wence-
left a comment
There was a problem hiding this comment.
I think this is fine, though I also think it indicates that this is a part of UFL that really should be redone.
I don't know how basix represents Vector/TensorElement, but for us, we represent them as Vector(ScalarElement(...)) so the scalar element has the variant information.
I think that a redesign of UFL elements has an algebra such that a UFL element is either a concrete (non-reducible) element (such as RT or Lagrange), or some modifier of a (list of) elements.
That way we don't end up glomming so much information into the FiniteElementBase thing (and having to break the inheritance patterns).
This is pretty much exactly how we treat elements in DOLFINx and FFCx now. I totally agree that this needs refactoring at some point. |
This change allows the user to pass a variant into VectorElement and TensorElement. The value of this is then passed to the FiniteElement that is created as the sub element.