Skip to content

Cleanup `makeBasis()` mechanism

Carsten Gräser requested to merge feature/rename-factorybuilder-factorytag into master

Cleanup makeBasis() mechanism. This MR is on top of !91 (merged).

  • Rename *NodeFactorsBuilder/*FactoryTag to *PreBasisFactory
  • Rename build() to makePreBasis()
  • Make makePreBasis() const
  • Make implementation of BasisBuilder::composite() more readable.
  • Fix BasisBuilder::composite() and BasisBuilder::power(). Both did not work with stateful ChildPreBasisFactories before. This is now fixed.
  • Hide internal members of PreBasisFactories
  • Use return type deduction for all PreBasisFactory creation helpers. This makes the code much more readable and also hides the concrete Imp::* return type from the use.
  • Add utility applyPartial() which is like std::apply but allows to select the tuple entries to be used as arguments. (This should maybe go to dune-common).

This is what you need to do to update your code:

  • If you only use the makeBasis() mechanism this will work as before.
  • If you explicitly constructed the *Builder classes in your code, you must follow the renaming.
  • If you explicitly used the build() methods, you have to change this to makePreBasis()
  • If you implemented your own FactoryTag/NodeFactoryBuilder/PreBasisFactory to hook into the makeBasis() mechanism, then you have to rename build() to makePreBasis().

Merge request reports