dune-geometry
2.4
|
Unique label for each type of entities that can occur in DUNE grids. More...
#include <dune/geometry/type.hh>
Public Types | |
enum | BasicType { simplex, cube, pyramid, prism, extended, none } |
Each entity can be tagged by one of these basic types plus its space dimension. More... | |
enum | Binary { b0001 = 1, b0011 = 3, b0101 = 5, b0111 = 7 } |
A few binary constants. More... | |
Public Member Functions | |
GeometryType () | |
Default constructor, not initializing anything. More... | |
GeometryType (BasicType basicType, unsigned int dim) | |
Constructor, using the basic type and the dimension. More... | |
GeometryType (unsigned int topologyId, unsigned int dim) | |
Constructor, using the topologyId (integer) and the dimension. More... | |
template<class TopologyType > | |
GeometryType (TopologyType t) | |
Constructor from static TopologyType class. More... | |
GeometryType (unsigned int dim) | |
Constructor for vertices and segments. More... | |
GeometryType (int dim) | |
Constructor for vertices and segments. More... | |
bool | operator== (const GeometryType &other) const |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal. More... | |
bool | operator!= (const GeometryType &other) const |
Check for inequality. More... | |
bool | operator< (const GeometryType &other) const |
less-than operation for use with maps More... | |
Setup Methods | |
void | makeVertex () |
Make a vertex. More... | |
void | makeLine () |
Make a line segment. More... | |
void | makeTriangle () |
Make a triangle. More... | |
void | makeQuadrilateral () |
Make a quadrilateral. More... | |
void | makeTetrahedron () |
Make a tetrahedron. More... | |
void | makePyramid () |
Make a pyramid. More... | |
void | makePrism () |
Make a prism. More... | |
void | makeHexahedron () |
Make a hexahedron. More... | |
void | makeSimplex (unsigned int dim) |
Make a simplex of given dimension. More... | |
void | makeCube (unsigned int dim) |
Make a hypercube of given dimension. More... | |
void | makeNone (unsigned int dim) |
Make a singular of given dimension. More... | |
void | makeFromVertices (unsigned int dim, unsigned int vertices) |
Construct the correct geometry type given the dimension and the number of vertices. More... | |
Query Methods | |
bool | isVertex () const |
Return true if entity is a vertex. More... | |
bool | isLine () const |
Return true if entity is a line segment. More... | |
bool | isTriangle () const |
Return true if entity is a triangle. More... | |
bool | isQuadrilateral () const |
Return true if entity is a quadrilateral. More... | |
bool | isTetrahedron () const |
Return true if entity is a tetrahedron. More... | |
bool | isPyramid () const |
Return true if entity is a pyramid. More... | |
bool | isPrism () const |
Return true if entity is a prism. More... | |
bool | isHexahedron () const |
Return true if entity is a hexahedron. More... | |
bool | isSimplex () const |
Return true if entity is a simplex of any dimension. More... | |
bool | isCube () const |
Return true if entity is a cube of any dimension. More... | |
bool | isNone () const |
Return true if entity is a singular of any dimension. More... | |
unsigned int | dim () const |
Return dimension of the type. More... | |
unsigned int | id () const |
Return the topology id the type. More... | |
Unique label for each type of entities that can occur in DUNE grids.
This class has to be extended if a grid implementation with new entity types is added to DUNE.
|
inline |
Default constructor, not initializing anything.
|
inline |
Constructor, using the basic type and the dimension.
References cube, makeCube(), makePrism(), makePyramid(), makeSimplex(), none, prism, pyramid, and simplex.
|
inline |
Constructor, using the topologyId (integer) and the dimension.
|
inlineexplicit |
Constructor from static TopologyType class.
Constructs the GeometryType object from a static topology representation.
TopologyType | A class providing public static unsigned int members TopologyType::dimension and TopologyType::id. You can e.g. use the Point, Prism and Pyramid structs from topologytypes.hh. |
t | Any object of type TopologyType. The object t itself is ignored. |
|
inlineexplicit |
Constructor for vertices and segments.
|
inlineexplicit |
Constructor for vertices and segments.
|
inline |
Return dimension of the type.
Referenced by Dune::buildRefinement(), Dune::ReferenceElement< ctype, dim >::SubEntityInfo::codim(), Dune::LocalGeometryTypeIndex::index(), Dune::GlobalGeometryTypeIndex::index(), makeCube(), makeNone(), makeSimplex(), Dune::ReferenceElementContainer< ctype, dim >::operator()(), and Dune::operator<<().
|
inline |
Return the topology id the type.
Referenced by Dune::buildRefinement(), Dune::ReferenceElement< ctype, dim >::checkInside(), Dune::TopologyFactory< Traits >::create(), Dune::TopologySingletonFactory< Factory >::create(), Dune::LocalGeometryTypeIndex::index(), Dune::ReferenceElementContainer< ctype, dim >::operator()(), and Dune::operator<<().
|
inline |
Return true if entity is a cube of any dimension.
Referenced by Dune::operator<<().
|
inline |
Return true if entity is a hexahedron.
References b0111.
|
inline |
Return true if entity is a line segment.
|
inline |
Return true if entity is a singular of any dimension.
Referenced by Dune::LocalGeometryTypeIndex::index(), and Dune::operator<<().
|
inline |
|
inline |
|
inline |
Return true if entity is a quadrilateral.
References b0011.
|
inline |
Return true if entity is a simplex of any dimension.
Referenced by Dune::operator<<().
|
inline |
Return true if entity is a tetrahedron.
References b0001.
|
inline |
Return true if entity is a triangle.
References b0001.
|
inline |
Return true if entity is a vertex.
|
inline |
Make a hypercube of given dimension.
References dim().
Referenced by GeometryType(), makeFromVertices(), makeHexahedron(), and makeQuadrilateral().
|
inline |
Construct the correct geometry type given the dimension and the number of vertices.
References makeCube(), makeLine(), makePrism(), makePyramid(), makeSimplex(), and makeVertex().
|
inline |
Make a hexahedron.
References makeCube().
|
inline |
Make a line segment.
Referenced by makeFromVertices().
|
inline |
Make a singular of given dimension.
References dim().
Referenced by Dune::LocalGeometryTypeIndex::type().
|
inline |
|
inline |
|
inline |
Make a quadrilateral.
References makeCube().
|
inline |
Make a simplex of given dimension.
References dim().
Referenced by GeometryType(), makeFromVertices(), makeTetrahedron(), and makeTriangle().
|
inline |
Make a tetrahedron.
References makeSimplex().
|
inline |
Make a triangle.
References makeSimplex().
|
inline |
Make a vertex.
Referenced by makeFromVertices().
|
inline |
Check for inequality.
|
inline |
less-than operation for use with maps
|
inline |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.