OpenCMISS-Zinc C++ API Documentation
|
A finite element mesh consisting of a set of elements of fixed dimension. More...
#include <mesh.hpp>
Public Member Functions | |
Mesh (cmzn_mesh_id mesh_id) | |
Mesh (const Mesh &mesh) | |
bool | isValid () const |
Mesh & | operator= (const Mesh &mesh) |
cmzn_mesh_id | getId () const |
MeshGroup | castGroup () |
bool | containsElement (const Element &element) |
Elementfieldtemplate | createElementfieldtemplate (const Elementbasis &basis) |
Elementtemplate | createElementtemplate () |
Element | createElement (int identifier, const Elementtemplate &elementTemplate) |
Elementiterator | createElementiterator () |
int | defineElement (int identifier, const Elementtemplate &elementTemplate) |
int | destroyAllElements () |
int | destroyElement (const Element &element) |
int | destroyElementsConditional (const Field &conditionalField) |
Element | findElementByIdentifier (int identifier) |
Differentialoperator | getChartDifferentialoperator (int order, int term) |
int | getDimension () |
Fieldmodule | getFieldmodule () const |
Mesh | getMasterMesh () |
char * | getName () |
int | getSize () |
Protected Attributes | |
cmzn_mesh_id | id |
A finite element mesh consisting of a set of elements of fixed dimension.
A finite element mesh consisting of a set of elements of fixed dimension. Note that Zinc elements are not iso-parametric, meaning each field must be individually defined on them, specifying the basis and parameter mapping.
|
inline |
If the mesh is a mesh group i.e. subset of elements from a master mesh, get the mesh group specific interface for add/remove functions.
field | The mesh to be cast. |
|
inline |
Returns whether the element is from the mesh.
element | The element to query about. |
|
inline |
Create a new element in this mesh with shape and fields described by the element_template. Returns handle to new element.
identifier | Non-negative integer identifier of new element, or -1 to automatically generate, starting from 1. Fails if supplied identifier already used by an existing element. |
elementTemplate | Template describing element shape and fields to define or undefine. Must be valid, with a valid shape. |
|
inline |
Create an element field template to describe parameter mapping and interpolation of a scalar field / field component over elements of the mesh. The new template defaults to NODE parameter mapping mode, with the standard number of nodes for the element basis. For Lagrange, simplex and constant basis function types there are as many nodes as basis functions and the single parameter per node has VALUE label. For Hermite bases with multiple functions per node, default parameters are expected in numerical order of the node value label e.g. for bicubic Hermite the first four functions are for the first node and expected in order: VALUE D_DS1 D_DS2 D2_DS1DS2. By default, versions are initialised to 1, and no scaling is used. In all cases local nodes cycle fastest in lowest element xi direction.
basis | The element basis which will be used for interpolation, which must have the same dimension as the mesh. |
|
inline |
Create an element iterator object for iterating through the elements in the mesh which are ordered from lowest to highest identifier. The iterator initially points at the position before the first element, so the first call to the element iterator next method returns the first element and advances the iterator. Iterator becomes invalid if mesh is modified or any of its elements are given new identifiers.
|
inline |
Create a blank template from which new elements can be created in this mesh. Also used for defining new fields over elements. The new element template does not have a valid shape, which allows adding fields to existing elements without changing shape, however a valid shape must be set to create new elements with this element template.
|
inline |
Create a new element in this mesh with shape and fields described by the element_template.
identifier | Non-negative integer identifier of new element, or -1 to automatically generate, starting from 1. Fails if supplied identifier already used by an existing element. |
elementTemplate | Template describing element shape and fields to define or undefine. Must be valid, with a valid shape. |
|
inline |
Destroy all elements in mesh, also removing them from any related groups. All handles to the destroyed element become invalid.
|
inline |
Destroy the element if it is in the mesh. Removes element from any related groups it is in. All handles to the destroyed element become invalid.
element | The element to destroy. |
|
inline |
Destroy all elements in the mesh for which the conditional field is true i.e. non-zero valued in element. These elements are removed from any related groups they are in. All handles to removed elements become invalid. Results are undefined if conditional field is not constant over element. Note that group and element_group fields are valid conditional fields.
conditionalField | Field which if non-zero in the element indicates it is to be destroyed. |
|
inline |
Return a handle to the element in the mesh with this identifier.
identifier | Non-negative integer identifier of element. |
|
inline |
Returns the differential operator giving a field derivative of the given order with respect to the mesh's chart. The term identifies which of the possible differential operator terms are available for the order and dimension of the mesh.
order | The order of the derivative. Currently must be 1. |
term | Which of the (dimensions)^order differential operators is required, starting at 1. For order 1, corresponds to a chart axis. |
|
inline |
Returns the number of dimensions of the mesh.
|
inline |
Returns handle to field module for region this mesh belongs to.
|
inline |
|
inline |
Get the master mesh which owns the elements for this mesh. Can be the same as the supplied mesh if it is a master.
|
inline |
Return the name of the mesh.
|
inline |
Return the number of elements in the mesh.
|
inline |
Check if this is a valid Mesh object.