Allow other DerivativeTraits in DiscreteGlobalBasisFunction than DefaultDerivativeTraits
The general issue:
The current implementation of DiscreteGlobalBasisFunction hardcodes the
The name implies that this mechanism should be kept alterable, although it is inconvenient to do so currently.
I generally do agree with the fact that there is more than one way to interpret a derivative representation.
Hence there is need for non-default derivative traits.
DerivativeTraits could be a template (template) parameter, defaulting to
DefaultDerivativeTraits, but I'm not a huge fan of cluttering the template interface even more, in particular since their ordering becomes increasingly unpleasant with default template arguments attached, and I'm not sure whether yet another Traits class collecting all the DiscreteGlobalBasisFunction template parameters would be a well-received idea.
Me concrete issue: (Maybe I'm working on the wrong front) My use-case is a non-standard range type whose derivative range type I'm very hesitant to attribute as default. Hence I shy away from implementing the respective specialization along with my derivative type's definition. Furthermore, I want to avoid any namespace injection via includes that relies on include order (if possible). The whole thing also comes at the price of further specializations for the flat vector backend (relevant in !188).
My current solution is as follows: I changed the DerivativeTraits to be a template parameter of DiscreteGlobalBasisFunction. I created custom derivative traits with a custom type(def) for my non-standard derivative range type. The latter allows me to conveniently specialize the flat vector backend (and possibly more) for it.
I'll be very happy about a general purpose solution as well as some input on how to improve my current situation.