VTK
vtkPUnstructuredGridConnectivity.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPStructuredGridConnectivity.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14 =========================================================================*/
67#ifndef vtkPUnstructuredGridConnectivity_h
68#define vtkPUnstructuredGridConnectivity_h
69
70#include "vtkFiltersParallelGeometryModule.h" // For export macro
71#include "vtkObject.h"
72
73#if !defined(VTK_LEGACY_REMOVE)
74
75// Forward Declarations
76class vtkCell;
77class vtkCellData;
78class vtkIdList;
79class vtkIdTypeArray;
82class vtkPointData;
83class vtkPoints;
85
86// Forward Declaration of internal data-structures
87namespace vtk
88{
89namespace details
90{
91
92struct GridInfo;
93struct MeshLinks;
94struct CommunicationLinks;
95
96} // END namespace details
97} // END namespace vkt
98
99class VTKFILTERSPARALLELGEOMETRY_EXPORT vtkPUnstructuredGridConnectivity :
100 public vtkObject
101{
102public:
105 void PrintSelf(ostream& os, vtkIndent indent);
106
108
112 vtkGetMacro(Controller,vtkMPIController*);
114
116
119 vtkSetStringMacro(GlobalIDFieldName);
120 vtkGetStringMacro(GlobalIDFieldName);
122
124
127 vtkGetMacro(GhostedGrid,vtkUnstructuredGrid*);
129
134
142
148
149protected:
152
153 char* GlobalIDFieldName; // The field of the global IDs.
154 vtkUnstructuredGrid* InputGrid; // The input grid, to be ghosted.
155 vtkUnstructuredGrid* GhostedGrid; // This is the output from this class.
156 vtkMPIController* Controller; // Supplied MPI controller.
157
158 vtk::details::GridInfo* AuxiliaryData; // Data used to build the ghost zones.
159 vtk::details::CommunicationLinks* CommLists; // Persistent comm lists.
160
166 const int neiRank,
167 vtkCellData* ghostData,
168 vtkIdType* cellIdx,
169 const unsigned int numGhostCells);
170
176 const int neiRank,
177 vtkPointData* ghostData,
178 vtkIdType* globalIdx,
179 const unsigned int numGhostNodes);
180
187
194
200
206
212 const int rmtRank,
213 const vtkIdType ghostCell,
214 const vtkIdType adjCell,
215 vtkIdList* shared);
216
226 vtkCell* c,vtkIdType* globalId, const vtkIdType N,
227 vtkIdType& adjCell,
228 vtkIdList* sharedIds);
229
234 vtkCell* ghostCell,
235 vtkIdTypeArray* ghostGridGlobalIdx,
236 vtkIdType* globalIdArray,
237 vtkUnstructuredGrid* bGrid,
238 vtkIdType* cellPts);
239
245 const int rmtRank,vtkUnstructuredGrid* bGrid);
246
251
257
263
268 void WriteUnstructuredGrid(vtkUnstructuredGrid* grid, const char* fileName);
269
275
280 void MarkFaces();
281
287 const vtkIdType cellIdx,
288 const vtkIdType numCellNodes,
289 vtkIdType* cellNodes,
290 vtkPoints* nodes,
291 vtkIdTypeArray* localIdx,
292 vtkIdTypeArray* globaIdx
293 );
294
300
305
310
317
324
330
331private:
333 void operator=(const vtkPUnstructuredGridConnectivity&) VTK_DELETE_FUNCTION;
334};
335
336#endif //VTK_LEGACY_REMOVE
337#endif /* vtkPUnstructuredGridConnectivity_h */
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
abstract class to specify cell behavior
Definition: vtkCell.h:60
list of point or cell ids
Definition: vtkIdList.h:37
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:40
Process communication using MPI.
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkPUnstructuredGridConnectivity implements functionality for generating ghost zones for a distribute...
void ExtractSurfaceMesh()
Loops through the auxiliary FaceList, constructed in MarkFaces, and extracts the faces and nodes on t...
void FillGhostZoneNodes(const int neiRank, vtkPointData *ghostData, vtkIdType *globalIdx, const unsigned int numGhostNodes)
Given the deserialized node-centered ghost data from the given neighboring rank, this method fills in...
void InsertGhostCellNodes(vtkCell *ghostCell, vtkIdTypeArray *ghostGridGlobalIdx, vtkIdType *globalIdArray, vtkUnstructuredGrid *bGrid, vtkIdType *cellPts)
Inserts the ghost cell nodes in to the ghosted instance of the grid.
vtk::details::CommunicationLinks * CommLists
void ExchangeBoundaryGridSizes(int size)
Exchange boundary grid sizes.
void ExchangeGridBounds()
Exchanges the grid bounds of this process with all other processes.
void BuildGhostZoneConnectivity()
Builds the ghost-zone connectivity.
void BoundingBoxCollision()
Collides the bounds of this process with the bounding boxes of all other processes.
void DeSerializeGhostZones()
Deserializes the raw buffers received from each neighboring rank and updates the ghosted grid instanc...
void ProcessRemoteGrid(const int rmtRank, vtkUnstructuredGrid *bGrid)
Process the remote boundary grid and injects cells in to the ghosted grid if a match is found.
void CreatePersistentRcvBuffers()
This method exchanges the buffer sizes among neighboring processes and allocates a persistent buffer ...
void WriteUnstructuredGrid(vtkUnstructuredGrid *grid, const char *fileName)
Writes the given unstructured grid to an ASCII file.
void ExtractBoundaryGrid()
Extracts the boundary grid geometry from the input grid.
void RegisterGrid(vtkUnstructuredGrid *gridPtr)
Registers the grid in this process.
void EnqueueNodeLinks(const int rmtRank, const vtkIdType ghostCell, const vtkIdType adjCell, vtkIdList *shared)
Loops through the nodes of the ghost cell and the local adjacent cell and determines what.
void MarkFaces()
Loops through the input grid cell faces and updates the auxiliary data-structures to associates a cou...
void ExtractBoundaryCell(const vtkIdType cellIdx, const vtkIdType numCellNodes, vtkIdType *cellNodes, vtkPoints *nodes, vtkIdTypeArray *localIdx, vtkIdTypeArray *globaIdx)
Extracts the boundary cell from the input grid and inserts it in to the boundary grid.
void ExchangeBoundaryGrids()
Exchanged the boundary grids among candidate ranks.
void FillGhostZoneCells(const int neiRank, vtkCellData *ghostData, vtkIdType *cellIdx, const unsigned int numGhostCells)
Given the deserialized cell-centered ghost data from the given neighboring rank, this method fills in...
bool IsCellOnBoundary(vtkIdType *cellNodes, vtkIdType N)
Checks if the cell, composed by the supplied nodes, is on the boundary.
void BuildGhostedGridAndCommLists()
Builds the ghosted grid and communication lists.
void DeSerializeUnstructuredGrid(vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
De-serializes the unstructured grid from the given bytestream.
bool IsCellConnected(vtkCell *c, vtkIdType *globalId, const vtkIdType N, vtkIdType &adjCell, vtkIdList *sharedIds)
Given the cell, c, this method checks if it is connected to the grid assigned to this process.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SynchLocalData()
Synchs the data on the input grid in this process to the ghosted grid instance.
void UpdateGhosts()
Exchanges ghost zone data (i.e., node-centered or cell-centered fields).
void SerializeUnstructuredGrid(vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
Serializes the unstructured grid into a bytestream.
static vtkPUnstructuredGridConnectivity * New()
void SerializeGhostZones()
This method serializes the local data (node-centered and/or cell-centered) for each rank that this pr...
represent and manipulate point attribute data
Definition: vtkPointData.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
dataset represents arbitrary combinations of all possible cell types
@ size
Definition: vtkX3D.h:253
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287