9 #ifndef CMZN_NODESET_HPP__ 10 #define CMZN_NODESET_HPP__ 12 #include "opencmiss/zinc/nodeset.h" 13 #include "opencmiss/zinc/field.hpp" 14 #include "opencmiss/zinc/node.hpp" 15 #include "opencmiss/zinc/nodetemplate.hpp" 41 explicit Nodeset(cmzn_nodeset_id nodeset_id) : id(nodeset_id)
45 id(cmzn_nodeset_access(nodeset.id))
50 cmzn_nodeset_id temp_id = cmzn_nodeset_access(nodeset.id);
53 cmzn_nodeset_destroy(&
id);
63 cmzn_nodeset_destroy(&
id);
104 return cmzn_nodeset_contains_node(
id, node.
getId());
116 return Nodetemplate(cmzn_nodeset_create_nodetemplate(
id));
131 return Node(cmzn_nodeset_create_node(
id, identifier, nodeTemplate.
getId()));
146 return Nodeiterator(cmzn_nodeset_create_nodeiterator(
id));
160 return cmzn_nodeset_destroy_all_nodes(
id);
175 return cmzn_nodeset_destroy_node(
id, node.
getId());
194 return cmzn_nodeset_destroy_nodes_conditional(
id, conditionalField.
getId());
205 return Node(cmzn_nodeset_find_node_by_identifier(
id, identifier));
223 return Nodeset(cmzn_nodeset_get_master_nodeset(
id));
235 return cmzn_nodeset_get_name(
id);
245 return cmzn_nodeset_get_size(
id);
252 return cmzn_nodeset_match(a.
getId(), b.
getId());
257 return Nodeset(cmzn_node_get_nodeset(
id));
271 explicit NodesetGroup(cmzn_nodeset_group_id nodeset_id) :
Nodeset(reinterpret_cast<cmzn_nodeset_id>(nodeset_id))
284 return (cmzn_nodeset_group_id)(id);
297 return cmzn_nodeset_group_add_node(
298 reinterpret_cast<cmzn_nodeset_group_id>(
id), node.
getId());
311 return cmzn_nodeset_group_add_nodes_conditional(
312 reinterpret_cast<cmzn_nodeset_group_id>(
id), conditionalField.
getId());
322 return cmzn_nodeset_group_remove_all_nodes(
323 reinterpret_cast<cmzn_nodeset_group_id>(
id));
336 return cmzn_nodeset_group_remove_node(reinterpret_cast<cmzn_nodeset_group_id>(
id),
351 return cmzn_nodeset_group_remove_nodes_conditional(
352 reinterpret_cast<cmzn_nodeset_group_id>(
id), conditionalField.
getId());
371 cmzn_nodesetchanges_id id;
379 explicit Nodesetchanges(cmzn_nodesetchanges_id nodesetchanges_id) :
380 id(nodesetchanges_id)
384 id(cmzn_nodesetchanges_access(nodesetchanges.id))
389 cmzn_nodesetchanges_id temp_id = cmzn_nodesetchanges_access(nodesetchanges.id);
391 cmzn_nodesetchanges_destroy(&
id);
399 cmzn_nodesetchanges_destroy(&
id);
420 return cmzn_nodesetchanges_get_node_change_flags(
id, node.
getId());
431 return cmzn_nodesetchanges_get_number_of_changes(
id);
441 return cmzn_nodesetchanges_get_summary_node_change_flags(
id);
448 #endif // CMZN_NODESET_HPP__ An iterator for looping through all the nodes in a nodeset.
Definition: node.hpp:187
bool isValid() const
Definition: nodeset.hpp:407
Object describing changes to a nodeset in a fieldmoduleevent.
Definition: nodeset.hpp:367
bool isValid() const
Definition: nodeset.hpp:72
int addNode(const Node &node)
Definition: nodeset.hpp:295
cmzn_nodetemplate_id getId() const
Definition: nodetemplate.hpp:83
A description of field parameters to define at a node.
Definition: nodetemplate.hpp:29
int removeNode(const Node &node)
Definition: nodeset.hpp:334
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
int removeNodesConditional(const Field &conditionalField)
Definition: nodeset.hpp:349
Node::ChangeFlags getNodeChangeFlags(const Node &node)
Definition: nodeset.hpp:418
A subset of a master nodeset.
Definition: nodeset.hpp:265
cmzn_nodeset_id getId() const
Definition: nodeset.hpp:82
int destroyAllNodes()
Definition: nodeset.hpp:158
cmzn_nodeset_group_id getId() const
Definition: nodeset.hpp:282
NodesetGroup castGroup()
Definition: nodeset.hpp:357
Node::ChangeFlags getSummaryNodeChangeFlags()
Definition: nodeset.hpp:439
Node findNodeByIdentifier(int identifier)
Definition: nodeset.hpp:203
Nodetemplate createNodetemplate()
Definition: nodeset.hpp:114
cmzn_field_id getId() const
Definition: field.hpp:103
Nodeiterator createNodeiterator()
Definition: nodeset.hpp:144
int destroyNode(const Node &node)
Definition: nodeset.hpp:173
Nodeset getMasterNodeset()
Definition: nodeset.hpp:221
Nodeset getNodeset() const
Definition: nodeset.hpp:255
int getSize()
Definition: nodeset.hpp:243
char * getName()
Definition: nodeset.hpp:233
cmzn_node_id getId() const
Definition: node.hpp:136
int getNumberOfChanges()
Definition: nodeset.hpp:429
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:135
Node createNode(int identifier, const Nodetemplate &nodeTemplate)
Definition: nodeset.hpp:129
int ChangeFlags
Definition: node.hpp:75
bool containsNode(const Node &node)
Definition: nodeset.hpp:102
The OpenCMISS namespace.
Definition: context.hpp:20
Point object used to represent finite element nodes.
Definition: node.hpp:34
int removeAllNodes()
Definition: nodeset.hpp:320
int destroyNodesConditional(const Field &conditionalField)
Definition: nodeset.hpp:192
int addNodesConditional(const Field &conditionalField)
Definition: nodeset.hpp:309
A set of nodes or points.
Definition: nodeset.hpp:29
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1796