ug4
|
base class for reference elements More...
#include <reference_element.h>
Public Member Functions | |
int | dimension () const |
returns the dimension where reference element lives More... | |
int | id (int dim_i, size_t i, int dim_j, size_t j) const |
id of object j in dimension dim_j of obj i in dimension dim_i More... | |
size_t | num (int dim) const |
returns the number of geometric objects of dim More... | |
size_t | num (int dim_i, size_t i, int dim_j) const |
returns the number of object of dim for a sub-geometric object More... | |
size_t | num (ReferenceObjectID type) const |
number of reference elements this element contains More... | |
void | print_info () const |
print informations about the reference element More... | |
ReferenceElement () | |
Constructor filling the arrays. More... | |
ReferenceObjectID | roid () const |
returns the reference object id More... | |
ReferenceObjectID | roid (int dim_i, size_t i) const |
reference element type of obj nr i in dimension dim_i More... | |
number | size () const |
returns the size (e.g. area or volume) of the reference element More... | |
Protected Types | |
enum | { POINT = 0 , EDGE = 1 , FACE = 2 , VOLUME = 3 } |
to make it more readable More... | |
enum | { MAXOBJECTS = 12 } |
maximum number of Objects in all dimensions More... | |
enum | { MAXDIM = 3 } |
maximum dimension More... | |
Protected Attributes | |
int | m_dim |
dimension of the reference world More... | |
int | m_id [MAXDIM+1][MAXOBJECTS][MAXDIM+1][MAXOBJECTS] |
indices of GeomObjects More... | |
number | m_size |
size of reference element More... | |
size_t | m_vNum [MAXDIM+1] |
number of Geometric Objects of a dimension More... | |
size_t | m_vNumRefElem [NUM_REFERENCE_OBJECTS] |
number of reference elements More... | |
ReferenceObjectID | m_vRefElemType [MAXDIM+1][MAXOBJECTS] |
type of reference elements More... | |
size_t | m_vSubNum [MAXDIM+1][MAXOBJECTS][MAXDIM+1] |
number of Geometric Objects contained in a (Sub-)Geometric Object of the Element More... | |
base class for reference elements
Reference element interface. A reference element describes in local coordinates the structure an element type. Physical elements of a grid are thought to be constructed by a mapping from a reference element into the real world space.
Each ReferenceElement may be constructed from other (lower dimensional) geometric objects, that are themselves a mapping from a (lower dimensional) reference element. (E.g. a triangle is constructed by three edges and three vertices) Thus, these relationships are also specified by the reference element and methods of this function provide the number of constructing sub-geometric objects and the relationship between those.
Note, that we use one base class in order to implement all reference elements providing enough space to store all data for each derivation. This enlarges the memory consumption slightly but allows fast and inlined code. Since usually only one reference element (singleton) per program is created memory consumption is not an issue.
ug::ReferenceElement::ReferenceElement | ( | ) |
Constructor filling the arrays.
References m_id, m_vNum, m_vNumRefElem, m_vRefElemType, m_vSubNum, MAXDIM, MAXOBJECTS, ug::NUM_REFERENCE_OBJECTS, roid(), and ug::ROID_UNKNOWN.
|
inline |
returns the dimension where reference element lives
References m_dim.
Referenced by ug::SideAndElemErrEstData< TDomain >::init_quadrature(), print_info(), ug::SetLagrangeEdgeLocalDoFs(), ug::SetLagrangeFaceLocalDoFs(), and ug::SetLagrangeVolumeLocalDoFs().
|
inline |
id of object j in dimension dim_j of obj i in dimension dim_i
A reference element is constructed by several geometric objects, that are mapped by a reference element by themselves. This method returns the id (w.r.t. this reference element) of a sub-geometric object that is part of a sub-geometric object of the reference element
[in] | dim_i | dimension of sub geometric object |
[in] | i | id of sub geometric object |
[in] | dim_j | dimension for obj contained in the sub-object |
[in] | j | number of obj contained in the sub-object |
References m_id.
Referenced by ug::SCVFofSCVRayIntersectionWrapper< 2, 2 >::apply(), ug::DimHFV1Geometry< TDim, TWorldDim >::compute_side_midpoints(), ug::ComputeGradientPiecewiseConstant(), ug::fv1_dim_traits_base< TDim, TWorldDim >::get_dim_scvf_from_to(), ug::SideAndElemErrEstData< TDomain >::get_elem_error_indicator(), ug::SideAndElemErrEstData< TDomain >::init_quadrature(), ug::IntegralNormalComponentOnManifoldGeneral(), print_info(), ug::fv1_traits_ReferencePyramid::scv_mid_id(), ug::fv1_traits_ReferencePyramid::scv_node_id(), ug::fv1_traits_ReferencePyramid::scvf_from_to(), ug::fv1_traits_ReferencePyramid::scvf_mid_id(), ug::DoFDistribution::sort_constrained_edges(), ug::DoFDistribution::sort_constrained_faces(), ug::SubLocalDoFSet< TDim >::SubLocalDoFSet(), ug::DimCRFVGeometry< TDim, TWorldDim >::update(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_geometric_data(), ug::DimFVGeometry< TWorldDim, TDim >::update_local(), and ug::DimFV1IBGeometry< TDim, TWorldDim >::update_local_data().
|
inline |
returns the number of geometric objects of dim
A reference element is constructed by several geometric objects, that are mapped by a reference element by themselves. This method returns how many (sub-)geometric objects of a given dimension are contained in this reference element.
[in] | dim | dimension |
Referenced by ug::CommonLocalDoFSet::add(), ug::SCVFofSCVRayIntersectionWrapper< 2, 2 >::apply(), ug::DimHFV1Geometry< TDim, TWorldDim >::compute_side_midpoints(), ug::ComputeGradientPiecewiseConstant(), ug::LocalFiniteElementProvider::create_sub_dof_set(), ug::fv1_dim_traits_base< TDim, TWorldDim >::dim_get_num_SCV_and_SCVF(), ug::SideAndElemErrEstData< TDomain >::get_elem_error_indicator(), ug::SideAndElemErrEstData< TDomain >::init_quadrature(), ug::IntegralNormalComponentOnManifoldGeneral(), print_info(), ug::DimReferenceElement< d >::print_info(), ug::SetLagrangeFaceLocalDoFs(), ug::SetLagrangeVertexLocalDoFs(), ug::SubLocalDoFSet< TDim >::SubLocalDoFSet(), ug::DimFV1Geometry< TDim, TWorldDim >::update(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update(), ug::DimCRFVGeometry< TDim, TWorldDim >::update(), ug::DimFV1Geometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFV1IBGeometry< TDim, TWorldDim >::update_boundary_faces(), ug::DimFVGeometry< TWorldDim, TDim >::update_boundary_faces(), ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces(), ug::DimCRFVGeometry< TDim, TWorldDim >::update_geometric_data(), ug::DimFV1Geometry< TDim, TWorldDim >::update_local(), ug::DimFVGeometry< TWorldDim, TDim >::update_local(), and ug::DimFV1IBGeometry< TDim, TWorldDim >::update_local_data().
|
inline |
returns the number of object of dim for a sub-geometric object
A reference element is constructed by several geometric objects, that are mapped by a reference element by themselves. This method returns how many (sub-)geometric objects of a given dimension are contained in a (sub-)geometric object of this reference element.
[in] | dim_i | dimension of sub geometric object |
[in] | i | number of sub geometric object |
[in] | dim_j | dimension for elems contained in the sub-object |
References m_vSubNum.
|
inline |
number of reference elements this element contains
References m_vNumRefElem.
void ug::ReferenceElement::print_info | ( | ) | const |
print informations about the reference element
References dimension(), id(), num(), and size().
Referenced by ug::DimReferenceElement< d >::print_info().
|
inline |
returns the reference object id
References m_dim, and m_vRefElemType.
Referenced by ug::ReferenceElementProvider::add_dim_elem(), ug::ReferenceElementProvider::add_elem(), ug::ReferenceElementProvider::get_elem(), ug::SideAndElemErrEstData< TDomain >::init_quadrature(), ug::LocalDoFSet::num_dof(), ReferenceElement(), ug::SetLagrangeLocalDoFs(), ug::SetLagrangeVolumeLocalDoFs(), ug::SideNormal(), ug::SubLocalDoFSet< TDim >::SubLocalDoFSet(), and ug::DimFEGeometry< TWorldDim, TRefDim >::update_boundary_faces().
|
inline |
reference element type of obj nr i in dimension dim_i
References m_vRefElemType.
|
inline |
returns the size (e.g. area or volume) of the reference element
References m_size.
Referenced by print_info().
|
protected |
dimension of the reference world
Referenced by dimension(), ug::ReferenceEdge::ReferenceEdge(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), ug::ReferenceVertex::ReferenceVertex(), and roid().
|
protected |
indices of GeomObjects
Referenced by id(), ug::ReferenceEdge::ReferenceEdge(), ReferenceElement(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), and ug::ReferenceVertex::ReferenceVertex().
|
protected |
size of reference element
Referenced by ug::ReferenceEdge::ReferenceEdge(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), ug::ReferenceVertex::ReferenceVertex(), and size().
|
protected |
number of Geometric Objects of a dimension
Referenced by num(), ug::ReferenceEdge::ReferenceEdge(), ReferenceElement(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), and ug::ReferenceVertex::ReferenceVertex().
|
protected |
number of reference elements
Referenced by num(), ug::ReferenceEdge::ReferenceEdge(), ReferenceElement(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), and ug::ReferenceVertex::ReferenceVertex().
|
protected |
type of reference elements
Referenced by ug::ReferenceEdge::ReferenceEdge(), ReferenceElement(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), ug::ReferenceVertex::ReferenceVertex(), and roid().
|
protected |
number of Geometric Objects contained in a (Sub-)Geometric Object of the Element
Referenced by num(), ug::ReferenceEdge::ReferenceEdge(), ReferenceElement(), ug::ReferenceHexahedron::ReferenceHexahedron(), ug::ReferenceOctahedron::ReferenceOctahedron(), ug::ReferencePrism::ReferencePrism(), ug::ReferencePyramid::ReferencePyramid(), ug::ReferenceQuadrilateral::ReferenceQuadrilateral(), ug::ReferenceTetrahedron::ReferenceTetrahedron(), ug::ReferenceTriangle::ReferenceTriangle(), and ug::ReferenceVertex::ReferenceVertex().