24#ifndef _GEMA_FILE_NODE_RENUMBERING_H_
25#define _GEMA_FILE_NODE_RENUMBERING_H_
77 return _map ? (
_map[node] != -1) :
true;
89 int map(
int node)
const
Interface for helping managing mesh cell groups and returning the elements in their union.
Definition gmCellGroupSet.h:35
Base interface class for CellMesh type plugins.
Definition gmCellMesh.h:40
An auxiliary class for renumbering nodes when filtering cells from an output mesh....
Definition gmFileNodeRenumbering.h:46
int _nActiveNodes
The total number of active nodes in the mesh. Equals _nMeshNodes before filter()
Definition gmFileNodeRenumbering.h:120
const GmCellMesh * _mesh
The mesh.
Definition gmFileNodeRenumbering.h:116
int _nActiveGhostNodes
The number of nodes in _nActiveNodes that are ghost nodes.
Definition gmFileNodeRenumbering.h:121
bool _modelOrder
Should the order of nodes in map follow the order from the original set of model nodes (true) or from...
Definition gmFileNodeRenumbering.h:118
int * _map
The mapping between node indices. Size equal to _nMeshNodes. -1 if an index is not active....
Definition gmFileNodeRenumbering.h:122
GmFileNodeRenumbering(const GmCellMesh *mesh, GmAffectedNodes mode, bool useModelOrder)
Constructor. Gets as parameter the mesh and the definition of which types of nodes should be consider...
Definition gmFileNodeRenumbering.cpp:41
bool active(int node) const
Returns true if the node belongs to an active cell, false if not. The node index should be a linear n...
Definition gmFileNodeRenumbering.h:74
int map(int node) const
Returns the mapping between a node number and its position in the renumbered node set....
Definition gmFileNodeRenumbering.h:89
int numActiveNodes() const
Returns the number of active nodes in the mesh: the number of nodes belonging to an unfiltered cell a...
Definition gmFileNodeRenumbering.h:64
bool filter(bool active, const GmCellGroupSet *group, const GmFileFormat *fileFormat)
Initializes the node mapping structure to enable saving node data without nodes that are used only by...
Definition gmFileNodeRenumbering.cpp:77
int _nMeshNodes
The total number of nodes in the mesh, respecting mode.
Definition gmFileNodeRenumbering.h:119
int numActiveGhostNodes() const
Returns the number of active nodes (like numActiveNodes()) that are ghost nodes.
Definition gmFileNodeRenumbering.h:67
const GmCellMesh * mesh() const
Returns the associated mesh.
Definition gmFileNodeRenumbering.h:54
GmAffectedNodes _mode
Which kind of nodes are we dealing with?
Definition gmFileNodeRenumbering.h:117
~GmFileNodeRenumbering()
Destructor.
Definition gmFileNodeRenumbering.h:51
const GmAffectedNodes mode() const
Returns the associated node mode.
Definition gmFileNodeRenumbering.h:57
virtual int numNodes() const =0
Returns the number of nodes in the mesh.
static bool isGhostNode(int nodeIndex)
Returns true if the given index is a ghost node index, false if not.
Definition gmMesh.h:136
virtual GmPCR * pcrObject() const =0
Returns the PCR(Partition - Color - Renumber) object associated with this mesh. Should NEVER return N...
static int clearGhostFlag(int nodeIndex)
Returns the given index with the ghost node bit cleared.
Definition gmMesh.h:142
virtual int localOrderToOriginalGhostNodeHighClear(int nodeId) const =0
An specialization of localOrderToOriginalNode, accepting ONLY ghost nodes with the high bit CLEARED (...
virtual int localOrderToOriginalNode(int nodeId) const =0
Translates a local, ordered, node id used by the mesh into the original (model) node id....
Declaration of the GmCellMesh interface class.
Implementation of the GmPCR class.
Declaration of the GmValueInfo class.
GmAffectedNodes
Affected node types for node based values (GM_NODE_COORDINATES, GM_NODE_ATTRIBUTE or GM_NODE_STATEVAR...
Definition gmValueInfo.h:97
@ GM_GHOST_NODE
Specifies that this value exists over ghost nodes only.
Definition gmValueInfo.h:99
@ GM_BOTH
Specifies that this value exists over mesh and ghost nodes.
Definition gmValueInfo.h:100