37#define GM_PCR_REMOTE_BIT 0x01
40#define GM_PCR_HALO_BIT 0x02
43#define GM_PCR_MASK 0x03
46#define GM_PCR_NUM_MASK_BITS 2
49#define GM_PCR_NUM_CLASSES (1 << GM_PCR_NUM_MASK_BITS)
496 virtual bool addStateGeometryData (
GmStateDump* state,
int groupId) = 0;
497 virtual bool fillDumpControlMapData (QVariantMap* map,
const GmLogCategory& logger) = 0;
498 virtual bool dumpControlMapDataLoaded(QVariantMap* map,
const GmLogCategory& logger) = 0;
Interface for helping managing mesh cell groups and returning the elements in their union.
Definition gmCellGroupSet.h:35
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
Base interface class for Partition-Color-Renumber object plugins.
Definition gmPCR.h:54
virtual void printPartitionClassStatistics(const GmLogCategory &logger) const =0
Helper debug function to print class statistics. In "debug mode" prints the statistics for all partit...
NodeClass
Node classification enum.
Definition gmPCR.h:132
virtual size_t usedMemory() const =0
Returns the approximate memory used for storing the PCR data structures.
virtual int originalToLocalOrderNodeSR(int originalNodeId) const =0
SR version for originalToLocalOrderNode(). Returns -1 if skipRemote() is true and the node is a remot...
virtual const char * pluginCategory() const
Returns the plugin category.
Definition gmPCR.h:60
virtual int originalToLocalOrderCell(int originalCellId) const =0
Translates an original(model) cell id into the local, ordered, cell id used by the mesh....
ColorState
State of a coloring operation.
Definition gmPCR.h:230
@ NOT_COLORED
The cells have NOT been colored due to a coloring error.
Definition gmPCR.h:233
@ NOT_SET
No attempt has been made to color the cells yet.
Definition gmPCR.h:234
@ COLORED
All cells have been colored together.
Definition gmPCR.h:231
@ COLORED_WITH_HALO
Regular cells and halo cells have been colored separately.
Definition gmPCR.h:232
virtual int originalToLocalOrderCellSR(int originalCellId) const =0
SR version for originalToLocalOrderCell(). Returns -1 if skipRemote() is true and the cell is a remot...
virtual int partition() const =0
Returns the number of the selected partition for the current mesh. Will return 0 if the mesh was not ...
virtual int nodeClassData(int nodeId) const =0
virtual bool addPartitionInfoAsMeshAttributes(QString cellAttrPrefix, QString nodeAttrPrefix)=0
Adds to the mesh a set of new node and cell attributes with information on node and cell classes plus...
virtual const int * remoteRanks(int templateIndex) const =0
Returns a vector with size equal to numRemoteRanks(templateIndex) storing the ranks (partitions) shar...
virtual int originalToLocalOrderGhostNodeHighClearSR(int originalNodeId) const =0
SR version for originalToLocalOrderGhostNodeHighClear(). Returns -1 if skipRemote() is true and the n...
virtual int originalToLocalOrderNode(int originalNodeId) const =0
Translates an original (model) node id into the local, ordered, node id used by the mesh....
virtual int originalNodeTraversalOrder(int i) const =0
When traversing the whole set of mesh nodes, one common requirement is for the traversal to produce t...
virtual int numGlobalCells() const =0
When working with partitioned meshes, returns the number of cells in the global mesh,...
virtual int numGlobalGhostNodes() const =0
When working with partitioned meshes, returns the number of ghost nodes in the global mesh,...
virtual const QVector< GmCellGroupSet * > & coloredHaloSets(const GmCellGroupSet *gs)=0
Similar to coloredSets() but including only halo cells from the given group set (if any)
virtual bool addNodes(int numNodes)=0
Informs that the number of nodes has been increased. That does not mean that coordinates have been fi...
virtual QStringList cellMappingRequiredGroups()=0
Method called by the mesh to query if the pcr object needs any cell group information to exist before...
virtual bool addColoringAsMeshAttribute(const QVector< const GmCellGroupSet * > &gsets, QString attrName)=0
Similar to addColoringAsMeshAttribute(const GmCellGroupSet*, QString) but "appending" together severa...
virtual int localOrderToOriginalGeomNode(int nodeId) const =0
An specialization of localOrderToOriginalNode, accepting ONLY geometric nodes (between 0 and num node...
virtual bool setMesh(GmMesh *mesh)=0
Function called by the mesh to establish that this PCR object is tied to the given mesh....
virtual bool initCellMapping(bool *renumbered, QMap< int, int > &partOrigToLocOrder, QVector< int > &partLocToOrigOrder)=0
Method called by the mesh to initialize the cell renumbering mapping. It will be called once after ce...
virtual int originalToLocalOrderGhostNodeHighSetSR(int originalNodeId) const =0
SR version for originalToLocalOrderGhostNodeHighSet(). Returns -1 if skipRemote() is true and the nod...
virtual bool cellsRenumbered() const =0
Returns true if the cells where renumbered, false if not. Notice that translation functions work as a...
virtual ColorState coloringState(const GmCellGroupSet *gs)=0
Returns the coloring state for the given cell group. Will trigger the coloring algorithm if the given...
virtual bool addCells(int numCells)=0
Informs that the number of cells has been increased. That does not mean that cell nodes or properties...
virtual const QVector< GmCellGroupSet * > & coloredSets(const GmCellGroupSet *gs)=0
Returns the set of colored cell sub-groups for the given cell group. Within each sub-group,...
CellClass
Cell classification enum.
Definition gmPCR.h:125
virtual bool initPartitions(int numPartitions, int partition)=0
Breaks the mesh into the specified number of partitions, gathers information about cells,...
virtual void printPartitionRankTemplateData(const GmLogCategory &logger) const =0
Helper debug function to print the rank template data.
virtual int originalToLocalOrderGhostNodeHighSet(int originalNodeId) const =0
An specialization of originalToLocalOrderNode, accepting ONLY ghost nodes with the high bit SET (betw...
virtual int originalToLocalOrderGhostNodeHighClear(int originalNodeId) const =0
An specialization of originalToLocalOrderNode, accepting ONLY ghost nodes with the high bit CLEARED (...
virtual bool hasCapability(QString capabilityName) const =0
This function should return true or false to indicate whether the PCR object supports the requested c...
virtual const GmCellGroupSet * sequentialSet(const GmCellGroupSet *gs)=0
Returns the set of cells from the given cell group that could not be colored and should be treated se...
virtual bool skipRemote() const =0
Returns true if the mesh was partitioned, includes remote halo cells and the PCR object was configure...
virtual GmMesh * mesh() const =0
Returns the mesh that this PCR object is tied to.
virtual int cellClassData(int cellId) const =0
virtual void clear()=0
Informs that the mesh was cleared.
virtual int originalToLocalOrderGeomNode(int originalNodeId) const =0
An specialization of originalToLocalOrderNode, accepting ONLY geometric nodes (between 0 and num node...
virtual CellClass cellClass(int cellId) const =0
Returns the cell class for the given cell. Will return MY_CELL if the mesh was not partitioned.
virtual size_t printMemoryStatistics(const GmLogCategory &logger, GmLogLevel level) const =0
Prints memory usage for the PCR object to the given logger. Returns the used memory as reported by us...
virtual int localOrderToOriginalGhostNodeHighClear(int nodeId) const =0
An specialization of localOrderToOriginalNode, accepting ONLY ghost nodes with the high bit CLEARED (...
virtual bool nodesRenumbered() const =0
Returns true if the nodes where renumbered, false if not. Notice that translation functions work as a...
virtual void printColoringStatistics(const GmLogCategory &logger) const =0
Helper debug function to print coloring statistics for the existing colorings.
virtual int numRemoteRanks(int templateIndex) const =0
Returns the number of remote ranks sharing the local cell / node for the given template index.
virtual bool addDebugPartitionInfoAsMeshAttributes(QString cellAttrPrefix, QString nodeAttrPrefix)=0
Similar to addPartitionInfoAsMeshAttributes() but adding extra cell and node attributes named by the ...
virtual int originalCellTraversalOrder(int i) const =0
When traversing the whole set of mesh cells, one common requirement is for the traversal to produce t...
virtual int localOrderToOriginalNode(int nodeId) const =0
Translates a local, ordered, node id used by the mesh into the original (model) node id....
virtual const GmCellGroupSet * sequentialHaloSet(const GmCellGroupSet *gs)=0
Similar to sequentialSet() but including only halo cells from the given group set (if any)
virtual bool addGhostNodes(int numGhostNodes)=0
Informs that the number of ghost nodes has been increased. That does not mean that coordinates have b...
virtual ColorType coloringType() const =0
Returns the type of coloring for this PCR object.
virtual int localOrderToOriginalCell(int cellId) const =0
Translates a local, ordered, cell id used by the mesh into the original(model) cell id When working w...
virtual int originalToLocalOrderGeomNodeSR(int originalNodeId) const =0
SR version for originalToLocalOrderGeomNode(). Returns -1 if skipRemote() is true and the node is a r...
virtual NodeClass nodeClass(int nodeId) const =0
Returns the node class for the given node. Will return MY_NODE if the mesh was not partitioned....
ColorType
Type of coloring.
Definition gmPCR.h:220
@ FVM_COLORING
Within each color group, cells do not share edges for surface meshes or faces for volumetric meshes.
Definition gmPCR.h:223
@ FEM_COLORING
Within each color group, cells do not share nodes.
Definition gmPCR.h:222
@ NO_COLORING
No coloring configured.
Definition gmPCR.h:221
virtual int numPartitions() const =0
Returns the number of partitions for the mesh. Will return 1 if the mesh was not partitioned.
virtual bool addColoringAsMeshAttribute(const GmCellGroupSet *gs, QString attrName)=0
Adds to the mesh a new cell attribute, named attrName, with the 1-based coloring index for each cell....
virtual int numNodesInClass(NodeClass nodeClass, GmCellFillMode mode=GM_CELL_NODES) const =0
Returns the number of nodes in the mesh that are classified in the given nodeClass....
virtual int localOrderToOriginalGhostNodeHighSet(int nodeId) const =0
An specialization of localOrderToOriginalNode, accepting ONLY ghost nodes with the high bit SET (betw...
virtual int numGlobalNodes() const =0
When working with partitioned meshes, returns the number of nodes in the global mesh,...
virtual int numCellsInClass(CellClass cellClass) const =0
Returns the number of cells in the mesh that are classified in the given cellClass.
virtual bool initNodeMapping(GmValueAccessor *ac, bool ghost, bool *renumbered, QMap< int, int > &partOrigToLocOrder)=0
Method called by the mesh to initialize the node renumbering mapping. It will be called once,...
Base interface class for all object plugins.
Definition gmPluginObject.h:37
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition gmPluginObject.cpp:62
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
The GmStateDump class presents a higher level of abstraction over GmMemoryDump, storing accessor data...
Definition gmStateDump.h:54
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Declaration of the GmCell class.
GmCellFillMode
Operation modes for the fillNodeMatrix() method.
Definition gmCell.h:39
@ GM_CELL_NODES
The coordinate matrix will be filled with cell geometry nodes only (the default, and includes extra d...
Definition gmCell.h:40
#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
GmLogLevel
Available log levels list.
Definition gmLog.h:36
#define GM_PCR_REMOTE_BIT
The bit used for classifying a cell / node into a remote cell / node.
Definition gmPCR.h:37
#define GM_PCR_HALO_BIT
The bit used for classifying a cell / node into a halo cell / node.
Definition gmPCR.h:40
Declaration of macros for standard plugin categories.
#define GM_PLUGIN_PCR
Plugin implements PCR (Partition-Color-Renumber) objects.
Definition gmPluginCategory.h:33
Declaration of the GmPluginObject base class.