dune-geometry 3.0-git
|
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. | |
GeometryType (BasicType basicType, unsigned int dim) | |
Constructor, using the basic type and the dimension. | |
GeometryType (unsigned int topologyId, unsigned int dim) | |
Constructor, using the topologyId (integer) and the dimension. | |
template<class TopologyType > | |
GeometryType (TopologyType t) | |
Constructor from static TopologyType class. | |
GeometryType (unsigned int dim) | |
Constructor for vertices and segments. | |
GeometryType (int dim) | |
Constructor for vertices and segments. | |
Setup Methods | |
void | makeVertex () |
Make a vertex. | |
void | makeLine () |
Make a line segment. | |
void | makeTriangle () |
Make a triangle. | |
void | makeQuadrilateral () |
Make a quadrilateral. | |
void | makeTetrahedron () |
Make a tetrahedron. | |
void | makePyramid () |
Make a pyramid. | |
void | makePrism () |
Make a prism. | |
void | makeHexahedron () |
Make a hexahedron. | |
void | makeSimplex (unsigned int dim) |
Make a simplex of given dimension. | |
void | makeCube (unsigned int dim) |
Make a hypercube of given dimension. | |
void | makeNone (unsigned int dim) |
Make a singular of given dimension. | |
void | makeFromVertices (unsigned int dim, unsigned int vertices) |
Construct the correct geometry type given the dimension and the number of vertices. | |
Query Methods | |
bool | isVertex () const |
Return true if entity is a vertex. | |
bool | isLine () const |
Return true if entity is a line segment. | |
bool | isTriangle () const |
Return true if entity is a triangle. | |
bool | isQuadrilateral () const |
Return true if entity is a quadrilateral. | |
bool | isTetrahedron () const |
Return true if entity is a tetrahedron. | |
bool | isPyramid () const |
Return true if entity is a pyramid. | |
bool | isPrism () const |
Return true if entity is a prism. | |
bool | isHexahedron () const |
Return true if entity is a hexahedron. | |
bool | isSimplex () const |
Return true if entity is a simplex of any dimension. | |
bool | isCube () const |
Return true if entity is a cube of any dimension. | |
bool | isNone () const |
Return true if entity is a singular of any dimension. | |
unsigned int | dim () const |
Return dimension of the type. | |
unsigned int | id () const |
Return the topology id the type. | |
bool | operator== (const GeometryType &other) const |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal. | |
bool | operator!= (const GeometryType &other) const |
Check for inequality. | |
bool | operator< (const GeometryType &other) const |
less-than operation for use with maps | |
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.
Each entity can be tagged by one of these basic types plus its space dimension.
|
inline |
Default constructor, not initializing anything.
|
inline |
Constructor, using the basic type and the dimension.
|
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.
|
inline |
Return the topology id the type.
|
inline |
Return true if entity is a cube of any dimension.
|
inline |
Return true if entity is a hexahedron.
|
inline |
Return true if entity is a line segment.
|
inline |
Return true if entity is a singular of any dimension.
|
inline |
Return true if entity is a prism.
|
inline |
Return true if entity is a pyramid.
|
inline |
Return true if entity is a quadrilateral.
|
inline |
Return true if entity is a simplex of any dimension.
|
inline |
Return true if entity is a tetrahedron.
|
inline |
Return true if entity is a triangle.
|
inline |
Return true if entity is a vertex.
|
inline |
Make a hypercube of given dimension.
|
inline |
Construct the correct geometry type given the dimension and the number of vertices.
|
inline |
Make a hexahedron.
|
inline |
Make a line segment.
|
inline |
Make a singular of given dimension.
|
inline |
Make a prism.
|
inline |
Make a pyramid.
|
inline |
Make a quadrilateral.
|
inline |
Make a simplex of given dimension.
|
inline |
Make a tetrahedron.
|
inline |
Make a triangle.
|
inline |
Make a vertex.
|
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.