-
- Downloads
There was a problem fetching the pipeline summary.
Merge branch 'feature/parameterizedobjectfactory' into 'master'
Feature/parameterizedobjectfactory the idea is to have a generic factory which can be extended by the user at run time and maps a key (usually an `std::string`) to a constructor-call (usually taking a `Dune::ParameterTree`). We want something like a plugin-system, to instantiate implementations of an abstract interface. Usually a factory can only create a hard-coded list of objects. The proposed ParameterizedObjectFactory different modules (or the user) can register implementations of the interface, without modifying the factory code. Example: ```C++ using V = Dune::BlockVector<Dune::FieldVector<double,2>>; using M = Dune::BCRSMatrix<Dune::FieldMatrix<double,2,2>>; using PreconditionerFactory = Dune::ParameterizedObjectFactory<Dune::Preconditioner<V,V>(const M&, const Dune::ParameterTree&)>; PreconditionerFactory::define<Dune::SeqGS<M,V,V>>("Gauss-Seidel"); ``` See merge request !3
No related branches found
No related tags found
Pipeline #
Showing
- dune/common/parameterizedobject.hh 186 additions, 0 deletionsdune/common/parameterizedobject.hh
- dune/common/test/CMakeLists.txt 5 additions, 0 deletionsdune/common/test/CMakeLists.txt
- dune/common/test/parameterizedobjectfactorysingleton.cc 21 additions, 0 deletionsdune/common/test/parameterizedobjectfactorysingleton.cc
- dune/common/test/parameterizedobjectfactorysingleton.hh 28 additions, 0 deletionsdune/common/test/parameterizedobjectfactorysingleton.hh
- dune/common/test/parameterizedobjecttest.cc 100 additions, 0 deletionsdune/common/test/parameterizedobjecttest.cc
Loading
Please register or sign in to comment