GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmCellDisjointGroupSet Class Reference

Cell group set consisting of a set of disjoint mesh cell groups. More...

#include <gmCellGroupSet.h>

Inheritance diagram for GmCellDisjointGroupSet:
Collaboration diagram for GmCellDisjointGroupSet:

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 GmCellcell (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() operation. It will not clear the list of cellGroups.
 
virtual void applyTransform (std::function< int(int)> &t)
 See comments on the base class. Does nothing. No stored cell ids.
 
- Public Member Functions inherited from GmBaseCellGroupSet
virtual ~GmBaseCellGroupSet ()
 Destructor.
 
virtual int numNodes () const
 Returns the number of geometric 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 GmCellMeshmesh () const
 Returns the mesh owning the cell groups.
 
virtual size_t usedMemory () const
 Returns the approximate amount of memory used to store node data, if any.
 
- Public Member Functions inherited from GmCellGroupSet
virtual ~GmCellGroupSet ()
 Virtual destructor.
 
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 Public Member Functions inherited from GmCellGroupSet
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.
 
- Protected Types inherited from GmBaseCellGroupSet
typedef QPair< int, int * > NodeData
 Type for storing node data information: Number of nodes + vector pointer.
 
- Protected Member Functions inherited from GmBaseCellGroupSet
 GmBaseCellGroupSet (GmCellMesh *mesh, const QList< int > &groups)
 Base group set constructor. Stores the mesh and an ordered version of the group list.
 
 GmBaseCellGroupSet (GmCellMesh *mesh)
 Base group set constructor. Stores the mesh and an ordered version of the group list.
 
NodeDatabuildNodeList () const
 Builds the list with nodes used by this element groups. Does not changes the internal state.
 
NodeDatanodeData () const
 Auxiliar function that uses the Double Checked Locking Pattern (DCLP) to grab
the pointer to the node data, creating it by calling buildNodeList() if the node data was not created yet..
 
- Protected Attributes inherited from GmBaseCellGroupSet
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.
 

Detailed Description

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

Member Function Documentation

◆ applyTransform()

virtual void GmCellDisjointGroupSet::applyTransform ( std::function< int(int)> & t)
inlinevirtual

See comments on the base class. Does nothing. No stored cell ids.

Implements GmCellGroupSet.

◆ cell()

GmCell * GmCellDisjointGroupSet::cell ( int setIndex) const
virtual

Given an index in the range [0..numCells()-1], returns the respective cell.

Implements GmCellGroupSet.

◆ clear()

void GmCellDisjointGroupSet::clear ( )
virtual

Clear the group set in response to a mesh clear() operation. It will not clear the list of cellGroups.

Reimplemented from GmBaseCellGroupSet.

◆ numCells()

int GmCellDisjointGroupSet::numCells ( ) const
virtual

Returns the number of unique elements in the cell group set.

Implements GmCellGroupSet.

◆ ordered()

virtual bool GmCellDisjointGroupSet::ordered ( ) const
inlinevirtual

Returns true if the the set returned by calls to cell(0) through cell(numCells()-1) is ordered by cell id.

Implements GmCellGroupSet.


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