ug4
ug::LocalFiniteElementProvider Class Reference

#include <local_finite_element_provider.h>

Classes

struct  DimLocalDoFSets
 
struct  LocalDoFSets
 
struct  LocalShapeFunctionSets
 

Static Public Member Functions

static bool continuous (const LFEID &id, bool bCreate=true)
 returns if a Local Shape Function Set is continuous More...
 
static const CommonLocalDoFSetget_dofs (const LFEID &id, bool bCreate=true)
 returns the common dof set for all reference objects of a dimension More...
 
static const LocalDoFSetget_dofs (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 returns the local DoF set base for an id More...
 
template<int dim>
static void register_set (const LFEID &id, ConstSmartPtr< DimLocalDoFSet< dim > > set)
 
static void register_set (const LFEID &id, ConstSmartPtr< LocalDoFSet > set)
 
template<int dim, typename TShape , typename TGrad >
static void register_set (const LFEID &id, ConstSmartPtr< LocalShapeFunctionSet< dim, TShape, TGrad > > set)
 register a local shape function set for a given reference element type More...
 
template<int dim, typename TShape , typename TGrad >
static const LocalShapeFunctionSet< dim, TShape, TGrad > & get (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 returns the Local Shape Function Set More...
 
template<int dim>
static const LocalShapeFunctionSet< dim > & get (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 returns the Local Shape Function Set More...
 
template<int dim, typename TShape , typename TGrad >
static ConstSmartPtr< LocalShapeFunctionSet< dim, TShape, TGrad > > getptr (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 returns the Local Shape Function Set More...
 
template<int dim>
static ConstSmartPtr< LocalShapeFunctionSet< dim > > getptr (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 returns the Local Shape Function Set More...
 
template<int dim>
static const DimLocalDoFSet< dim > & get_dofs (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 
template<int dim>
static ConstSmartPtr< DimLocalDoFSet< dim > > get_dof_ptr (ReferenceObjectID roid, const LFEID &id, bool bCreate=true)
 

Private Member Functions

 LocalFiniteElementProvider ()
 
 LocalFiniteElementProvider (const LocalFiniteElementProvider &)
 
LocalFiniteElementProvideroperator= (const LocalFiniteElementProvider &)
 
 ~LocalFiniteElementProvider ()
 

Static Private Member Functions

static void create_dof_set (ReferenceObjectID roid, const LFEID &id)
 
static void create_set (const LFEID &id)
 creates new set at runtime if available More...
 
static void create_set (ReferenceObjectID roid, const LFEID &id)
 creates new set at runtime if available More...
 
template<int rdim, int dim>
static void create_sub_dof_set (ReferenceObjectID roid, const LFEID &id)
 creates dof set on sub elements More...
 
static LocalFiniteElementProviderinst ()
 
template<int dim>
static std::map< LFEID, DimLocalDoFSets< dim > > & lds_map ()
 
template<int dim, typename TShape , typename TGrad >
static std::map< LFEID, LocalShapeFunctionSets< dim, TShape, TGrad > > & lsfs_map ()
 
template<typename TRefElem >
static void create_lagrange_set (const LFEID &id)
 
static void create_lagrange_set (ReferenceObjectID roid, const LFEID &id)
 
template<typename TRefElem >
static void create_mini_bubble_set (const LFEID &id)
 
static void create_mini_bubble_set (ReferenceObjectID roid, const LFEID &id)
 
template<typename TRefElem >
static void create_nedelec_set (const LFEID &id)
 
static void create_nedelec_set (ReferenceObjectID roid, const LFEID &id)
 
template<typename TRefElem >
static void create_piecewise_constant_set (const LFEID &id)
 
static void create_piecewise_constant_set (ReferenceObjectID roid, const LFEID &id)
 
template<typename TRefElem >
static void create_crouxeiz_raviart_set (const LFEID &id)
 
static void create_crouxeiz_raviart_set (ReferenceObjectID roid, const LFEID &id)
 

Static Private Attributes

static std::map< LFEID, CommonLocalDoFSetm_mCommonDoFSet
 
static std::map< LFEID, bool > m_mContSpace
 
static std::map< LFEID, LocalDoFSetsm_mLocalDoFSets
 

Detailed Description

class to provide infos on local finite elements

This class provides references to Local Shape functions and Local DoF Sets. It is implemented as a Singleton.

Constructor & Destructor Documentation

◆ LocalFiniteElementProvider() [1/2]

ug::LocalFiniteElementProvider::LocalFiniteElementProvider ( )
private

◆ LocalFiniteElementProvider() [2/2]

ug::LocalFiniteElementProvider::LocalFiniteElementProvider ( const LocalFiniteElementProvider )
private

◆ ~LocalFiniteElementProvider()

ug::LocalFiniteElementProvider::~LocalFiniteElementProvider ( )
private

Member Function Documentation

◆ continuous()

◆ create_crouxeiz_raviart_set() [1/2]

template<typename TRefElem >
void ug::LocalFiniteElementProvider::create_crouxeiz_raviart_set ( const LFEID id)
staticprivate

creates crouxeiz-raviart space

References ug::LFEID::CROUZEIX_RAVIART, dim, and register_set().

Referenced by create_set().

◆ create_crouxeiz_raviart_set() [2/2]

void ug::LocalFiniteElementProvider::create_crouxeiz_raviart_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

◆ create_dof_set()

void ug::LocalFiniteElementProvider::create_dof_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

◆ create_lagrange_set() [1/2]

template<typename TRefElem >
void ug::LocalFiniteElementProvider::create_lagrange_set ( const LFEID id)
staticprivate

create the standard lagrange space

References dim, and register_set().

Referenced by create_set().

◆ create_lagrange_set() [2/2]

void ug::LocalFiniteElementProvider::create_lagrange_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

◆ create_mini_bubble_set() [1/2]

template<typename TRefElem >
void ug::LocalFiniteElementProvider::create_mini_bubble_set ( const LFEID id)
staticprivate

create the mini bubble space

References dim, ug::LFEID::LAGRANGE, ug::LFEID::MINI, and register_set().

Referenced by create_set().

◆ create_mini_bubble_set() [2/2]

void ug::LocalFiniteElementProvider::create_mini_bubble_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

create the mini bubble space

References ug::ROID_EDGE, ug::ROID_QUADRILATERAL, ug::ROID_TETRAHEDRON, and ug::ROID_TRIANGLE.

◆ create_nedelec_set() [1/2]

template<typename TRefElem >
void ug::LocalFiniteElementProvider::create_nedelec_set ( const LFEID id)
staticprivate

creates nedelec space

References dim, ug::LFEID::NEDELEC, and register_set().

Referenced by create_set().

◆ create_nedelec_set() [2/2]

void ug::LocalFiniteElementProvider::create_nedelec_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

creates nedelec space

References ug::ROID_TETRAHEDRON, and ug::ROID_TRIANGLE.

◆ create_piecewise_constant_set() [1/2]

template<typename TRefElem >
void ug::LocalFiniteElementProvider::create_piecewise_constant_set ( const LFEID id)
staticprivate

creates piecewise constant space

References dim, ug::LFEID::PIECEWISE_CONSTANT, and register_set().

Referenced by create_set().

◆ create_piecewise_constant_set() [2/2]

void ug::LocalFiniteElementProvider::create_piecewise_constant_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

◆ create_set() [1/2]

void ug::LocalFiniteElementProvider::create_set ( const LFEID id)
staticprivate

◆ create_set() [2/2]

◆ create_sub_dof_set()

template<int rdim, int dim>
void ug::LocalFiniteElementProvider::create_sub_dof_set ( ReferenceObjectID  roid,
const LFEID id 
)
staticprivate

◆ get() [1/2]

template<int dim, typename TShape , typename TGrad >
const LocalShapeFunctionSet< dim, TShape, TGrad > & ug::LocalFiniteElementProvider::get ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
static

returns the Local Shape Function Set

This function returns the Local Shape Function Set for a reference element type and an Identifier if a set has been registered for the identifier. Else an exception is thrown.

Parameters
[in]roidReference object id
[in]idIdentifier for local shape function set
Returns
set A const reference to the shape function set

References dim, UG_THROW, and ConstSmartPtr< T, FreePolicy >::valid().

◆ get() [2/2]

template<int dim>
static const LocalShapeFunctionSet<dim>& ug::LocalFiniteElementProvider::get ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
inlinestatic

returns the Local Shape Function Set

This function returns the Local Shape Function Set for a reference element type and an Identifier if a set has been registered for the identifier. Else an exception is thrown.

Parameters
[in]roidReference object id
[in]idIdentifier for local shape function set
Returns
set A const reference to the shape function set

◆ get_dof_ptr()

template<int dim>
ConstSmartPtr< DimLocalDoFSet< dim > > ug::LocalFiniteElementProvider::get_dof_ptr ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
static

returns the local DoF set base for an id

References create_dof_set(), dim, inst(), lds_map(), and SPNULL.

◆ get_dofs() [1/3]

const CommonLocalDoFSet & ug::LocalFiniteElementProvider::get_dofs ( const LFEID id,
bool  bCreate = true 
)
static

◆ get_dofs() [2/3]

const LocalDoFSet & ug::LocalFiniteElementProvider::get_dofs ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
static

returns the local DoF set base for an id

References create_dof_set(), get_dofs(), inst(), m_mLocalDoFSets, and UG_THROW.

◆ get_dofs() [3/3]

template<int dim>
const DimLocalDoFSet< dim > & ug::LocalFiniteElementProvider::get_dofs ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
static

returns the local DoF set base for an id

References dim, UG_THROW, and ConstSmartPtr< T, FreePolicy >::valid().

◆ getptr() [1/2]

template<int dim, typename TShape , typename TGrad >
ConstSmartPtr< LocalShapeFunctionSet< dim, TShape, TGrad > > ug::LocalFiniteElementProvider::getptr ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
static

returns the Local Shape Function Set

This function returns the Local Shape Function Set for a reference element type and an Identifier if a set has been registered for the identifier. Else an exception is thrown.

Parameters
[in]roidReference object id
[in]idIdentifier for local shape function set
Returns
set A const reference to the shape function set

References create_set(), dim, inst(), lsfs_map(), and SPNULL.

◆ getptr() [2/2]

template<int dim>
static ConstSmartPtr<LocalShapeFunctionSet<dim> > ug::LocalFiniteElementProvider::getptr ( ReferenceObjectID  roid,
const LFEID id,
bool  bCreate = true 
)
inlinestatic

returns the Local Shape Function Set

This function returns the Local Shape Function Set for a reference element type and an Identifier if a set has been registered for the identifier. Else an exception is thrown.

Parameters
[in]roidReference object id
[in]idIdentifier for local shape function set
Returns
set A const reference to the shape function set

◆ inst()

static LocalFiniteElementProvider& ug::LocalFiniteElementProvider::inst ( )
inlinestaticprivate

◆ lds_map()

template<int dim>
std::map< LFEID, LocalFiniteElementProvider::DimLocalDoFSets< dim > > & ug::LocalFiniteElementProvider::lds_map
staticprivate

Referenced by get_dof_ptr(), and register_set().

◆ lsfs_map()

template<int dim, typename TShape , typename TGrad >
std::map< LFEID, LocalFiniteElementProvider::LocalShapeFunctionSets< dim, TShape, TGrad > > & ug::LocalFiniteElementProvider::lsfs_map
staticprivate

Referenced by getptr(), and register_set().

◆ operator=()

LocalFiniteElementProvider& ug::LocalFiniteElementProvider::operator= ( const LocalFiniteElementProvider )
private

◆ register_set() [1/3]

template<int dim>
void ug::LocalFiniteElementProvider::register_set ( const LFEID id,
ConstSmartPtr< DimLocalDoFSet< dim > >  set 
)
static

register a local DoF set for a given reference element type This function is used to register a Local Shape Function set for an element type and the corresponding local DoF set id.

Parameters
[in]idIdentifier for local DoF set
[in]setLocal Shape Function Set to register

References dim, inst(), lds_map(), register_set(), and UG_THROW.

◆ register_set() [2/3]

void ug::LocalFiniteElementProvider::register_set ( const LFEID id,
ConstSmartPtr< LocalDoFSet set 
)
static

register a local DoF set for a given reference element type This function is used to register a Local Shape Function set for an element type and the corresponding local DoF set id.

Parameters
[in]idIdentifier for local DoF set
[in]setLocal Shape Function Set to register

References m_mCommonDoFSet, m_mLocalDoFSets, and ug::UGError::push_msg().

◆ register_set() [3/3]

template<int dim, typename TShape , typename TGrad >
void ug::LocalFiniteElementProvider::register_set ( const LFEID id,
ConstSmartPtr< LocalShapeFunctionSet< dim, TShape, TGrad > >  set 
)
static

register a local shape function set for a given reference element type

This function is used to register a Local Shape Function set for an element type and the corresponding local shape function set id.

Parameters
[in]idIdentifier for local shape function set
[in]roidReference Object id
[in]setLocal Shape Function Set to register

References dim, inst(), lsfs_map(), m_mContSpace, and UG_THROW.

Referenced by create_crouxeiz_raviart_set(), create_lagrange_set(), create_mini_bubble_set(), create_nedelec_set(), create_piecewise_constant_set(), and register_set().

Member Data Documentation

◆ m_mCommonDoFSet

std::map< LFEID, CommonLocalDoFSet > ug::LocalFiniteElementProvider::m_mCommonDoFSet
staticprivate
Initial value:
=
std::map<LFEID, CommonLocalDoFSet>()

Referenced by get_dofs(), and register_set().

◆ m_mContSpace

std::map< LFEID, bool > ug::LocalFiniteElementProvider::m_mContSpace
staticprivate
Initial value:
=
std::map<LFEID, bool>()

Referenced by continuous(), and register_set().

◆ m_mLocalDoFSets

std::map< LFEID, LocalFiniteElementProvider::LocalDoFSets > ug::LocalFiniteElementProvider::m_mLocalDoFSets
staticprivate
Initial value:
=
std::map<LFEID, LocalFiniteElementProvider::LocalDoFSets>()

Referenced by get_dofs(), and register_set().


The documentation for this class was generated from the following files: