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_ANY_FACE = CMZN_ELEMENT_FACE_TYPE_ANY_FACE, FACE_TYPE_NO_FACE = CMZN_ELEMENT_FACE_TYPE_NO_FACE,
  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, POINT_SAMPLING_MODE_GAUSSIAN_QUADRATURE = CMZN_ELEMENT_POINT_SAMPLING_MODE_GAUSSIAN_QUADRATURE
}
 
enum  QuadratureRule { QUADRATURE_RULE_INVALID = CMZN_ELEMENT_QUADRATURE_RULE_INVALID, QUADRATURE_RULE_GAUSSIAN = CMZN_ELEMENT_QUADRATURE_RULE_GAUSSIAN, QUADRATURE_RULE_MIDPOINT = CMZN_ELEMENT_QUADRATURE_RULE_MIDPOINT }
 
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 

invalid element face type

FACE_TYPE_ALL 

match all elements whether faces of parent elements or not

FACE_TYPE_ANY_FACE 

element on any face of a higher dimension element

FACE_TYPE_NO_FACE 

not a face of a higher dimension element; top-level elements only

FACE_TYPE_XI1_0 

element on face where top-level xi1 = 0

FACE_TYPE_XI1_1 

element on face where top-level xi1 = 1

FACE_TYPE_XI2_0 

element on face where top-level xi2 = 0

FACE_TYPE_XI2_1 

element on face where top-level xi2 = 1

FACE_TYPE_XI3_0 

element on face where top-level xi3 = 0

FACE_TYPE_XI3_1 

element on face 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.

POINT_SAMPLING_MODE_GAUSSIAN_QUADRATURE 

Sample at Gaussian quadrature points for the element. Currently limited to a maximum of 4 points in each element direction. Triangles and tetrahedra have symmetric point arrangements for an equal polynomial degree in each axis.

Quadrature rule for numerically integrating over elements.

Enumerator
QUADRATURE_RULE_INVALID 

Unspecified or invalid quarature rule

QUADRATURE_RULE_GAUSSIAN 

Gaussian quadrature. Gives optimal/exact integration of polynomials of degree up to 2n - 1, when n is the number of Gauss points chosen. Currently limited to a maximum of 4 points in each element direction. Triangles and tetrahedra have symmetric point arrangements for an equal polynomial degree in each axis.

QUADRATURE_RULE_MIDPOINT 

Sample at mid-points of equal-sized cells in element local xi chart, with equal weights. Also called the rectangle rule.

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::merge ( const Elementtemplate elementTemplate)
inline

Modifies the element to use the fields as defined in the element_template. Note that mappings may be optimised or modified in the merge process, often to minimise the number of local nodes in the merged element.

Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
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: