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

A set of nodes or points. More...

#include <nodeset.hpp>

Inheritance diagram for OpenCMISS::Zinc::Nodeset:
OpenCMISS::Zinc::NodesetGroup

Public Member Functions

 Nodeset (cmzn_nodeset_id nodeset_id)
 
 Nodeset (const Nodeset &nodeset)
 
Nodesetoperator= (const Nodeset &nodeset)
 
bool isValid () const
 
cmzn_nodeset_id getId () const
 
NodesetGroup castGroup ()
 
bool containsNode (const Node &node)
 
Nodetemplate createNodetemplate ()
 
Node createNode (int identifier, const Nodetemplate &nodeTemplate)
 
Nodeiterator createNodeiterator ()
 
int destroyAllNodes ()
 
int destroyNode (const Node &node)
 
int destroyNodesConditional (const Field &conditionalField)
 
Node findNodeByIdentifier (int identifier)
 
Fieldmodule getFieldmodule () const
 
Nodeset getMasterNodeset ()
 
char * getName ()
 
int getSize ()
 

Protected Attributes

cmzn_nodeset_id id
 

Detailed Description

A set of nodes or points.

A set of nodes or points, equivalent to a zero-dimensional mesh.

Member Function Documentation

NodesetGroup OpenCMISS::Zinc::Nodeset::castGroup ( )
inline

If the nodeset is a nodeset group i.e. subset of nodes from a master nodeset, get the nodeset group specific interface for add/remove functions.

Parameters
fieldThe nodeset to be cast.
Returns
Handle to derived nodeset group, or NULL/invalid handle if wrong type or failed.
bool OpenCMISS::Zinc::Nodeset::containsNode ( const Node node)
inline

Returns whether the node is from the nodeset.

Parameters
nodeThe node to query about.
Returns
Boolean true if node is in the nodeset, otherwise false.
Node OpenCMISS::Zinc::Nodeset::createNode ( int  identifier,
const Nodetemplate nodeTemplate 
)
inline

Create a new node in this nodeset with fields defined as in the node_template. Returns handle to new node.

Parameters
identifierNon-negative integer identifier of new node, or -1 to automatically generate, starting from 1. Fails if supplied identifier already used by an existing node.
nodeTemplateTemplate for defining node fields.
Returns
Handle to new node, or NULL/invalid handle on failure.
Nodeiterator OpenCMISS::Zinc::Nodeset::createNodeiterator ( )
inline

Create a node iterator object for iterating through the nodes in the nodeset which are ordered from lowest to highest identifier. The iterator initially points at the position before the first node, so the first call to cmzn_nodeiterator_next() returns the first node and advances the iterator. Iterator becomes invalid if nodeset is modified or any of its nodes are given new identifiers.

Returns
Handle to new node iterator, or NULL/invalid handle on failure.
Nodetemplate OpenCMISS::Zinc::Nodeset::createNodetemplate ( )
inline

Create a blank template from which new nodes can be created in this nodeset. Used to describe how finite element fields are defined. Also used for defining new fields on existing nodes.

Returns
Handle to new nodetemplate, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Nodeset::destroyAllNodes ( )
inline

Destroy all nodes in nodeset, also removing them from any related groups. Any nodes in use by elements are prevented from being destroyed. All handles to the destroyed nodes become invalid.

Returns
Result OK if all nodes destroyed, ERROR_IN_USE if partial success with some nodes not destroyed due to being in use by elements, or any other error if more serious failure.
int OpenCMISS::Zinc::Nodeset::destroyNode ( const Node node)
inline

Destroy the node if it is in the nodeset and not in use by elements. Removes node from any related groups it is in. All handles to the destroyed node become invalid.

Parameters
nodeThe node to destroy.
Returns
Result OK if node destroyed, ERROR_IN_USE if it could not be destroyed due to being in use by elements, or any other error if more serious failure.
int OpenCMISS::Zinc::Nodeset::destroyNodesConditional ( const Field conditionalField)
inline

Destroy all nodes in the nodeset for which the conditional field is true i.e. non-zero valued. These nodes are removed from any related groups they are in. Nodes are only removed if not in use by elements in region. All handles to destroyed nodes become invalid. Note that group and node_group fields are valid conditional fields.

Parameters
conditionalFieldField which if non-zero at any node indicates it is to be destroyed.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Result OK if all nodes passing condition destroyed, ERROR_IN_USE if partial success with some nodes not destroyed due to being in use by elements, or any other error if more serious failure.
Node OpenCMISS::Zinc::Nodeset::findNodeByIdentifier ( int  identifier)
inline

Return a handle to the node in the nodeset with this identifier.

Parameters
identifierNon-negative integer identifier of node.
Returns
Handle to node, or NULL/invalid handle if not found or failed.
Fieldmodule OpenCMISS::Zinc::Nodeset::getFieldmodule ( ) const
inline

Returns handle to field module for region this nodeset belongs to.

Returns
Handle to field module, or NULL/invalid handle on failure.
cmzn_nodeset_id OpenCMISS::Zinc::Nodeset::getId ( ) const
inline

Return the C handle of the Nodeset object.

Returns
C handle of Nodeset if this objects is valid, 0 otherwise.
Nodeset OpenCMISS::Zinc::Nodeset::getMasterNodeset ( )
inline

Get the master nodeset which owns the nodes for this nodeset. Can be the same as the supplied nodeset if it is a master.

Returns
Handle to master nodeset, or NULL/invalid handle on failure.
char* OpenCMISS::Zinc::Nodeset::getName ( )
inline

Return the name of the nodeset.

See also
Void::cmznDeallocate
Returns
On success: allocated string containing nodeset name. Up to caller to free using Void::cmznDeallocate().
int OpenCMISS::Zinc::Nodeset::getSize ( )
inline

Return the number of nodes in the nodeset.

Returns
Number of nodes in nodeset.
bool OpenCMISS::Zinc::Nodeset::isValid ( ) const
inline

Check if this is a valid Nodeset object.

Returns
Status True if object is valid, false otherwise.

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