Skip to content

Improve multi index type in global basis

Carsten Gräser requested to merge feature/improve-exported-multiindex-type into master
  • We now separate the stored and exported multi index type MultiIndexStorage and MultiIndex.
  • MultiIndexStorage will always have dynamic size and may need a larger capacity compared to MultiIndexs size.
  • MultiIndex has static size, if it is clear that the multi indices generated by the PreBasis have a static length.
  • If the size of multi indices is guaranteed to be one, then the MultiIndex can be cast to the plain index to avoid using [0] in simple cases.
  • The implementation is based on the new StaticMultiIndex and OverflowArray classes.
  • OverflowArraw mostly behaves like Dune::ReservedVector but derives from a statically sized array base class. This allows to have temporary dynamic size but cast to the result to the statically sized base class.
  • StaticMultiIndex represents a statically sized multi index. It essentially adds operator<< to std::array for writing to a stream and a cast to the first entry for size()==0.
  • FlatMultiIndex<T> is now a deprecated alias for StaticMultiIndex<T,1> and no longer used.
Edited by Carsten Gräser

Merge request reports