GemaPCR
The GeMA PCR (Partition-Color-Renumber) Plugin
Loading...
Searching...
No Matches
GmpGemaCRBase< Vector, Partition > Class Template Reference

An implementation of the CR (color and renumbering) object interface. The partition interface does nothing. The template parameters are the vector type (should be either GmSingleVector or GmDualVector and probably EQUAL to the type used by the mesh instantiation) and the Partition support. The later should be set to true when this class is being used as the base class for the GmpGemaPCR class. More...

#include <gmpGemaCR.h>

Inheritance diagram for GmpGemaCRBase< Vector, Partition >:
Collaboration diagram for GmpGemaCRBase< Vector, Partition >:

Classes

struct  PartitionFalse
 Empty structure for use when Partition is false. If we where using C++ 20, we could mark this as [[no_unique_address]] preventing it to occupy space. Since we just have one PCR object in the application, we don't bother with it. (We could also solve this by inheriting from the struct - Empty Base Optimization (EBO)) More...
 
struct  PartitionTrue
 Additional partition info when Partition is true. Stores the vectors needed for ghost node reordering + vectors with information for ordered node and cell traversal that are needed only when the mesh was partitioned. More...
 

Public Member Functions

 GmpGemaCRBase (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Default plugin object constructor.
 
virtual ~GmpGemaCRBase ()
 Virtual destructor.
 
virtual const char * pluginName () const
 
virtual const char * pluginType () const
 
virtual bool loadPrivateData (LuaTable &table)
 Parses configuration options given by the user to create this PCR object. IMPORTANT: This method is called BOFORE the call to setMesh().
 
virtual void printParameters (const GmLogCategory &logger)
 Print plugin parameters.
 
virtual bool hasCapability (QString capabilityName) const
 
virtual GmMeshmesh () const
 
virtual bool setMesh (GmMesh *mesh)
 Associates this PCR object with a mesh. Returns false on errors.
 
virtual size_t printMemoryStatistics (const GmLogCategory &logger, GmLogLevel level) const
 Prints memory usage for this PCR object to the given logger. Returns the used memory as reported by usedMemory()
 
virtual size_t usedMemory () const
 Returns an estimate of the used memory by the PCR object. This does not includes fixed (small) sizes.
 
virtual int numPartitions () const
 
virtual int partition () const
 
virtual int numGlobalNodes () const
 
virtual int numGlobalGhostNodes () const
 
virtual int numGlobalCells () const
 
virtual CellClass cellClass (int cellId) const
 
virtual int cellClassData (int cellId) const
 
virtual int numCellsInClass (CellClass cellClass) const
 
virtual NodeClass nodeClass (int nodeId) const
 
virtual int nodeClassData (int nodeId) const
 
virtual int numNodesInClass (NodeClass nodeClass, GmCellFillMode mode=GM_CELL_NODES) const
 
virtual int numRemoteRanks (int templateIndex) const
 
virtual const int * remoteRanks (int templateIndex) const
 
virtual bool skipRemote () const
 
virtual bool addPartitionInfoAsMeshAttributes (QString cellAttrPrefix, QString nodeAttrPrefix)
 
virtual bool addDebugPartitionInfoAsMeshAttributes (QString cellAttrPrefix, QString nodeAttrPrefix)
 
virtual void printPartitionRankTemplateData (const GmLogCategory &logger) const
 
virtual void printPartitionClassStatistics (const GmLogCategory &logger) const
 
virtual ColorType coloringType () const
 
virtual ColorState coloringState (const GmCellGroupSet *gs)
 
virtual const QVector< GmCellGroupSet * > & coloredSets (const GmCellGroupSet *gs)
 
virtual const GmCellGroupSetsequentialSet (const GmCellGroupSet *gs)
 
virtual const QVector< GmCellGroupSet * > & coloredHaloSets (const GmCellGroupSet *gs)
 
virtual const GmCellGroupSetsequentialHaloSet (const GmCellGroupSet *gs)
 
virtual bool addColoringAsMeshAttribute (const GmCellGroupSet *gs, QString attrName)
 
virtual bool addColoringAsMeshAttribute (const QVector< const GmCellGroupSet * > &gsets, QString attrName)
 
virtual void printColoringStatistics (const GmLogCategory &logger) const
 
virtual bool nodesRenumbered () const
 
virtual bool cellsRenumbered () const
 
virtual int originalToLocalOrderNode (int originalNodeId) const
 
virtual int originalToLocalOrderGeomNode (int originalNodeId) const
 
virtual int originalToLocalOrderGhostNodeHighSet (int originalNodeId) const
 
virtual int originalToLocalOrderGhostNodeHighClear (int originalNodeId) const
 
virtual int localOrderToOriginalNode (int nodeId) const
 
virtual int localOrderToOriginalGeomNode (int nodeId) const
 
virtual int localOrderToOriginalGhostNodeHighSet (int nodeId) const
 
virtual int localOrderToOriginalGhostNodeHighClear (int nodeId) const
 
virtual int originalToLocalOrderCell (int originalCellId) const
 
virtual int localOrderToOriginalCell (int cellId) const
 
 MAKE_SR_FUNCTION (originalToLocalOrderNode, nodeClass, REMOTE_NODE)
 
 MAKE_SR_FUNCTION (originalToLocalOrderGeomNode, nodeClass, REMOTE_NODE)
 
 MAKE_SR_FUNCTION (originalToLocalOrderGhostNodeHighSet, nodeClass, REMOTE_NODE)
 
 MAKE_SR_FUNCTION (originalToLocalOrderGhostNodeHighClear, nodeClass, REMOTE_NODE)
 
 MAKE_SR_FUNCTION (originalToLocalOrderCell, cellClass, REMOTE_HALO_CELL)
 
virtual int originalNodeTraversalOrder (int i) const
 
virtual int originalCellTraversalOrder (int i) const
 
virtual bool initPartitions (int numPartitions, int partition)
 
virtual bool initNodeMapping (GmValueAccessor *ac, bool ghost, bool *renumbered, QMap< int, int > &partOrigToLocOrder)
 
virtual bool initCellMapping (bool *renumbered, QMap< int, int > &partOrigToLocOrder, QVector< int > &partLocToOrigOrder)
 
virtual QStringList cellMappingRequiredGroups ()
 
virtual bool addNodes (int numNodes)
 
virtual bool addGhostNodes (int numGhostNodes)
 
virtual bool addCells (int numCells)
 
virtual void clear ()
 
virtual bool addStateGeometryData (GmStateDump *state, int groupId)
 
virtual bool fillDumpControlMapData (QVariantMap *map, const GmLogCategory &logger)
 
virtual bool dumpControlMapDataLoaded (QVariantMap *map, const GmLogCategory &logger)
 
- Public Member Functions inherited from GmPCR
 GmPCR (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
virtual const char * pluginCategory () const
 
virtual int originalToLocalOrderNodeSR (int originalNodeId) const=0
 
virtual int originalToLocalOrderGeomNodeSR (int originalNodeId) const=0
 
virtual int originalToLocalOrderGhostNodeHighSetSR (int originalNodeId) const=0
 
virtual int originalToLocalOrderGhostNodeHighClearSR (int originalNodeId) const=0
 
virtual int originalToLocalOrderCellSR (int originalCellId) const=0
 
- Public Member Functions inherited from GmPluginObject
 GmPluginObject (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
QString id () const
 
QString description () const
 
QString pluginTypeName () const
 

Protected Types

using IntVector = Vector<int>
 A Vector<int>
 
using IntVectorOrMap = std::conditional_t<Partition, QMap<int, int>, Vector<int>>
 A Vector<int> for Partition = false and a QMap<int, int> for Partition = true.
 
using PartitionT = std::conditional_t<Partition, PartitionTrue, PartitionFalse>
 

Protected Member Functions

bool initMappingFromPartition (const IntVector &cells, const IntVector &geomNodes, const IntVector &ghostNodes)
 Initializes the renumbering structures from the partition information given by the cells, geomNodes and ghostNodes parameters. They contain an ordered set of the cells and nodes from the original mesh that belong to the current partition.
 
virtual size_t nodeRenumberMemory () const
 Returns an estimate of the used memory by the node renumbering structures.
 
virtual size_t cellRenumberMemory () const
 Returns an estimate of the used memory by the cell renumbering structures.
 
virtual size_t colorMemory () const
 Returns an estimate of the used memory by cell group colorings.
 
virtual size_t partitionMemory () const
 
GmValueAccessoraddNodeAttributeToMesh (QString name, QString description, GmStorageType type)
 Adds to the mesh a new node attribute, with default value equal to -1 and the given name, description and data type. Returns an accessor for the new attribute or NULL on error.
 
GmCellAccessoraddCellAttributeToMesh (QString name, QString description, GmStorageType type)
 Like addNodeAttributeToMesh() but adding a cell attribute.
 
- Protected Member Functions inherited from GmPluginObject
virtual const GmLogCategorylogger () const
 
GmSimulationDatasimulationData () const
 

Protected Attributes

QVariantMap _options
 The set of user options.
 
GmMesh_mesh
 The associated cell mesh.
 
ColorType _coloringType
 The type of coloring produced by this object.
 
bool _nodeRenumberRequested
 Is node renumbering requested by the user? Can be false even if Partition is true.
 
bool _cellRenumberRequested
 Is cell renumbering requested by the user? Can be false even if Partition is true.
 
bool _isNodeRenumbered
 Have we renumbered the set of nodes? Always true if the mesh was partitioned.
 
bool _isCellRenumbered
 Have we renumbered the set of cell? Always true if the mesh was partitioned.
 
bool _skipRemote
 A flag set to true by GmpGemaPCR if the mesh was partitioned, includes remote halo cells AND the keepRemote user option is false.
 
QMap< const GmCellGroupSet *, GmpColorData * > _gsColorMap
 Map storing coloring data for each registered group set.
 
GmpColorData_noColorData
 The GmpColorData object if coloring is disabled.
 
GmpColoringMethod_colorMethod
 The configured coloring object.
 
GmpNodeRenumberingMethod< IntVector > * _nodeRenumberMethod
 The configured node reordering object.
 
GmpCellRenumberingMethod< IntVector > * _cellRenumberMethod
 The configured cell reordering object.
 
int _numGeomNodes
 Cached value for _mesh->numNodes(). Updated whenever new geometry nodes are added to the mesh.
 
int _numOriginalGeomNodes
 Cached value for _mesh->numGlobalNodes(). If Partition is false, this is effectively equal to _numGeomNodes and is updated whenever new geometry nodes are added to the mesh. If Partition is true, this value is fixed since we are not currently assigning new global numbers to the nodes added to the mesh. See comments on the class documentation.
 
IntVector _localToOriginalGeomNode
 A vector mapping local geometry node numbers to original node numbers. Size equal to _mesh->numNodes(). For nodes added to the mesh at runtime, the stored original node index will be either equal to the local index (Partition = false) or -1 (Partition = true). See comments on the class documentation. Empty if node renumbering is disabled.
 
IntVectorOrMap _originalToLocalGeomNode
 If Partition is false, stores a vector indexed by original geometry node numbers, storing their local node numbers. Size equal to _mesh->numNodes(). If Partition is true, the vector is replaced by a map since the known set of original node numbers for this partition might not be continuous. Its contents includes both the geometry nodes owned by
this partition and halo geometry nodes owned by other partitions (shared with this one). Empty if node renumbering is disabled.
 
IntVector _localToOriginalCell
 A vector mapping local cell numbers to original cell numbers. Size equal to _mesh->numCells(). Empty if cell renumbering is disabled.
 
IntVectorOrMap _originalToLocalCell
 If Partition is false, stores a vector indexed by original cell numbers, storing their local cell numbers. Size equal to _mesh->numCells(). If Partition is true, the vector is replaced by a map since the known set of original cell
numbers for this partition might not be continuous. Its contents includes both the cells owned by this partition and halo cells owned by other partitions that are adjacent to this one. Empty if cell renumbering is disabled.
 
PartitionT _part
 Structure storing extra vectors needed when Partition is true, empty otherwise.
 

Private Member Functions

const GmpColorDatacolorData (const GmCellGroupSet *gs)
 Returns the color data information for the given group set. If not available, it will be created. Check the state field on the returned structure for error cases.
 
void renumberColoredGroupSets (const QVector< int > &partLocToOrigOrder)
 Renumber ALL the colored group sets according to the current PCR cell mapping (assuming that all colorings that exist at the time of this method call where created by the renumbering and consumed by it). If partLocToOrigOrder is not empty (the mesh was partitioned), it gives the mapping from the partitioned index in the local cell vectors to the original model before partitioning. See further comments on the GmPCR::initCellMapping() documentation.
 
int originalToLocalOrderNodeImpl (int originalNodeId) const
 
int originalToLocalOrderGeomNodeImpl (int originalNodeId) const
 
int originalToLocalOrderGhostNodeHighSetImpl (int originalNodeId) const
 
int originalToLocalOrderGhostNodeHighClearImpl (int originalNodeId) const
 
int originalToLocalOrderCellImpl (int originalCellId) const
 
int localOrderToOriginalNodeImpl (int nodeId) const
 
int localOrderToOriginalGeomNodeImpl (int nodeId) const
 
int localOrderToOriginalGhostNodeHighSetImpl (int nodeId) const
 
int localOrderToOriginalGhostNodeHighClearImpl (int nodeId) const
 
int localOrderToOriginalCellImpl (int cellId) const
 
int originalNodeTraversalOrderImpl (int i) const
 See comments on the base class. When printing all the mesh local nodes, the correct order for printing can be provided by the original to sorted translation. This is only true for an unpartitioned mesh. For partitioned meshes, if the nodes where not renumbered again, the ordering is the identity mapping. Otherwise an ordering vector is used (it is filled with the "in-order" traversal of the original to sorted map).
 
int originalCellTraversalOrderImpl (int i) const
 See comments on the base class. When printing all the mesh local cells, the correct order for printing can be provided by the original to sorted translation. This is only true for an unpartitioned mesh. For partitioned meshes, if the cells where not renumbered again, the ordering is the identity mapping. Otherwise an ordering vector is used (it is filled with the "in-order" traversal of the original to sorted map).
 
bool initGeomNodeMapping (GmValueAccessor *ac, bool *renumbered)
 Initializes geometric node remapping vectors from the mesh geometry. Will set *renumbered to true if the nodes where renumbered by this call.
 
bool initGhostNodeMapping (GmValueAccessor *ac, bool *renumbered)
 Initializes ghost node remapping vectors from the mesh set of ghost nodes. Will set *renumbered to true if the nodes where renumbered by this call.
 
void initReverseMapping (const IntVector &localToOriginal, IntVectorOrMap &originalToLocal)
 Initializes the originalToLocal vector or map from the localToOriginal vector contents. For Partition false, assumes that originalToLocal has the same size as localToOriginal. For Partition true, assumes that the originalToLocal map is either empty or filled with a set of keys equal to the contents of the localToOriginal vector.
 
void initOrdering (const IntVectorOrMap &originalToLocal, IntVector &orderVec)
 Initializes the order vector from the reverse mapping.
 
bool addVectors (size_t numAddedEntries, IntVector *localToOriginal, IntVectorOrMap *originalToLocal, IntVector *orderVec)
 Helper function to add the given number of entries to the given vectors without initializing them. Only localToOriginal is required. The others can be NULL and will be ignored. Notice that originalToLocal is only resized if it is indeed a vector and not a map (Partition == false).
 
bool addAndInitVectors (size_t numAddedEntries, IntVector *localToOriginal, IntVectorOrMap *originalToLocal, IntVector *orderVec, int localToOriginalInit, int originalToLocalInit, int orderVecInit)
 Helper function to add the given number of entries to the given vectors and init the new entries following the instructions given by the xxxInit flags. Only localToOriginal is required. The others can be NULL and will be ignored. Notice that originalToLocal is only resized
if it is indeed a vector and not a map (Partition == false).
 
template<class Ac , GmValueSetKind SetKind>
Ac * addAttributeToMesh (QString name, QString description, GmStorageType type)
 Work horse for addNodeAttributeToMesh() and addCellAttributeToMesh(). Template parameters should be the accessor type matching the attribute kind, that should be either GM_NODE_ATTRIBUTE or GM_CELL_ATTRIBUTE.
 

Additional Inherited Members

- Public Types inherited from GmPCR
enum  CellClass
 
enum  NodeClass
 
enum  ColorType
 
enum  ColorState
 
- Public Attributes inherited from GmPCR
 MY_CELL
 
 MY_HALO_CELL
 
 REMOTE_HALO_CELL
 
 MY_NODE
 
 REMOTE_NODE
 
 MY_HALO_NODE
 
 REMOTE_HALO_NODE
 
 NO_COLORING
 
 FEM_COLORING
 
 FVM_COLORING
 
 COLORED
 
 COLORED_WITH_HALO
 
 NOT_COLORED
 
 NOT_SET
 

Detailed Description

template<template< class > class Vector, bool Partition>
class GmpGemaCRBase< Vector, Partition >

An implementation of the CR (color and renumbering) object interface. The partition interface does nothing. The template parameters are the vector type (should be either GmSingleVector or GmDualVector and probably EQUAL to the type used by the mesh instantiation) and the Partition support. The later should be set to true when this class is being used as the base class for the GmpGemaPCR class.

When used without partition support, assumes that ghost nodes are NEVER renumbered. When compiled with partition support, ghost node renumbering is a necessity, but the renumbering data is kept in a different storage to allow for mesh growing (just like in the standard mesh storage).

For both nodes and cells, when the mesh has added nodes, ghost nodes or cells at run time, a new mapping must be created for local to original indices. When partition is false, this mapping is currently the identity. When partition is true in a distributed setting, creating this map is troublesome since we need to coordinate that with other processes. For the time being, we just map new local indices to -1. That might need to be reviewed on the future, but seems to be enough since added nodes are usually not referenced by the orchestration script.

The main reason for having the Partition parameter is the need for the "original to local" data, that is a vector for unpartitioned meshes, to become a map for partitioned meshes (the IntVectorOrMap type). If that was not the case, we could have a cleaner design (less if constexpr situations) with GmpGemCRBase handling unpartitioned cases and a derived class handling the differences for the partitioned case.

Member Function Documentation

◆ addAndInitVectors()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addAndInitVectors ( size_t numAddedEntries,
IntVector * localToOriginal,
IntVectorOrMap * originalToLocal,
IntVector * orderVec,
int localToOriginalInit,
int originalToLocalInit,
int orderVecInit )
private

Helper function to add the given number of entries to the given vectors and init the new entries following the instructions given by the xxxInit flags. Only localToOriginal is required. The others can be NULL and will be ignored. Notice that originalToLocal is only resized
if it is indeed a vector and not a map (Partition == false).

Initialization rules: If the corresponding flag is 1, the container will be initialized with the identity mapping. If -1, it will be initialized with the -1 constant. If 0, it won't be initialized at all. Notice that if originalToLocal is a map, an initializer of -1 will be ignored.

◆ addCells()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addCells ( int numCells)
virtual

Implements GmPCR.

◆ addColoringAsMeshAttribute() [1/2]

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::addColoringAsMeshAttribute ( const GmCellGroupSet * gs,
QString attrName )
inlinevirtual

Implements GmPCR.

◆ addColoringAsMeshAttribute() [2/2]

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addColoringAsMeshAttribute ( const QVector< const GmCellGroupSet * > & gsets,
QString attrName )
virtual

Implements GmPCR.

◆ addDebugPartitionInfoAsMeshAttributes()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::addDebugPartitionInfoAsMeshAttributes ( QString cellAttrPrefix,
QString nodeAttrPrefix )
inlinevirtual

Implements GmPCR.

◆ addGhostNodes()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addGhostNodes ( int numGhostNodes)
virtual

Implements GmPCR.

◆ addNodes()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addNodes ( int numNodes)
virtual

Implements GmPCR.

◆ addPartitionInfoAsMeshAttributes()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::addPartitionInfoAsMeshAttributes ( QString cellAttrPrefix,
QString nodeAttrPrefix )
inlinevirtual

Implements GmPCR.

◆ addStateGeometryData()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::addStateGeometryData ( GmStateDump * state,
int groupId )
virtual

Reimplemented in GmpGemaPCRBase< Vector >.

◆ cellClass()

template<template< class > class Vector, bool Partition>
virtual CellClass GmpGemaCRBase< Vector, Partition >::cellClass ( int cellId) const
inlinevirtual

Implements GmPCR.

◆ cellClassData()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::cellClassData ( int cellId) const
inlinevirtual

Implements GmPCR.

◆ cellMappingRequiredGroups()

template<template< class > class Vector, bool Partition>
virtual QStringList GmpGemaCRBase< Vector, Partition >::cellMappingRequiredGroups ( )
inlinevirtual

Implements GmPCR.

◆ cellsRenumbered()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::cellsRenumbered ( ) const
inlinevirtual

Implements GmPCR.

◆ clear()

template<template< class > class Vector, bool Partition>
void GmpGemaCRBase< Vector, Partition >::clear ( )
virtual

Implements GmPCR.

◆ coloredHaloSets()

template<template< class > class Vector, bool Partition>
virtual const QVector< GmCellGroupSet * > & GmpGemaCRBase< Vector, Partition >::coloredHaloSets ( const GmCellGroupSet * gs)
inlinevirtual

Implements GmPCR.

◆ coloredSets()

template<template< class > class Vector, bool Partition>
virtual const QVector< GmCellGroupSet * > & GmpGemaCRBase< Vector, Partition >::coloredSets ( const GmCellGroupSet * gs)
inlinevirtual

Implements GmPCR.

◆ coloringState()

template<template< class > class Vector, bool Partition>
virtual ColorState GmpGemaCRBase< Vector, Partition >::coloringState ( const GmCellGroupSet * gs)
inlinevirtual

Implements GmPCR.

◆ coloringType()

template<template< class > class Vector, bool Partition>
virtual ColorType GmpGemaCRBase< Vector, Partition >::coloringType ( ) const
inlinevirtual

Implements GmPCR.

◆ hasCapability()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::hasCapability ( QString capabilityName) const
inlinevirtual

Implements GmPCR.

◆ initCellMapping()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::initCellMapping ( bool * renumbered,
QMap< int, int > & partOrigToLocOrder,
QVector< int > & partLocToOrigOrder )
virtual

Implements GmPCR.

Reimplemented in GmpGemaPCRBase< Vector >.

◆ initGhostNodeMapping()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::initGhostNodeMapping ( GmValueAccessor * ac,
bool * renumbered )
private

Initializes ghost node remapping vectors from the mesh set of ghost nodes. Will set *renumbered to true if the nodes where renumbered by this call.

IMPORTANT: At present, this method does nothing.

◆ initNodeMapping()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::initNodeMapping ( GmValueAccessor * ac,
bool ghost,
bool * renumbered,
QMap< int, int > & partOrigToLocOrder )
virtual

Implements GmPCR.

Reimplemented in GmpGemaPCRBase< Vector >.

◆ initPartitions()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::initPartitions ( int numPartitions,
int partition )
inlinevirtual

Implements GmPCR.

◆ loadPrivateData()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::loadPrivateData ( LuaTable & table)
virtual

Parses configuration options given by the user to create this PCR object. IMPORTANT: This method is called BOFORE the call to setMesh().

Parsed fields: coloringType - Expected values: "fem", "fvm" or "no". Must be present. orderNodes - Boolean. Default when missing is the value of the orderNodes model option. orderCells - Boolean. Default when missing is the value of the orderCells model option.

If Partition is true, the orderNodes and orderCells options control whether nodes and cells will be further renumbered to achieve locality after the mesh partition. Remaining fields (like colorCheck) are interpreted by the coloring / renumber algorithms.

Implements GmPluginObject.

Reimplemented in GmpGemaPCRBase< Vector >.

◆ localOrderToOriginalCell()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::localOrderToOriginalCell ( int cellId) const
inlinevirtual

Implements GmPCR.

◆ localOrderToOriginalGeomNode()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::localOrderToOriginalGeomNode ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ localOrderToOriginalGhostNodeHighClear()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::localOrderToOriginalGhostNodeHighClear ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ localOrderToOriginalGhostNodeHighSet()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::localOrderToOriginalGhostNodeHighSet ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ localOrderToOriginalNode()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::localOrderToOriginalNode ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ mesh()

template<template< class > class Vector, bool Partition>
virtual GmMesh * GmpGemaCRBase< Vector, Partition >::mesh ( ) const
inlinevirtual

Implements GmPCR.

◆ nodeClass()

template<template< class > class Vector, bool Partition>
virtual NodeClass GmpGemaCRBase< Vector, Partition >::nodeClass ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ nodeClassData()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::nodeClassData ( int nodeId) const
inlinevirtual

Implements GmPCR.

◆ nodesRenumbered()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::nodesRenumbered ( ) const
inlinevirtual

Implements GmPCR.

◆ numCellsInClass()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numCellsInClass ( CellClass cellClass) const
inlinevirtual

Implements GmPCR.

◆ numGlobalCells()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numGlobalCells ( ) const
inlinevirtual

Implements GmPCR.

◆ numGlobalGhostNodes()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numGlobalGhostNodes ( ) const
inlinevirtual

Implements GmPCR.

◆ numGlobalNodes()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numGlobalNodes ( ) const
inlinevirtual

Implements GmPCR.

◆ numNodesInClass()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numNodesInClass ( NodeClass nodeClass,
GmCellFillMode mode = GM_CELL_NODES ) const
inlinevirtual

Implements GmPCR.

◆ numPartitions()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numPartitions ( ) const
inlinevirtual

Implements GmPCR.

◆ numRemoteRanks()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::numRemoteRanks ( int templateIndex) const
inlinevirtual

Implements GmPCR.

◆ originalCellTraversalOrder()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalCellTraversalOrder ( int i) const
inlinevirtual

Implements GmPCR.

◆ originalNodeTraversalOrder()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalNodeTraversalOrder ( int i) const
inlinevirtual

Implements GmPCR.

◆ originalToLocalOrderCell()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalToLocalOrderCell ( int originalCellId) const
inlinevirtual

Implements GmPCR.

◆ originalToLocalOrderGeomNode()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalToLocalOrderGeomNode ( int originalNodeId) const
inlinevirtual

Implements GmPCR.

◆ originalToLocalOrderGhostNodeHighClear()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalToLocalOrderGhostNodeHighClear ( int originalNodeId) const
inlinevirtual

Implements GmPCR.

◆ originalToLocalOrderGhostNodeHighSet()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalToLocalOrderGhostNodeHighSet ( int originalNodeId) const
inlinevirtual

Implements GmPCR.

◆ originalToLocalOrderNode()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::originalToLocalOrderNode ( int originalNodeId) const
inlinevirtual

Implements GmPCR.

◆ partition()

template<template< class > class Vector, bool Partition>
virtual int GmpGemaCRBase< Vector, Partition >::partition ( ) const
inlinevirtual

Implements GmPCR.

◆ partitionMemory()

template<template< class > class Vector, bool Partition>
virtual size_t GmpGemaCRBase< Vector, Partition >::partitionMemory ( ) const
inlineprotectedvirtual

Reimplemented in GmpGemaPCRBase< Vector >.

◆ pluginName()

template<template< class > class Vector, bool Partition>
virtual const char * GmpGemaCRBase< Vector, Partition >::pluginName ( ) const
inlinevirtual

Implements GmPluginObject.

◆ pluginType()

template<template< class > class Vector, bool Partition>
virtual const char * GmpGemaCRBase< Vector, Partition >::pluginType ( ) const
inlinevirtual

Implements GmPluginObject.

◆ printColoringStatistics()

template<template< class > class Vector, bool Partition>
void GmpGemaCRBase< Vector, Partition >::printColoringStatistics ( const GmLogCategory & logger) const
virtual

Implements GmPCR.

◆ printMemoryStatistics()

template<template< class > class Vector, bool Partition>
size_t GmpGemaCRBase< Vector, Partition >::printMemoryStatistics ( const GmLogCategory & logger,
GmLogLevel level ) const
virtual

Prints memory usage for this PCR object to the given logger. Returns the used memory as reported by usedMemory()

Implements GmPCR.

◆ printParameters()

template<template< class > class Vector, bool Partition>
void GmpGemaCRBase< Vector, Partition >::printParameters ( const GmLogCategory & logger)
virtual

Print plugin parameters.

Reimplemented from GmPCR.

Reimplemented in GmpGemaPCRBase< Vector >.

◆ printPartitionClassStatistics()

template<template< class > class Vector, bool Partition>
virtual void GmpGemaCRBase< Vector, Partition >::printPartitionClassStatistics ( const GmLogCategory & logger) const
inlinevirtual

Implements GmPCR.

◆ printPartitionRankTemplateData()

template<template< class > class Vector, bool Partition>
virtual void GmpGemaCRBase< Vector, Partition >::printPartitionRankTemplateData ( const GmLogCategory & logger) const
inlinevirtual

Implements GmPCR.

◆ remoteRanks()

template<template< class > class Vector, bool Partition>
virtual const int * GmpGemaCRBase< Vector, Partition >::remoteRanks ( int templateIndex) const
inlinevirtual

Implements GmPCR.

◆ sequentialHaloSet()

template<template< class > class Vector, bool Partition>
virtual const GmCellGroupSet * GmpGemaCRBase< Vector, Partition >::sequentialHaloSet ( const GmCellGroupSet * gs)
inlinevirtual

Implements GmPCR.

◆ sequentialSet()

template<template< class > class Vector, bool Partition>
virtual const GmCellGroupSet * GmpGemaCRBase< Vector, Partition >::sequentialSet ( const GmCellGroupSet * gs)
inlinevirtual

Implements GmPCR.

◆ setMesh()

template<template< class > class Vector, bool Partition>
bool GmpGemaCRBase< Vector, Partition >::setMesh ( GmMesh * mesh)
virtual

Associates this PCR object with a mesh. Returns false on errors.

Implements GmPCR.

◆ skipRemote()

template<template< class > class Vector, bool Partition>
virtual bool GmpGemaCRBase< Vector, Partition >::skipRemote ( ) const
inlinevirtual

Implements GmPCR.

◆ usedMemory()

template<template< class > class Vector, bool Partition>
virtual size_t GmpGemaCRBase< Vector, Partition >::usedMemory ( ) const
inlinevirtual

Returns an estimate of the used memory by the PCR object. This does not includes fixed (small) sizes.

Implements GmPCR.


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