OpenCMISS-Zinc C++ API Documentation
Public Member Functions | List of all members
OpenCMISS::Zinc::Nodetemplate Class Reference

A description of field parameters to define at a node. More...

#include <nodetemplate.hpp>

Public Member Functions

 Nodetemplate (cmzn_nodetemplate_id node_template_id)
 
 Nodetemplate (const Nodetemplate &nodeTemplate)
 
Nodetemplateoperator= (const Nodetemplate &nodeTemplate)
 
bool isValid () const
 
cmzn_nodetemplate_id getId () const
 
int defineField (const Field &field)
 
int defineFieldFromNode (const Field &field, const Node &node)
 
Timesequence getTimesequence (const Field &field)
 
int setTimesequence (const Field &field, const Timesequence &timesequence)
 
int getValueNumberOfVersions (const Field &field, int componentNumber, Node::ValueLabel valueLabel)
 
int setValueNumberOfVersions (const Field &field, int componentNumber, Node::ValueLabel valueLabel, int numberOfVersions)
 
int removeField (const Field &field)
 
int undefineField (const Field &field)
 

Detailed Description

A description of field parameters to define at a node.

A description of field parameters to define at a node (incl. value/derivative types, versions), used as a template for creating new nodes in a nodeset, or merging into a node to define or undefine fields on it.

Member Function Documentation

int OpenCMISS::Zinc::Nodetemplate::defineField ( const Field field)
inline

Define the field on the node_template with just a single node value per field component with no time variation. Replaces any existing definition (or undefine state) of the field in the template. Per-component derivatives and multiple versions can be added subsequently.

Parameters
fieldThe field to define. May be finite_element, stored_string or stored_mesh_location type only.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Nodetemplate::defineFieldFromNode ( const Field field,
const Node node 
)
inline

Define the field on the node template based on its definition in the supplied node. Replaces any existing definition (or undefine state) in the template. If the field is not defined on the node it is removed as a defined/undefined field in the template.

Parameters
fieldThe field to define. May be finite_element, stored_string or stored_mesh_location type only.
nodeThe node to obtain the field definition from.
Returns
Status OpenCMISS::Zinc::OK on success, CMZN_ERROR_NOT_FOUND if field was not defined on node, and any other value on failure.
cmzn_nodetemplate_id OpenCMISS::Zinc::Nodetemplate::getId ( ) const
inline

Return the C handle of the Nodetemplate object.

Returns
C handle of Nodetemplate if this objects is valid, 0 otherwise.
Timesequence OpenCMISS::Zinc::Nodetemplate::getTimesequence ( const Field field)
inline

Returns the time sequence defined for field in node_template, if any.

Parameters
fieldThe field to get time sequence for. May be finite_element type only.
Returns
Handle to time sequence, or NULL/invalid handle if none set or failed.
int OpenCMISS::Zinc::Nodetemplate::getValueNumberOfVersions ( const Field field,
int  componentNumber,
Node::ValueLabel  valueLabel 
)
inline

Get the number of value/derivative parameters under a given node value label for a field component in the node template.

Parameters
fieldThe field to query value/derivative parameters for. Must be finite_element type only.
componentNumberThe component from 1 to the number of field components, or -1 to get the number of versions if consistent for all components.
valueLabelThe label of the node value/derivative to query.
Returns
Number of versions for value label in component of field, or all components -1 supplied and components are consistent. Valid return value can be 0 if there are no versions for the supplied node value label. Returns -1 if field not defined, has inconsistent components if all components queried, or invalid arguments are supplied.
bool OpenCMISS::Zinc::Nodetemplate::isValid ( ) const
inline

Check if this is a valid Nodetemplate object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Nodetemplate::removeField ( const Field field)
inline

Removes field from list of fields to define or undefine in node template.

Parameters
fieldThe field to remove.
Returns
Result OK on success, any other value on failure.
int OpenCMISS::Zinc::Nodetemplate::setTimesequence ( const Field field,
const Timesequence timesequence 
)
inline

Defines variation of all nodal values/derivatives * versions with the supplied time sequence for all components of the field in the node template. Hence there will be as many of each parameter as times in the time sequence.

Parameters
fieldThe field to define versions for. May be finite_element type only.
timesequenceTime sequence object defining the number of times for which field parameters are stored, and the times they are for (increasing).
node_field_creatorOptionally defines different versions and/or derivative types. If it is NULL then a single nodal value for each component will be defined.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Nodetemplate::setValueNumberOfVersions ( const Field field,
int  componentNumber,
Node::ValueLabel  valueLabel,
int  numberOfVersions 
)
inline

Sets the number of value/derivative parameters under a given node value label for a field component in the node template. Must have first called cmzn_nodetemplate_define_field() for field. Note that a field is initially defined with a single VALUE label version, which may be changed using this function, including passing 0 versions to remove storage for the VALUE.

Parameters
fieldThe field to define value/derivative parameters for. Must be finite_element type only.
componentNumberThe component from 1 to the number of field components, or -1 to define identically for all components.
valueLabelThe label of the node value/derivative to define.
numberOfVersionsThe number of versions of the derivative/value label to store. Can be 0 to request no parameters be stored.
Returns
Result OK on success, ERROR_NOT_FOUND if field is not defined, or any other error result for other reasons of failure.
int OpenCMISS::Zinc::Nodetemplate::undefineField ( const Field field)
inline

Marks field to be undefined when next merged into an existing node. Has no effect on newly created nodes. Removes field from define list if present.

Parameters
fieldThe field to undefine. May be finite_element, stored_string or stored_mesh_location type only.
Returns
Result OK on success, any other value on failure.

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