ug4
ug::QuadratureRuleProvider< TDim > Class Template Reference

provides quadrature rules for a reference dimension More...

#include <quadrature_provider.h>

Public Member Functions

 ~QuadratureRuleProvider ()
 destructor More...
 

Static Public Member Functions

static const QuadratureRule< TDim > & get (ReferenceObjectID roid, size_t order, QuadType type=BEST)
 gets quadrature rule of requested order More...
 
template<typename TRefElem >
static const QuadratureRule< TDim > & get (size_t order, QuadType type=BEST)
 gets quadrature rule of requested order More...
 

Static Public Attributes

static const int dim = TDim
 dimension of reference element More...
 

Protected Member Functions

const QuadratureRule< 0 > * create_gauss_legendre_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 1 > * create_gauss_legendre_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 2 > * create_gauss_legendre_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 3 > * create_gauss_legendre_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 0 > * create_gauss_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 1 > * create_gauss_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 2 > * create_gauss_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 3 > * create_gauss_rule (ReferenceObjectID roid, size_t order)
 
const QuadratureRule< 1 > * create_newton_cotes_rule (ReferenceObjectID roid, size_t order)
 

Static Protected Member Functions

static void create_rule (ReferenceObjectID roid, size_t order, QuadType type)
 creates rule at this provider More...
 
static const QuadratureRule< TDim > & get_quad_rule (ReferenceObjectID roid, size_t order, QuadType type)
 provide rule, try to create it if not already present More...
 
static const QuadratureRule< TDim > * create_gauss_rule (ReferenceObjectID roid, size_t order)
 
static const QuadratureRule< TDim > * create_newton_cotes_rule (ReferenceObjectID roid, size_t order)
 
static const QuadratureRule< TDim > * create_gauss_legendre_rule (ReferenceObjectID roid, size_t order)
 

Static Protected Attributes

static std::vector< const QuadratureRule< TDim > * > m_vRule [NUM_QUADRATURE_TYPES][NUM_REFERENCE_OBJECTS]
 Vector, holding all registered rules. More...
 

Private Member Functions

QuadratureRuleProvideroperator= (const QuadratureRuleProvider &)
 
 QuadratureRuleProvider ()
 private constructor performing standard registering More...
 
 QuadratureRuleProvider (const QuadratureRuleProvider &)
 

Static Private Member Functions

static QuadratureRuleProvider< dim > & instance ()
 singleton provider More...
 

Detailed Description

template<int TDim>
class ug::QuadratureRuleProvider< TDim >

provides quadrature rules for a reference dimension

This class serves as a provider for quadrature rules. It is templated for a reference element dimension.

Template Parameters
TDimReference Element Dimension

Constructor & Destructor Documentation

◆ QuadratureRuleProvider() [1/2]

template<int TDim>
ug::QuadratureRuleProvider< TDim >::QuadratureRuleProvider
private

private constructor performing standard registering

References NUM_QUADRATURE_TYPES, and ug::NUM_REFERENCE_OBJECTS.

◆ QuadratureRuleProvider() [2/2]

template<int TDim>
ug::QuadratureRuleProvider< TDim >::QuadratureRuleProvider ( const QuadratureRuleProvider< TDim > &  )
private

◆ ~QuadratureRuleProvider()

template<int TDim>
ug::QuadratureRuleProvider< TDim >::~QuadratureRuleProvider

destructor

References NUM_QUADRATURE_TYPES, and ug::NUM_REFERENCE_OBJECTS.

Member Function Documentation

◆ create_gauss_legendre_rule() [1/5]

const QuadratureRule< 0 > * ug::QuadratureRuleProvider< 0 >::create_gauss_legendre_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_legendre_rule() [2/5]

const QuadratureRule< 1 > * ug::QuadratureRuleProvider< 1 >::create_gauss_legendre_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_legendre_rule() [3/5]

const QuadratureRule< 2 > * ug::QuadratureRuleProvider< 2 >::create_gauss_legendre_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_legendre_rule() [4/5]

const QuadratureRule< 3 > * ug::QuadratureRuleProvider< 3 >::create_gauss_legendre_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_legendre_rule() [5/5]

template<int TDim>
static const QuadratureRule<TDim>* ug::QuadratureRuleProvider< TDim >::create_gauss_legendre_rule ( ReferenceObjectID  roid,
size_t  order 
)
staticprotected

rule creation, returns NULL if unavailable

◆ create_gauss_rule() [1/5]

const QuadratureRule< 0 > * ug::QuadratureRuleProvider< 0 >::create_gauss_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

References dim, ug::ROID_VERTEX, and UG_THROW.

◆ create_gauss_rule() [2/5]

const QuadratureRule< 1 > * ug::QuadratureRuleProvider< 1 >::create_gauss_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

References dim, ug::ROID_EDGE, and UG_THROW.

◆ create_gauss_rule() [3/5]

const QuadratureRule< 2 > * ug::QuadratureRuleProvider< 2 >::create_gauss_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_rule() [4/5]

const QuadratureRule< 3 > * ug::QuadratureRuleProvider< 3 >::create_gauss_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_gauss_rule() [5/5]

template<int TDim>
static const QuadratureRule<TDim>* ug::QuadratureRuleProvider< TDim >::create_gauss_rule ( ReferenceObjectID  roid,
size_t  order 
)
staticprotected

rule creation, returns NULL if unavailable

◆ create_newton_cotes_rule() [1/2]

const QuadratureRule< 1 > * ug::QuadratureRuleProvider< 1 >::create_newton_cotes_rule ( ReferenceObjectID  roid,
size_t  order 
)
protected

◆ create_newton_cotes_rule() [2/2]

template<int TDim>
const QuadratureRule< TDim > * ug::QuadratureRuleProvider< TDim >::create_newton_cotes_rule ( ReferenceObjectID  roid,
size_t  order 
)
staticprotected

rule creation, returns NULL if unavailable

◆ create_rule()

template<int TDim>
void ug::QuadratureRuleProvider< TDim >::create_rule ( ReferenceObjectID  roid,
size_t  order,
QuadType  type 
)
staticprotected

creates rule at this provider

References BEST, dim, GAUSS, GAUSS_LEGENDRE, NEWTON_COTES, and UG_THROW.

◆ get() [1/2]

template<int TDim>
const QuadratureRule< TDim > & ug::QuadratureRuleProvider< TDim >::get ( ReferenceObjectID  roid,
size_t  order,
QuadType  type = BEST 
)
static

gets quadrature rule of requested order

This function returns the next quadrature rule of order >= 'order' that is registered to this Provider. If no rule is found an Exception is thrown.

Parameters
[in]roidReference Object id
[in]orderOrder of requested quadrature rule

◆ get() [2/2]

template<int TDim>
template<typename TRefElem >
const QuadratureRule< TDim > & ug::QuadratureRuleProvider< TDim >::get ( size_t  order,
QuadType  type = BEST 
)
static

gets quadrature rule of requested order

This function returns the next quadrature rule of order >= 'order' that is registered to this Provider. If no rule is found an Exception is thrown.

Parameters
[in]orderOrder of requested quadrature rule
Template Parameters
TRefElemReference element type

References dim, and UG_THROW.

Referenced by ug::IntegralNormalComponentOnManifoldGeneral(), ug::Integrate(), ug::SideAndElemErrEstData< TDomain >::GetQuadRules< refDim >::operator()(), ug::DimFVGeometry< TWorldDim, TDim >::update(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_local(), and ug::DimFVGeometry< TWorldDim, TDim >::update_local().

◆ get_quad_rule()

template<int TDim>
const QuadratureRule< TDim > & ug::QuadratureRuleProvider< TDim >::get_quad_rule ( ReferenceObjectID  roid,
size_t  order,
QuadType  type 
)
staticprotected

provide rule, try to create it if not already present

◆ instance()

template<int TDim>
static QuadratureRuleProvider<dim>& ug::QuadratureRuleProvider< TDim >::instance ( )
inlinestaticprivate

singleton provider

◆ operator=()

template<int TDim>
QuadratureRuleProvider& ug::QuadratureRuleProvider< TDim >::operator= ( const QuadratureRuleProvider< TDim > &  )
private

Member Data Documentation

◆ dim

template<int TDim>
const int ug::QuadratureRuleProvider< TDim >::dim = TDim
static

dimension of reference element

◆ m_vRule

template<int dim>
std::vector< const QuadratureRule< dim > * > ug::QuadratureRuleProvider< dim >::m_vRule
staticprotected

Vector, holding all registered rules.


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