24#ifndef _GEMA_NODE_SET_H_
25#define _GEMA_NODE_SET_H_
52 virtual int node(
int i)
const = 0;
63 Q_UNUSED(numNodes); Q_UNUSED(nodeList);
80 virtual QString id()
const {
return "mesh wrapper"; }
86 virtual int numNodes()
const {
return _mesh->numNodes(); }
89 virtual int node(
int i)
const {
return i; }
106 _mesh = subset->
mesh();
110 _nodeList =
new int[_numNodes];
111 for (
int i = 0; i < _numNodes; i++)
112 _nodeList[i] = subset->
node(i);
117 virtual QString id()
const {
return "generic node set"; }
126 virtual int node(
int i)
const { assert(i >= 0 && i < _numNodes);
return _nodeList[i]; }
129 virtual size_t usedMemory()
const {
return _numNodes*
sizeof(int); }
Interface for helping managing mesh cell groups and returning the elements in their union.
Definition gmCellGroupSet.h:35
virtual GmCellMesh * mesh() const =0
Returns the mesh owning the cell groups.
virtual int node(int setIndex) const =0
Given an index in the range [0..numNodes()-1], returns the respective mesh node index.
virtual int numNodes() const =0
Returns the number of geometric nodes shared by the group elements.
Definition gmNodeSet.h:100
virtual GmMesh * mesh() const
Returns the mesh that this set is tied to.
Definition gmNodeSet.h:120
int _numNodes
The number of nodes in the subset.
Definition gmNodeSet.h:135
GmMesh * _mesh
The wrapped mesh.
Definition gmNodeSet.h:134
GmGenericNodeSet(const GmCellGroupSet *subset)
Constructor from cell group set.
Definition gmNodeSet.h:103
virtual size_t usedMemory() const
Returns an estimative of the memory used by the node set in bytes.
Definition gmNodeSet.h:129
virtual int node(int i) const
Returns the node id of the i'th entry stored in this set.
Definition gmNodeSet.h:126
virtual int numNodes() const
Returns the number of nodes stored in this set.
Definition gmNodeSet.h:123
int * _nodeList
The list of node ids in the subset.
Definition gmNodeSet.h:136
virtual QString id() const
Returns the set name.
Definition gmNodeSet.h:117
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
A node set wrapper over a common mesh. Constant (no support for setNodeData())
Definition gmNodeSet.h:74
virtual GmMesh * mesh() const
Returns the mesh that this set is tied to.
Definition gmNodeSet.h:83
virtual QString id() const
Returns the set name.
Definition gmNodeSet.h:80
virtual int node(int i) const
Returns the node id of the i'th entry stored in this set.
Definition gmNodeSet.h:89
virtual int numNodes() const
Returns the number of nodes stored in this set.
Definition gmNodeSet.h:86
GmMesh * _mesh
The wrapped mesh.
Definition gmNodeSet.h:95
GmMeshNodeSet(GmMesh *mesh)
Simple constructor.
Definition gmNodeSet.h:77
virtual size_t usedMemory() const
Returns an estimative of the memory used by the node set in bytes.
Definition gmNodeSet.h:92
This class stores a set of nodes belonging to a mesh. The nodes can belong to the mesh boundary but t...
Definition gmNodeSet.h:34
virtual QString id() const =0
Returns the set name.
virtual size_t usedMemory() const =0
Returns an estimative of the memory used by the node set in bytes.
virtual int node(int i) const =0
Returns the node id of the i'th entry stored in this set.
virtual int numNodes() const =0
Returns the number of nodes stored in this set.
virtual bool setNodeData(int numNodes, int *nodeList)
Updates the node list in the set object.
Definition gmNodeSet.h:61
virtual ~GmNodeSet()
Virtual destructor.
Definition gmNodeSet.h:37
virtual GmMesh * mesh() const =0
Returns the mesh that this set is tied to.
Declaration of the GmCellGroupSet class family.
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of the GmMesh interface class.