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:

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 ( )

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.

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

Returns whether the node is from the nodeset.

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

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

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.
Handle to new node, or NULL/invalid handle on failure.
Nodeiterator OpenCMISS::Zinc::Nodeset::createNodeiterator ( )

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.

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

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.

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

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.

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)

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.

nodeThe node to destroy.
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)

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.

conditionalFieldField which if non-zero at any node indicates it is to be destroyed.
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)

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

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

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

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

Return the C handle of the Nodeset object.

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

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

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

Return the name of the nodeset.

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

Return the number of nodes in the nodeset.

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

Check if this is a valid Nodeset object.

Status True if object is valid, false otherwise.

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