Reference documentation for deal.II version Git bef661081b 2019-09-23 12:55:27 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Types | Public Member Functions | Private Attributes | List of all members
GeometryPrimitive Class Reference

#include <deal.II/base/geometry_info.h>

Public Types

enum  Object { vertex = 0, line = 1, quad = 2, hex = 3 }
 

Public Member Functions

 GeometryPrimitive (const Object object)
 
 GeometryPrimitive (const unsigned int object_dimension)
 
 operator unsigned int () const
 

Private Attributes

Object object
 

Detailed Description

A class that can represent the kinds of objects a triangulation is made up of: vertices, lines, quads and hexes.

The class is rather primitive: it only stores a single integer that represents the dimensionality of the object represented. In other words, this class is useful primarily as a way to pass around an object whose data type explains what it does (unlike just passing around an integer), and for providing symbolic names for these objects such as GeometryPrimitive::vertex instead of an integer zero.

Since the ability to identify such objects with the integral dimension of the object represented, this class provides conversion operators to and from unsigned integers.

Author
Wolfgang Bangerth, 2014

Definition at line 361 of file geometry_info.h.

Member Enumeration Documentation

◆ Object

An enumeration providing symbolic names for the objects that can be represented by this class. The numeric values of these symbolic names equal the geometric dimensionality of the represented objects to make conversion from and to integer variables simpler.

Enumerator
vertex 

A vertex.

line 

A line.

quad 

A quadrilateral.

hex 

A hexahedron.

Definition at line 370 of file geometry_info.h.

Constructor & Destructor Documentation

◆ GeometryPrimitive() [1/2]

GeometryPrimitive::GeometryPrimitive ( const Object  object)

Constructor. Initialize the object with the given argument representing a vertex, line, etc.

◆ GeometryPrimitive() [2/2]

GeometryPrimitive::GeometryPrimitive ( const unsigned int  object_dimension)

Constructor. Initialize the object with an integer that should represent the dimensionality of the geometric object in question. This will usually be a number between zero (a vertex) and three (a hexahedron).

Member Function Documentation

◆ operator unsigned int()

GeometryPrimitive::operator unsigned int ( ) const

Return the integral dimension of the object currently represented, i.e. zero for a vertex, one for a line, etc.

Member Data Documentation

◆ object

Object GeometryPrimitive::object
private

The object currently represented.

Definition at line 413 of file geometry_info.h.


The documentation for this class was generated from the following file: