Cleanup MultiIndex generation
This essentially implements the changes proposed in #31 (closed). Notice that this is a non-compatible interface change and you have to adjust your PreBasis and PreBasisFactory implementation accordingly!
This changes the generation and forwarding of multi index types
and related information in the interfaces of the PreBasis and PreBasisFactory
and the implementation DefaultGlobalBasis.
In summary: The PreBasis now longer depends on the MultiIndex type
which allows to move all information about required size of the multi indices
to the PreBasis. Now the DefaultGlobalBasis is responsible to create
suitable indices for the PreBasis (instead of makeBasis()).
Changes in detail:
- Interface changes to
PreBasis- The typedefs
PreBasis::MultiIndexandPreBasis::SizePrefixare removed. - The
SizePrefixargument type ofPreBasis::size()is a now template parameter. - The
MultiIndex-type is no longer handed to thePreBasis. - There are new constants
PreBasis::minMultiIndexSize<=PreBasis::maxMultiIndexSize<=PreBasis::multiIndexBufferSize. They denote the minimal and maximal size of the handed out multi indices and the maximal intermediate size needed for building each multi index.
- The typedefs
- Interface changes to
PreBasisFactory- The
MultiIndex-type is no longer a template argument ofPreBasisFactory::makePreBasis. -
PreBasisFactory::requiredMultiIndexSizeis removed. - A
PreBasisFactoryis now invoked usingfactory(gridView)instead offactory.makePreBasis(gridView). This allows to drop many trivialPreBasisFactoryclasses in favor of simple lambda expressions.
- The
- Changes to
DefaultGlobalBasisandmakeBasisimplementation:-
PreBasisis build beforeMultiIndextype is constructed. - The
MultiIndextype is constructed in theDefaultGlobalBasisinstead ofmakeBasis. -
makeBasis<MultiIndex>was removed. This could be re-added, if we make theMultiIndexand additional template parameter ofDefaultGlobalBasiswith the automatically generated type as default. - You can now simply write
DefaultGlobalBasis(gridView, preBasisFactory)instead ofmakeBasis(gridView, preBasisFactory)
-
- Python binding of the global basis have been adapted and simplified.
This is a breaking interface change for PreBasis and PreBasisFactory. You need to adjust your own implementations as outlined above.