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

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

#include <node.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

Defines 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

Defines 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

Gets 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 maximum number of versions in any component.
valueLabelThe label of the node value/derivative to query.
Returns
Number of versions value label in component of field, or maximum in any component if component_number is -1. Valid return value can be 0. Returns 0 if field not defined 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 defined at node, or list of fields marked for undefining.

Parameters
fieldThe field to remove.
Returns
Status OpenCMISS::Zinc::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. Limitation: Zinc is currently limited to having either 0 versions for a derivative label (but at least 1 for the VALUE), or the same positive number of versions for all value/derivative perameters. Callers should assume this will be fixed in a future release, and therefore set the number of versions independently for each value/derivative. For now the largest number of versions set for any value/derivative will be the amount of storage set aside per-field-component, and the field will need to be undefined then re-defined to reduce the number of versions.

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 value to define. Can be 0 to request no parameters be stored, however the storage allocated may be greater.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on 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
Status OpenCMISS::Zinc::OK on success, any other value on failure.

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