![]() |
GemaCoreLib
The GeMA Core library
|
Cell group set consisting of a set of disjoint mesh cell groups. More...
#include <gmCellGroupSet.h>
Public Member Functions | |
GmCellDisjointGroupSet (GmCellMesh *mesh, const QList< int > &groups) | |
Constructor. | |
virtual int | numCells () const |
Returns the number of unique elements in the cell group set. | |
virtual GmCell * | cell (int setIndex) const |
Given an index in the range [0..numCells()-1], returns the respective cell. | |
virtual bool | ordered () const |
Returns true if the the set returned by calls to cell(0) through cell(numCells()-1) is ordered by cell id. | |
virtual void | clear () |
Clear the group set in response to a mesh clear() opeartion. It will not clear the list of cellGroups. | |
![]() | |
virtual | ~GmBaseCellGroupSet () |
Destructor. | |
virtual int | numNodes () const |
Returns the number of nodes shared by the group elements. | |
virtual int | node (int setIndex) const |
Given an index in the range [0..numNodes()-1], returns the respective mesh node index. | |
virtual const QList< int > & | cellGroups () const |
Returns a list with the cell groups belonging to this group set. Values are the group index in the mesh, ordered by index. | |
virtual GmCellMesh * | mesh () const |
Returns the mesh owning the cell groups. | |
![]() | |
QStringList | cellGroupNames () const |
Returns the result of cellGroups() converted to group names. | |
Private Attributes | |
QMap< int, int > | _groupMap |
A map associating the first cell index in a group with the group number. | |
Additional Inherited Members | |
![]() | |
static bool | cellGroupIds (const GmCellMesh *mesh, const QStringList &groupNames, QList< int > &idList, QString &err) |
Given a set of cell group names, creates a set of group ids, filling idList. More... | |
![]() | |
typedef QPair< int, int * > | NodeData |
Type for storing node data information: Number of nodes + vector pointer. | |
![]() | |
GmBaseCellGroupSet (GmCellMesh *mesh, const QList< int > &groups) | |
Base group set constructor. Stores the mesh and an ordered version of the group list. | |
NodeData * | buildNodeList () const |
Builds the list with nodes used by this element groups. Does not changes the internal state. | |
NodeData * | nodeData () const |
Auxiliar function that uses the Double Checked Locking Pattern (DCLP) to grab. More... | |
![]() | |
GmCellMesh * | _mesh |
The associated mesh. | |
QList< int > | _groupList |
The list of mesh cell groups included in this set. | |
QAtomicPointer< NodeData > | _nodeData |
Atomic pointer to the node data. Contains the number of nodes shared by the group cells and a vector with node indices. Mutable so that it can be filled in a lazy way by nodeData(). Stored in an atomic pointer to enable the use of a DCLP. | |
QMutex | _nodeDataMutex |
Mutex protecting the creation of _nodeData. | |
Cell group set consisting of a set of disjoint mesh cell groups.
Cells will be traversed by group (ordered by group id) and inside each group in the mesh group order