24#ifndef _GEMA_MESH_UTILS_H_
25#define _GEMA_MESH_UTILS_H_
259 nodeId = (-nodeId) - 1;
271 return checkedGeomNodeFromModelSR(nodeId, pcr, semantic);
274 nodeId = (-nodeId) - 1;
292 nodeId = (-nodeId) - 1;
296 return tnode == -1 ? -1 : tnode + pcr->
mesh()->
numNodes();
344 if(cellId < 0 || cellId >= ((
GmCellMesh*)pcr->
mesh())->numGlobalCells())
355 if(cellId < 0 || cellId >= ((
GmCellMesh*)pcr->
mesh())->numGlobalCells())
Base interface for mesh cells.
Definition gmCell.h:88
virtual GmCellMesh * mesh() const =0
Returns the "father" mesh for this cell.
virtual int cellId() const =0
Returns a number identifying the cell. It should be possible to use this id as an index to GmCellMesh...
Base interface class for CellMesh type plugins.
Definition gmCellMesh.h:40
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
static int setGhostFlag(int nodeIndex)
Returns the given index with the ghost node bit set.
Definition gmMesh.h:139
int totalNumGlobalNodes() const
Returns the total number of nodes in the mesh, including normal nodes & ghost nodes.
Definition gmMesh.h:122
virtual int numGlobalGhostNodes() const
When working with partitioned meshes, returns the number of ghost nodes in the global mesh,...
Definition gmMesh.h:119
virtual int numGlobalNodes() const
When working with partitioned meshes, returns the number of nodes in the global mesh,...
Definition gmMesh.h:116
Base interface class for Partition-Color-Renumber object plugins.
Definition gmPCR.h:54
virtual int originalToLocalOrderCell(int originalCellId) const =0
Translates an original(model) cell id into the local, ordered, cell id used by the mesh....
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 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 localOrderToOriginalGeomNode(int nodeId) const =0
An specialization of localOrderToOriginalNode, accepting ONLY geometric nodes (between 0 and num node...
virtual int originalToLocalOrderGhostNodeHighClear(int originalNodeId) const =0
An specialization of originalToLocalOrderNode, accepting ONLY ghost nodes with the high bit CLEARED (...
virtual GmMesh * mesh() const =0
Returns the mesh that this PCR object is tied to.
virtual int originalToLocalOrderGeomNode(int originalNodeId) const =0
An specialization of originalToLocalOrderNode, accepting ONLY geometric nodes (between 0 and num node...
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....
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...
Declaration of the GmCellMesh interface class.
Implementation of the GmPCR class.
Groups utility routines for translating node and cell indices to / from our internal representation a...
Definition gmMeshUtils.h:101
int checkedGeomNodeFromModel(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided geometry node id (no ghost nodes allowed), checks the input data and converts i...
Definition gmMeshUtils.h:225
TranslationSemantics
An enumeration to declare the semantics of the operation that made the index translation call....
Definition gmMeshUtils.h:106
@ IO
Method called from a model loading / saving function.
Definition gmMeshUtils.h:109
@ API
Method called from the Lua binding.
Definition gmMeshUtils.h:107
@ REPORT
Method called from a report function or an error message.
Definition gmMeshUtils.h:108
int checkedNodeFromModel_Gn_Ghs(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided node id where ghost nodes are represented as negative values,...
Definition gmMeshUtils.h:252
int checkedNodeFromModel_Ghs_Ghs(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided node id where ghost nodes are represented with the high bit set,...
Definition gmMeshUtils.h:308
int checkedGhostNodeFromModel_Ghc_Ghc(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided ghost node id (no geometry nodes allowed), with the high bit CLEARED (a value b...
Definition gmMeshUtils.h:326
int checkedNodeFromModel(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided node id that is either a geometry node, a ghost node WITH the high bit set or a...
Definition gmMeshUtils.h:201
int nodeToModel_Gl_Gn(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal node number that is either a geometry node or a ghost node in linear representation...
Definition gmMeshUtils.h:155
int nodeToModel_Ghs_Gn(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal node number that is either a geometry node or a ghost node WITH the high bit set,...
Definition gmMeshUtils.h:140
int checkedNodeFromModel_Gn_Gl(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided node id where ghost nodes are represented as negative values,...
Definition gmMeshUtils.h:286
int nodeToModel(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal node number that is either a geometry node, a ghost node WITH the high bit set or a...
Definition gmMeshUtils.h:128
int checkedCellFromModel(int cellId, const GmPCR *pcr, TranslationSemantics semantic)
Given a user provided cell id, checks the input data and converts it to the internal cell representat...
Definition gmMeshUtils.h:339
int cellToModel(int cellId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal cell number, converts that index to a Model index. If the internal cell does NOT ha...
Definition gmMeshUtils.h:179
int geomNodeToModel(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal geometry node number, converts that index to a Model index. If the internal node do...
Definition gmMeshUtils.h:116
int nodeToModel_Ghs_Ghs(int nodeId, const GmPCR *pcr, TranslationSemantics semantic)
Given an internal node number that is either a geometry node or a ghost node WITH the high bit set,...
Definition gmMeshUtils.h:169