Dune::GeometryType Class Reference
[GeometryType]

Unique label for each type of entities that can occur in DUNE grids. More...

#include <dune/common/geometrytype.hh>

List of all members.

Public Types

enum  BasicType {
  simplex, cube, pyramid, prism,
  none
}
 

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.
void makeNone (unsigned int dim)
 Make a singular 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.
bool isNone () const
 Return true if entity is a singular 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.

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.


Member Enumeration Documentation

Each entity can be tagged by one of these basic types plus its space dimension.

Enumerator:
simplex 

Simplicial element in any nonnegative dimension.

cube 

Cube element in any nonnegative dimension.

pyramid 

Four sided pyramid in three dimensions.

prism 

Prism element in three dimensions.

none 

Generic element in any nonnegative dimension.


Constructor & Destructor Documentation

Dune::GeometryType::GeometryType (  )  [inline]

Default constructor, not initializing anything.

Dune::GeometryType::GeometryType ( BasicType  basicType,
unsigned int  dim 
) [inline]

Constructor.

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

Member Function Documentation

BasicType Dune::GeometryType::basicType (  )  const [inline]

Return the basic type of the entity.

unsigned int Dune::GeometryType::dim (  )  const [inline]

Return dimension of the entity.

Referenced by operator<(), and operator==().

bool Dune::GeometryType::isCube (  )  const [inline]

Return true if entity is a cube of any dimension.

References cube.

bool Dune::GeometryType::isHexahedron (  )  const [inline]

Return true if entity is a hexahedron.

References cube.

bool Dune::GeometryType::isLine (  )  const [inline]

Return true if entity is a line segment.

bool Dune::GeometryType::isNone (  )  const [inline]

Return true if entity is a singular of any dimension.

References none.

bool Dune::GeometryType::isPrism (  )  const [inline]

Return true if entity is a prism.

References prism.

bool Dune::GeometryType::isPyramid (  )  const [inline]

Return true if entity is a pyramid.

References pyramid.

bool Dune::GeometryType::isQuadrilateral (  )  const [inline]

Return true if entity is a quadrilateral.

References cube.

bool Dune::GeometryType::isSimplex (  )  const [inline]

Return true if entity is a simplex of any dimension.

References simplex.

bool Dune::GeometryType::isTetrahedron (  )  const [inline]

Return true if entity is a tetrahedron.

References simplex.

bool Dune::GeometryType::isTriangle (  )  const [inline]

Return true if entity is a triangle.

References simplex.

bool Dune::GeometryType::isVertex (  )  const [inline]

Return true if entity is a vertex.

void Dune::GeometryType::makeCube ( unsigned int  dim  )  [inline]

Make a hypercube of given dimension.

References cube.

void Dune::GeometryType::makeHexahedron (  )  [inline]

Make a hexahedron.

References cube.

void Dune::GeometryType::makeLine (  )  [inline]

Make a line segment.

void Dune::GeometryType::makeNone ( unsigned int  dim  )  [inline]

Make a singular of given dimension.

References none.

void Dune::GeometryType::makePrism (  )  [inline]

Make a prism.

References prism.

void Dune::GeometryType::makePyramid (  )  [inline]

Make a pyramid.

References pyramid.

void Dune::GeometryType::makeQuadrilateral (  )  [inline]

Make a quadrilateral.

References cube.

void Dune::GeometryType::makeSimplex ( unsigned int  dim  )  [inline]

Make a simplex of given dimension.

References simplex.

void Dune::GeometryType::makeTetrahedron (  )  [inline]

Make a tetrahedron.

References simplex.

void Dune::GeometryType::makeTriangle (  )  [inline]

Make a triangle.

References simplex.

void Dune::GeometryType::makeVertex (  )  [inline]

Make a vertex.

bool Dune::GeometryType::operator!= ( const GeometryType other  )  const [inline]

Check for inequality.

bool Dune::GeometryType::operator< ( const GeometryType other  )  const [inline]

lesser operation for use with maps

References dim().

bool Dune::GeometryType::operator== ( const GeometryType other  )  const [inline]

Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.

References dim().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const GeometryType a 
) [friend]

Prints the type to an output stream.


The documentation for this class was generated from the following file:
Generated on Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3