Cleanup MultiIndex generation and use
In order to support hybrid (i.e. runtime-sized) multi-indices, the
CompositePrebasis currently rely on using
MultiIndex. The allocated size is determined automatically using
*PreBasisFactory::requiredMultiIndexSize and the determined
MultiIndex type is forwarded to all involved
PreBasis instances as template parameter. This has a severe drawback: For uniform (i.e. with statically known size) multi-indices, you cannot use a statically sized
std::array. The reason for this is that
CompositePrebasis need to know the size of the multi-indices generated by its children while constructing the final exported multi-indices.
Storing this size the way
ReservedVector does it is most natural.
As a remedy I propose the following changes:
*PreBasisFactory::minMultiIndexSize. This allows to detect uniform multi-indices.
- Allow different types for stored and exported multi-indices. Using
ReservedVectorfor caching allows to build multi-indices as outlined above. For uniform multi-indices the statically sized internal array is better suited.
In order to implement this we have to:
MultiIndextemplate parameter from
*NodeIndexSet. The type of the stored multi-index can be deduced in the
indices()method and the type of the exportet multi-indices is not needed.
- Add template parameters
DefaultLocalIndexSetand let them decay multi-indices from the cached to the exported type automatically.
- As an alternative: Pass
DefaultNodalBasisand hard-wire appropriate