Dune::GeometryType Class Reference
[GeometryType]
#include <geometrytype.hh>
Detailed Description
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.
Public Types | |
enum | BasicType { simplex, cube, pyramid, prism } |
Each entity can be tagged by one of these basic types plus its space dimension. More... | |
Public Member Functions | |
GeometryType () | |
Default constructor, not initializing anything. | |
GeometryType (BasicType basicType, unsigned int dim) | |
Constructor. | |
GeometryType (unsigned int dim) | |
Constructor for vertices and segments. | |
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 |
lesser operation for use with maps | |
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. | |
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. | |
unsigned int | dim () const |
Return dimension of the entity. | |
BasicType | basicType () const |
Return the basic type of the entity. | |
Friends | |
std::ostream & | operator<< (std::ostream &s, const GeometryType &a) |
Prints the type to an output stream. |
Member Enumeration Documentation
Constructor & Destructor Documentation
Dune::GeometryType::GeometryType | ( | unsigned int | dim | ) | [inline, explicit] |
Constructor for vertices and segments.
- Todo:
- Add check for dim={0,1} when compiled with a suitable flag
The documentation for this class was generated from the following file: