OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | List of all members
OpenCMISS::Zinc::Element Class Reference

A single finite element from a mesh. More...

#include <element.hpp>

Public Types

enum  ChangeFlag {
  CHANGE_FLAG_NONE = CMZN_ELEMENT_CHANGE_FLAG_NONE, CHANGE_FLAG_ADD = CMZN_ELEMENT_CHANGE_FLAG_ADD, CHANGE_FLAG_REMOVE = CMZN_ELEMENT_CHANGE_FLAG_REMOVE, CHANGE_FLAG_IDENTIFIER = CMZN_ELEMENT_CHANGE_FLAG_IDENTIFIER,
  CHANGE_FLAG_DEFINITION = CMZN_ELEMENT_CHANGE_FLAG_DEFINITION, CHANGE_FLAG_FIELD = CMZN_ELEMENT_CHANGE_FLAG_FIELD
}
 
enum  FaceType {
  FACE_TYPE_INVALID = CMZN_ELEMENT_FACE_TYPE_INVALID, FACE_TYPE_ALL = CMZN_ELEMENT_FACE_TYPE_ALL, FACE_TYPE_XI1_0 = CMZN_ELEMENT_FACE_TYPE_XI1_0, FACE_TYPE_XI1_1 = CMZN_ELEMENT_FACE_TYPE_XI1_1,
  FACE_TYPE_XI2_0 = CMZN_ELEMENT_FACE_TYPE_XI2_0, FACE_TYPE_XI2_1 = CMZN_ELEMENT_FACE_TYPE_XI2_1, FACE_TYPE_XI3_0 = CMZN_ELEMENT_FACE_TYPE_XI3_0, FACE_TYPE_XI3_1 = CMZN_ELEMENT_FACE_TYPE_XI3_1
}
 
enum  ShapeType {
  SHAPE_TYPE_INVALID = CMZN_ELEMENT_SHAPE_TYPE_INVALID, SHAPE_TYPE_LINE = CMZN_ELEMENT_SHAPE_TYPE_LINE, SHAPE_TYPE_SQUARE = CMZN_ELEMENT_SHAPE_TYPE_SQUARE, SHAPE_TYPE_TRIANGLE = CMZN_ELEMENT_SHAPE_TYPE_TRIANGLE,
  SHAPE_TYPE_CUBE = CMZN_ELEMENT_SHAPE_TYPE_CUBE, SHAPE_TYPE_TETRAHEDRON = CMZN_ELEMENT_SHAPE_TYPE_TETRAHEDRON, SHAPE_TYPE_WEDGE12 = CMZN_ELEMENT_SHAPE_TYPE_WEDGE12, SHAPE_TYPE_WEDGE13 = CMZN_ELEMENT_SHAPE_TYPE_WEDGE13,
  SHAPE_TYPE_WEDGE23 = CMZN_ELEMENT_SHAPE_TYPE_WEDGE23
}
 
enum  PointSamplingMode {
  POINT_SAMPLING_MODE_INVALID = CMZN_ELEMENT_POINT_SAMPLING_MODE_INVALID, POINT_SAMPLING_MODE_CELL_CENTRES = CMZN_ELEMENT_POINT_SAMPLING_MODE_CELL_CENTRES, POINT_SAMPLING_MODE_CELL_CORNERS = CMZN_ELEMENT_POINT_SAMPLING_MODE_CELL_CORNERS, POINT_SAMPLING_MODE_CELL_POISSON = CMZN_ELEMENT_POINT_SAMPLING_MODE_CELL_POISSON,
  POINT_SAMPLING_MODE_SET_LOCATION = CMZN_ELEMENT_POINT_SAMPLING_MODE_SET_LOCATION
}
 
typedef int ChangeFlags
 

Public Member Functions

 Element (cmzn_element_id element_id)
 
 Element (const Element &element)
 
bool isValid () const
 
Elementoperator= (const Element &element)
 
cmzn_element_id getId () const
 
int getDimension ()
 
int getIdentifier ()
 
int setIdentifier (int identifier)
 
Mesh getMesh () const
 
enum ShapeType getShapeType ()
 
int merge (const Elementtemplate &elementTemplate)
 

Detailed Description

A single finite element from a mesh.

A single finite element from a mesh. Represents a local coordinate chart of prescribed shape/bounds, over which fields can be defined.

Member Typedef Documentation

Type for passing logical OR of ChangeFlag

Member Enumeration Documentation

Bit flags summarising changes to an element or elements in a mesh.

Enumerator
CHANGE_FLAG_NONE 

element(s) not changed

CHANGE_FLAG_ADD 

element(s) added

CHANGE_FLAG_REMOVE 

element(s) removed

CHANGE_FLAG_IDENTIFIER 

element(s') identifier changed

CHANGE_FLAG_DEFINITION 

element(s') definition other than identifier changed e.g. shape

CHANGE_FLAG_FIELD 

change to field values mapped to element(s)

An enumeration for selecting the faces of elements.

Enumerator
FACE_TYPE_INVALID 

Unspecified element face type

FACE_TYPE_ALL 

include all faces

FACE_TYPE_XI1_0 

only faces where top-level xi1 == 0

FACE_TYPE_XI1_1 

only faces where top-level xi1 == 1

FACE_TYPE_XI2_0 

only faces where top-level xi2 == 0

FACE_TYPE_XI2_1 

only faces where top-level xi2 == 1

FACE_TYPE_XI3_0 

only faces where top-level xi3 == 0

FACE_TYPE_XI3_1 

only faces where top-level xi3 == 1

Mode controlling how points are sampled from elements.

Enumerator
POINT_SAMPLING_MODE_INVALID 

Unspecified point sampling mode

POINT_SAMPLING_MODE_CELL_CENTRES 

Sample points at centres of element or tessellation cells

POINT_SAMPLING_MODE_CELL_CORNERS 

Sample points at corners of element or tessellation cells

POINT_SAMPLING_MODE_CELL_POISSON 

Sample points randomly within each tessellation cell according to a Poisson distribution with expected number given by: sample density field * cell volume, area or length, depending on dimension. The sample density field should be evaluated at the cell centre.

POINT_SAMPLING_MODE_SET_LOCATION 

One point at a specified location in the element chart.

Common element shape enumeration.

Enumerator
SHAPE_TYPE_INVALID 

unspecified shape of known dimension

SHAPE_TYPE_LINE 

1-D: 0 <= xi1 <= 1

SHAPE_TYPE_SQUARE 

2-D: 0 <= xi1,xi2 <= 1

SHAPE_TYPE_TRIANGLE 

3-D: 0 <= xi1,xi2; xi1+xi2 <= 1

SHAPE_TYPE_CUBE 

3-D: 0 <= xi1,xi2,xi3 <= 1

SHAPE_TYPE_TETRAHEDRON 

3-D: 0 <= xi1,xi2,xi3; xi1+xi2+xi3 <= 1

SHAPE_TYPE_WEDGE12 

3-D: 0 <= xi1,xi2; xi1+xi2 <= 1; 0 <= xi3 <= 1

SHAPE_TYPE_WEDGE13 

3-D: 0 <= xi1,xi3; xi1+xi3 <= 1; 0 <= xi2 <= 1

SHAPE_TYPE_WEDGE23 

3-D: 0 <= xi2,xi3; xi2+xi3 <= 1; 0 <= xi1 <= 1

Member Function Documentation

int OpenCMISS::Zinc::Element::getDimension ( )
inline

Returns the number of dimensions of the element's chart.

Returns
The dimension.
cmzn_element_id OpenCMISS::Zinc::Element::getId ( ) const
inline

Return the C handle of the Element object.

Returns
C handle of Element if this objects is valid, 0 otherwise.
int OpenCMISS::Zinc::Element::getIdentifier ( )
inline

Returns the non-negative integer uniquely identifying the element in its mesh.

Returns
The non-negative integer identifier of the element, or a negative value if element is invalid.
Mesh OpenCMISS::Zinc::Element::getMesh ( ) const
inline

Get the mesh which owns this element.

Returns
Handle to the owning mesh, or NULL/invalid handle on failure.
enum ShapeType OpenCMISS::Zinc::Element::getShapeType ( )
inline

Gets the shape type of the element. Note that legacy meshes may return an unknown shape type for certain custom element shapes e.g. polygon shapes. It is intended that future revisions of the API will offer more detailed shape query and modification functions.

Returns
The element's shape type.
bool OpenCMISS::Zinc::Element::isValid ( ) const
inline

Check if this is a valid Element object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Element::setIdentifier ( int  identifier)
inline

Set an integer uniquely identifying the element in its mesh.

Parameters
identifierunique identifier to be set for the element
Returns
OpenCMISS::Zinc::OK if set the identifier successfully, any other value on fail.

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