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

A description of element shape and field definitions. More...

#include <element.hpp>

Public Member Functions

 Elementtemplate (cmzn_elementtemplate_id element_template_id)
 
 Elementtemplate (const Elementtemplate &elementTemplate)
 
Elementtemplateoperator= (const Elementtemplate &elementTemplate)
 
bool isValid () const
 
cmzn_elementtemplate_id getId () const
 
enum Element::ShapeType getElementShapeType ()
 
int setElementShapeType (enum Element::ShapeType shapeType)
 
int getNumberOfNodes ()
 
int setNumberOfNodes (int numberOfNodes)
 
int defineFieldSimpleNodal (const Field &field, int componentNumber, const Elementbasis &basis, int nodeIndexesCount, const int *nodeIndexesIn)
 
Node getNode (int localNodeIndex)
 
int setNode (int localNodeIndex, const Node &node)
 

Detailed Description

A description of element shape and field definitions.

A description of element shape and field definitions (incl. basis, parameter mappings), used as a template for creating new elements in a mesh, or merging into an element to define additional fields on it.

Member Function Documentation

int OpenCMISS::Zinc::Elementtemplate::defineFieldSimpleNodal ( const Field field,
int  componentNumber,
const Elementbasis basis,
int  nodeIndexesCount,
const int *  nodeIndexesIn 
)
inline

Defines a nodally interpolated element field or field component in the element_template. Only Lagrange, simplex and constant basis function types may be used with this function, i.e. where only a simple node value is mapped. Shape must be set before calling this function.

Parameters
fieldThe field to define. Must be finite_element type.
componentNumberThe component to define from 1 to the number of field components, or -1 to define all components with identical basis and nodal mappings.
basisThe element basis to use for all field components.
nodeIndexesCountThe number of nodes indexed by the basis, equals the size of the local_node_indexes array.
nodeIndexesInArray containing the local node indexes of the nodes from which element field parameters are mapped, which range from 1 to the number of nodes set for the element_template. Local nodes are ordered by lowest xi coordinate varying fastest, e.g. for biquadratic Lagrange: xi = (0,0), (0.5,0), (1,0), (0,0.5), (0.5,0.5) ...
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
cmzn_elementtemplate_id OpenCMISS::Zinc::Elementtemplate::getId ( ) const
inline

Return the C handle of the Elementtemplate object.

Returns
C handle of Elementtemplate if this objects is valid, 0 otherwise.
Node OpenCMISS::Zinc::Elementtemplate::getNode ( int  localNodeIndex)
inline

Gets the global node at a given local node index in the element_template. May only be called after the definition of element fields are complete and valid.

Parameters
localNodeIndexThe index from 1 to number of nodes in template.
Returns
Handle to global node, or NULL/invalid handle if none or failed.
int OpenCMISS::Zinc::Elementtemplate::getNumberOfNodes ( )
inline

Gets the number of local nodes this element_template can address.

Returns
The number of local nodes, or 0 on error.
bool OpenCMISS::Zinc::Elementtemplate::isValid ( ) const
inline

Check if this is a valid Elementtemplate object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Elementtemplate::setNode ( int  localNodeIndex,
const Node node 
)
inline

Sets the global node at a given local node index in the element_template. May only be called after the definition of element fields are complete and valid. Nodes are reset if new element fields are defined on the template.

Parameters
localNodeIndexThe index from 1 to number of nodes in template.
nodeThe global node to set at that index.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Elementtemplate::setNumberOfNodes ( int  numberOfNodes)
inline

Sets the number of local nodes this element_template can address. This must be done before defining fields that index them. This number cannot be reduced.

Parameters
numberOfNodesThe number of nodes.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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