Skip to content

Simplify the generic FEM factories

Carsten Gräser requested to merge feature/simplify-generic-fem-factories into master

All *Factory classes where derived from TopologyFactory passing a *FactoryTraits class to the latter. The purpose is to implement a TopologyFactory::create() method with dynamic topology id parameter based on the template method *Factory::createObject<Topology>(). It turns out that this TopologyFactory::create() method is never used. Instead a counterpart TopologyFactory::create<Topology>() is called. Hence we can get rid of many indirections by just renaming *Factory::createObject<Topology>() to *Factory::create<Topology>() and dropping the base class.

This also allows to remove the *FactoryTraits classes. If the types define in there are used in the corresponding *Factory, they are now defined directly in *Factory which avoids many typename Traits:: making the code less cluttered.

After this commit TopologyFactory itself is not used anymore in dune-localfunctions. TopologySingletonFactory is still used but serves a different purpose. It provides a singleton factory with caching. However it does not use TopologyFactory itself.

Merge request reports