GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmCellGroupSet Class Referenceabstract

Interface for helping managing mesh cell groups and returning the elements in their union. More...

#include <gmCellGroupSet.h>

Inheritance diagram for GmCellGroupSet:

Public Member Functions

virtual ~GmCellGroupSet ()
 Virtual destructor.
 
virtual int numCells () const =0
 Returns the number of unique elements in the cell group set.
 
virtual GmCellcell (int setIndex) const =0
 Given an index in the range [0..numCells()-1], returns the respective cell.
 
virtual bool ordered () const =0
 Returns true if the the set returned by calls to cell(0) through cell(numCells()-1) is ordered by cell id.
 
virtual int numNodes () const =0
 Returns the number of geometric nodes shared by the group elements.
 
virtual int node (int setIndex) const =0
 Given an index in the range [0..numNodes()-1], returns the respective mesh node index.
 
virtual void clear ()=0
 Clear the group set in response to a mesh clear() operation. It will not clear the list of cellGroups.
 
virtual const QList< int > & cellGroups () const =0
 Returns a list with the cell groups belonging to this group set. Values are the group index in the mesh, ordered by index.
 
QStringList cellGroupNames () const
 Returns the result of cellGroups() converted to group names.
 
virtual GmCellMeshmesh () const =0
 Returns the mesh owning the cell groups.
 
virtual size_t usedMemory () const =0
 Returns the approximate memory used internally by the group set object for storing its data. Might be 0 for groups that only reference a mesh or a set of group sets.
 
virtual void applyTransform (std::function< int(int)> &t)=0
 This is a very specialized function. Use only if you know what you are doing. For sets storing internally the cell ids, it should apply the given transformation to every id, replacing the previous ones. Sets that just point to cell groups should do nothing.
 

Static Public Member Functions

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.
 

Detailed Description

Interface for helping managing mesh cell groups and returning the elements in their union.

Member Function Documentation

◆ applyTransform()

virtual void GmCellGroupSet::applyTransform ( std::function< int(int)> & t)
pure virtual

This is a very specialized function. Use only if you know what you are doing. For sets storing internally the cell ids, it should apply the given transformation to every id, replacing the previous ones. Sets that just point to cell groups should do nothing.

Implemented in GmCellDisjointGroupSet, GmCellGenericGroupSet, GmCellMeshGroupSet, and GmCellSequentialGroupSet.

◆ cell()

virtual GmCell * GmCellGroupSet::cell ( int setIndex) const
pure virtual

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

Implemented in GmCellDisjointGroupSet, GmCellGenericGroupSet, GmCellMeshGroupSet, and GmCellSequentialGroupSet.

◆ cellGroupIds()

bool GmCellGroupSet::cellGroupIds ( const GmCellMesh * mesh,
const QStringList & groupNames,
QList< int > & idList,
QString & err )
static

Given a set of cell group names, creates a set of group ids, filling idList.

If a group name does not belong to the mesh, the function returns false and fills err.

If the list includes more than one copy of a group name, it will be included only once in the result list.

◆ cellGroups()

virtual const QList< int > & GmCellGroupSet::cellGroups ( ) const
pure virtual

Returns a list with the cell groups belonging to this group set. Values are the group index in the mesh, ordered by index.

Implemented in GmBaseCellGroupSet, and GmCellMeshGroupSet.

◆ clear()

virtual void GmCellGroupSet::clear ( )
pure virtual

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

Implemented in GmBaseCellGroupSet, GmCellDisjointGroupSet, GmCellGenericGroupSet, GmCellMeshGroupSet, and GmCellSequentialGroupSet.

◆ mesh()

virtual GmCellMesh * GmCellGroupSet::mesh ( ) const
pure virtual

Returns the mesh owning the cell groups.

Implemented in GmBaseCellGroupSet, and GmCellMeshGroupSet.

◆ node()

virtual int GmCellGroupSet::node ( int setIndex) const
pure virtual

Given an index in the range [0..numNodes()-1], returns the respective mesh node index.

Implemented in GmBaseCellGroupSet, and GmCellMeshGroupSet.

◆ numCells()

virtual int GmCellGroupSet::numCells ( ) const
pure virtual

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

Implemented in GmCellDisjointGroupSet, GmCellGenericGroupSet, GmCellMeshGroupSet, and GmCellSequentialGroupSet.

◆ numNodes()

virtual int GmCellGroupSet::numNodes ( ) const
pure virtual

Returns the number of geometric nodes shared by the group elements.

Implemented in GmBaseCellGroupSet, and GmCellMeshGroupSet.

◆ ordered()

virtual bool GmCellGroupSet::ordered ( ) const
pure virtual

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

Implemented in GmCellDisjointGroupSet, GmCellGenericGroupSet, GmCellMeshGroupSet, and GmCellSequentialGroupSet.

◆ usedMemory()

virtual size_t GmCellGroupSet::usedMemory ( ) const
pure virtual

Returns the approximate memory used internally by the group set object for storing its data. Might be 0 for groups that only reference a mesh or a set of group sets.

Implemented in GmBaseCellGroupSet, GmCellGenericGroupSet, and GmCellMeshGroupSet.


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