ug4
|
Geom Provider, holding a single instance of a geometry. More...
#include <geom_provider.h>
Classes | |
struct | LFEIDandQuadOrder |
struct to sort keys More... | |
Public Types | |
typedef TGeom | Type |
type of provided object More... | |
Static Public Member Functions | |
static void | clear () |
clears all singletons More... | |
static TGeom & | get () |
returns a singleton based on the identifier More... | |
static TGeom & | get (const LFEID lfeID, const int quadOrder) |
returns a singleton based on the identifier More... | |
Static Public Attributes | |
static const bool | staticLocalData = TGeom::staticLocalData |
flag indicating if local data may change More... | |
Protected Types | |
typedef std::map< LFEIDandQuadOrder, TGeom * > | MapType |
vector holding instances More... | |
Protected Member Functions | |
GeomProvider () | |
private constructor More... | |
~GeomProvider () | |
destructor More... | |
Static Protected Member Functions | |
static void | clear_geoms () |
clears all instances More... | |
static TGeom & | get_class (const LFEID lfeID, const int quadOrder) |
returns class based on identifier More... | |
static GeomProvider< TGeom > & | inst () |
singleton provider More... | |
Static Protected Attributes | |
static MapType | m_mLFEIDandOrder = std::map<typename GeomProvider<TGeom>::LFEIDandQuadOrder, TGeom*>() |
Geom Provider, holding a single instance of a geometry.
This class is used to wrap an object into a singleton-like provider, such that construction computations is avoided, if the object is used several times.
In addition, the object can be shared between unrelated code parts, if the same object is intended to be used, but no passing is possible or wanted.
|
protected |
vector holding instances
typedef TGeom ug::GeomProvider< TGeom >::Type |
type of provided object
|
inlineprotected |
private constructor
References ug::GeomProvider< TGeom >::m_mLFEIDandOrder.
|
inlineprotected |
destructor
References ug::GeomProvider< TGeom >::clear_geoms().
|
inlinestatic |
clears all singletons
References ug::GeomProvider< TGeom >::inst().
|
inlinestaticprotected |
clears all instances
References ug::GeomProvider< TGeom >::m_mLFEIDandOrder.
Referenced by ug::GeomProvider< TGeom >::~GeomProvider().
|
inlinestatic |
returns a singleton based on the identifier
References ug::GeomProvider< TGeom >::inst(), ug::GeomProvider< TGeom >::staticLocalData, and UG_THROW.
Referenced by ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::add_def_A_elem(), ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::add_jac_A_elem(), ug::NeumannBoundaryFE< TDomain >::add_rhs_elem(), ug::NeumannBoundaryFV< TDomain >::add_rhs_elem(), ug::NeumannBoundaryFV1< TDomain >::add_rhs_elem(), ug::NeumannBoundaryFE< TDomain >::finish_elem_loop(), ug::NeumannBoundaryFV< TDomain >::finish_elem_loop(), ug::NeumannBoundaryFV1< TDomain >::fsh_elem_loop(), ug::GeomProvider< TGeom >::get(), ug::NeumannBoundaryFE< TDomain >::NumberData::lin_def(), ug::NeumannBoundaryFV< TDomain >::NumberData::lin_def(), ug::NeumannBoundaryFV1< TDomain >::NumberData::lin_def(), ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_elem(), ug::NeumannBoundaryFE< TDomain >::prep_elem(), ug::NeumannBoundaryFV< TDomain >::prep_elem(), ug::NeumannBoundaryFV1< TDomain >::prep_elem(), ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_elem_loop(), ug::NeumannBoundaryFE< TDomain >::prep_elem_loop(), ug::NeumannBoundaryFV< TDomain >::prep_elem_loop(), and ug::NeumannBoundaryFV1< TDomain >::prep_elem_loop().
|
inlinestatic |
returns a singleton based on the identifier
References ug::GeomProvider< TGeom >::get(), ug::GeomProvider< TGeom >::inst(), and ug::GeomProvider< TGeom >::staticLocalData.
|
inlinestaticprotected |
returns class based on identifier
References ug::GeomProvider< TGeom >::m_mLFEIDandOrder, and UG_THROW.
|
inlinestaticprotected |
singleton provider
Referenced by ug::GeomProvider< TGeom >::clear(), and ug::GeomProvider< TGeom >::get().
|
staticprotected |
|
static |
flag indicating if local data may change
If the local data may change due to run-time setting of trial space or quadrature order, we must store one object for each type. In such a case we must store each combination in some data structure and return the correct one based on the identifier.
Referenced by ug::GeomProvider< TGeom >::get().