VTK  9.0.20210301
vtkPStructuredGridConnectivity.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  =========================================================================*/
31 #ifndef vtkPStructuredGridConnectivity_h
32 #define vtkPStructuredGridConnectivity_h
33 
34 // VTK include directives
35 #include "vtkFiltersParallelGeometryModule.h" // For export macro
36 #include "vtkMPICommunicator.h" // Needed for vtkMPICommunicator::Request
38 
39 // C++ include directives
40 #include <vector> // For STL vector
41 
42 // Forward declarations
44 class vtkMPIController;
46 // class vtkMPICommunicator::Request;
47 
48 class VTKFILTERSPARALLELGEOMETRY_EXPORT vtkPStructuredGridConnectivity
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
60  vtkSetMacro(Controller, vtkMultiProcessController*);
61  vtkGetMacro(Controller, vtkMultiProcessController*);
63 
67  void SetNumberOfGrids(const unsigned int N) override;
68 
72  void RegisterGrid(const int gridID, int extents[6], vtkUnsignedCharArray* nodesGhostArray,
73  vtkUnsignedCharArray* cellGhostArray, vtkPointData* pointData, vtkCellData* cellData,
74  vtkPoints* gridNodes) override;
75 
80  int GetNumberOfLocalGrids() { return static_cast<int>(this->GridIds.size()); }
81 
88  int GetGridRank(const int gridID);
89 
93  bool IsGridRemote(const int gridID);
94 
98  bool IsGridLocal(const int gridID);
99 
105  void Initialize();
106 
112  void ComputeNeighbors() override;
113 
118  void CreateGhostLayers(const int N = 1) override;
119 
120 protected:
123 
125  int Rank;
127 
128  std::vector<int> GridRanks; // Corresponding rank for each grid
129  std::vector<int> GridIds; // List of GridIds, owned by this process
130 
131  // Data structures to store the remote ghost data of each grid for each one
132  // of its neighbors. The first index is the global grid index. The second
133  // is the neighbor index.
134  std::vector<std::vector<vtkPoints*>> RemotePoints;
135  std::vector<std::vector<vtkPointData*>> RemotePointData;
136  std::vector<std::vector<vtkCellData*>> RemoteCellData;
137 
138  // Data structures to store the send/receive buffer sizes and corresponding
139  // persistent buffers. The first index is the global grid index. The second
140  // index is the neighbor index for the given grid.
141  std::vector<std::vector<unsigned int>> SendBufferSizes;
142  std::vector<std::vector<unsigned int>> RcvBufferSizes;
143  std::vector<std::vector<unsigned char*>> SendBuffers;
144  std::vector<std::vector<unsigned char*>> RcvBuffers;
145 
149 
150  // Array of MPI requests
152 
156  bool GridExtentsAreEqual(int rhs[6], int lhs[6]);
157 
161  bool HasPointData(const int gridIdx);
162 
166  bool HasCellData(const int gridIdx);
167 
171  bool HasPoints(const int gridIdx);
172 
176  void InitializeMessageCounters();
177 
182  void ClearRemoteData();
183 
187  void ClearRawBuffers();
188 
193  void RegisterRemoteGrid(const int gridID, int extents[6], int process);
194 
200  const int gridIdx, const int nei, const vtkStructuredNeighbor& Neighbor);
201 
207  void TransferGhostDataFromNeighbors(const int gridID) override;
208 
213 
219 
224  void DeserializeBufferSizesForProcess(int* buffersizes, vtkIdType N, const int processId);
225 
230  void SerializeBufferSizes(int*& sizesbuf, vtkIdType& N);
231 
237 
244 
249  void PostReceives();
250 
255  void PostSends();
256 
263 
270 
275 
280  void SerializeGhostPoints(const int gridIdx, int ext[6], vtkMultiProcessStream& bytestream);
281 
286 
291  void SerializeFieldData(int sourceExtent[6], int targetExtent[6], vtkFieldData* fieldData,
292  vtkMultiProcessStream& bytestream);
293 
298  void SerializeGhostPointData(const int gridIdx, int ext[6], vtkMultiProcessStream& bytestream);
299 
304  void SerializeGhostCellData(const int gridIdx, int ext[6], vtkMultiProcessStream& bytestream);
305 
311  const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream& bytestream);
312 
316  void DeserializeDataArray(vtkDataArray*& dataArray, const int dataType, const int numberOfTuples,
317  const int numberOfComponents, vtkMultiProcessStream& bytestream);
318 
323  void DeserializeFieldData(int ext[6], vtkFieldData* fieldData, vtkMultiProcessStream& bytestream);
324 
330  const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream& bytestream);
331 
337  const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream& bytestream);
338 
345  void SerializeGhostData(const int sndGridID, const int rcvGrid, int sndext[6],
346  unsigned char*& buffer, unsigned int& size);
347 
352  void DeserializeGhostData(const int gridID, const int neiListID, const int neiGridIdx,
353  int rcvext[6], unsigned char* buffer, unsigned int size);
354 
360 
365  void SerializeGridExtents(int*& sndbuffer, vtkIdType& N);
366 
371  void DeserializeGridExtentForProcess(int* rcvbuffer, vtkIdType& N, const int processId);
372 
373 private:
375  void operator=(const vtkPStructuredGridConnectivity&) = delete;
376 };
377 
378 //=============================================================================
379 // INLINE METHODS
380 //=============================================================================
381 
382 inline bool vtkPStructuredGridConnectivity::GridExtentsAreEqual(int rhs[6], int lhs[6])
383 {
384  for (int i = 0; i < 6; ++i)
385  {
386  if (rhs[i] != lhs[i])
387  {
388  return false;
389  }
390  }
391  return true;
392 }
393 
394 //------------------------------------------------------------------------------
395 inline bool vtkPStructuredGridConnectivity::HasPointData(const int gridIdx)
396 {
397  // Sanity check
398  assert("pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
399  (gridIdx < static_cast<int>(this->NumberOfGrids)));
400 
401  if ((this->GridPointData[gridIdx] != nullptr) &&
402  (this->GridPointData[gridIdx]->GetNumberOfArrays() > 0))
403  {
404  return true;
405  }
406  return false;
407 }
408 
409 //------------------------------------------------------------------------------
410 inline bool vtkPStructuredGridConnectivity::HasCellData(const int gridIdx)
411 {
412  // Sanity check
413  assert("pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
414  (gridIdx < static_cast<int>(this->NumberOfGrids)));
415 
416  if ((this->GridCellData[gridIdx] != nullptr) &&
417  (this->GridCellData[gridIdx]->GetNumberOfArrays() > 0))
418  {
419  return true;
420  }
421  return false;
422 }
423 
424 //------------------------------------------------------------------------------
425 inline bool vtkPStructuredGridConnectivity::HasPoints(const int gridIdx)
426 {
427  // Sanity check
428  assert("pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
429  (gridIdx < static_cast<int>(this->NumberOfGrids)));
430 
431  if (this->GridPoints[gridIdx] != nullptr)
432  {
433  return true;
434  }
435  return false;
436 }
437 
438 //------------------------------------------------------------------------------
440 {
441  this->TotalNumberOfMsgs = this->TotalNumberOfRcvs = this->TotalNumberOfSends = 0;
442 }
443 
444 //------------------------------------------------------------------------------
446 {
447  this->SendBufferSizes.clear();
448  this->RcvBufferSizes.clear();
449 
450  // STEP 0: Clear send buffers
451  for (unsigned int i = 0; i < this->SendBuffers.size(); ++i)
452  {
453  for (unsigned int j = 0; j < this->SendBuffers[i].size(); ++j)
454  {
455  delete[] this->SendBuffers[i][j];
456  } // END for all neighbors
457  this->SendBuffers[i].clear();
458  } // END for all grids
459  this->SendBuffers.clear();
460 
461  // STEP 1: Clear rcv buffers
462  for (unsigned int i = 0; i < this->RcvBuffers.size(); ++i)
463  {
464  for (unsigned int j = 0; j < this->RcvBuffers[i].size(); ++j)
465  {
466  delete[] this->RcvBuffers[i][j];
467  } // END for all neighbors
468  this->RcvBuffers[i].clear();
469  } // END for all grids
470  this->RcvBuffers.clear();
471 }
472 
473 //------------------------------------------------------------------------------
475 {
476  // STEP 0: Clear remote points
477  for (unsigned int i = 0; i < this->RemotePoints.size(); ++i)
478  {
479  for (unsigned int j = 0; j < this->RemotePoints[i].size(); ++j)
480  {
481  if (this->RemotePoints[i][j] != nullptr)
482  {
483  this->RemotePoints[i][j]->Delete();
484  }
485  } // END for all j
486  this->RemotePoints[i].clear();
487  } // END for all i
488  this->RemotePoints.clear();
489 
490  // STEP 1: Clear remote point data
491  for (unsigned int i = 0; i < this->RemotePointData.size(); ++i)
492  {
493  for (unsigned int j = 0; j < this->RemotePointData[i].size(); ++j)
494  {
495  if (this->RemotePointData[i][j] != nullptr)
496  {
497  this->RemotePointData[i][j]->Delete();
498  }
499  } // END for all j
500  this->RemotePointData[i].clear();
501  } // END for all i
502  this->RemotePointData.clear();
503 
504  // STEP 2: Clear remote cell data
505  for (unsigned int i = 0; i < this->RemoteCellData.size(); ++i)
506  {
507  for (unsigned int j = 0; j < this->RemoteCellData[i].size(); ++j)
508  {
509  if (this->RemoteCellData[i][j] != nullptr)
510  {
511  this->RemoteCellData[i][j]->Delete();
512  }
513  } // END for all j
514  this->RemoteCellData[i].clear();
515  }
516  this->RemoteCellData.clear();
517 }
518 
519 //------------------------------------------------------------------------------
520 inline bool vtkPStructuredGridConnectivity::IsGridRemote(const int gridID)
521 {
522  return (!this->IsGridLocal(gridID));
523 }
524 
525 //------------------------------------------------------------------------------
526 inline bool vtkPStructuredGridConnectivity::IsGridLocal(const int gridID)
527 {
528  assert("pre: Instance has not been initialized!" && this->Initialized);
529  assert("pre: gridID is out-of-bounds" && (gridID >= 0) &&
530  (gridID < static_cast<int>(this->NumberOfGrids)));
531  assert(
532  "pre: GridRanks is not properly allocated" && this->NumberOfGrids == this->GridRanks.size());
533  return ((this->GridRanks[gridID] == this->Rank));
534 }
535 
536 //------------------------------------------------------------------------------
538 {
539  assert("pre: Instance has not been initialized!" && this->Initialized);
540  assert("pre: gridID out-of-bounds!" &&
541  (gridID >= 0 && gridID < static_cast<int>(this->NumberOfGrids)));
542  return (this->GridRanks[gridID]);
543 }
544 #endif /* vtkPStructuredGridConnectivity_h */
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:34
vtkPStructuredGridConnectivity::SerializeGhostPointData
void SerializeGhostPointData(const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to serialize ghost point data.
vtkPStructuredGridConnectivity::HasPoints
bool HasPoints(const int gridIdx)
Returns true iff the grid corresponding to the given ID has points.
Definition: vtkPStructuredGridConnectivity.h:425
vtkPStructuredGridConnectivity::DeserializeBufferSizesForProcess
void DeserializeBufferSizesForProcess(int *buffersizes, vtkIdType N, const int processId)
Helper method to deserialize the buffer sizes coming from the given process.
vtkPStructuredGridConnectivity::PostReceives
void PostReceives()
Helper method to communicate ghost data.
vtkPStructuredGridConnectivity::IsGridLocal
bool IsGridLocal(const int gridID)
Returns true iff the grid corresponding to the given gridID is local.
Definition: vtkPStructuredGridConnectivity.h:526
vtkMPICommunicator::Request
Definition: vtkMPICommunicator.h:53
vtkPStructuredGridConnectivity::RegisterRemoteGrid
void RegisterRemoteGrid(const int gridID, int extents[6], int process)
Registers a remote grid with the given grid Id, structured extents and process.
vtkPStructuredGridConnectivity::ExchangeGridExtents
void ExchangeGridExtents()
Exchanges the grid extents among all processes and fully populates the GridExtents vector.
vtkPStructuredGridConnectivity::SerializeGhostCellData
void SerializeGhostCellData(const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to serialize ghost cell data.
vtkAbstractGridConnectivity::GridPoints
std::vector< vtkPoints * > GridPoints
Definition: vtkAbstractGridConnectivity.h:197
vtkPStructuredGridConnectivity::DeserializeGhostPoints
void DeserializeGhostPoints(const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to de-serialize the ghost points received from a remote process.
vtkPStructuredGridConnectivity::CommunicateGhostData
void CommunicateGhostData()
Helper method for exchanging ghost data.
vtkPStructuredGridConnectivity
vtkPStructuredGridConnectivity inherits from vtkStructuredGridConnectivity and implements functionali...
Definition: vtkPStructuredGridConnectivity.h:50
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:33
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkPStructuredGridConnectivity::DeserializeGhostCellData
void DeserializeGhostCellData(const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to de-serialize the ghost cell data received from a remote process.
vtkPStructuredGridConnectivity::SerializeGridExtents
void SerializeGridExtents(int *&sndbuffer, vtkIdType &N)
Serializes the grid extents and information in a buffer to send over MPI The data is serialized as fo...
vtkPStructuredGridConnectivity::RcvBuffers
std::vector< std::vector< unsigned char * > > RcvBuffers
Definition: vtkPStructuredGridConnectivity.h:144
vtkMultiProcessStream
stream used to pass data across processes using vtkMultiProcessController.
Definition: vtkMultiProcessStream.h:38
vtkPStructuredGridConnectivity::GetGridRank
int GetGridRank(const int gridID)
Returns the rank of the given gridID.
Definition: vtkPStructuredGridConnectivity.h:537
vtkPStructuredGridConnectivity::ExchangeBufferSizes
void ExchangeBufferSizes()
Helper method to exchange buffer sizes.Each process sends the send buffer size of each grid to each o...
vtkPStructuredGridConnectivity::SendBuffers
std::vector< std::vector< unsigned char * > > SendBuffers
Definition: vtkPStructuredGridConnectivity.h:143
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:36
vtkPStructuredGridConnectivity::Rank
int Rank
Definition: vtkPStructuredGridConnectivity.h:125
vtkAbstractGridConnectivity::GridPointData
std::vector< vtkPointData * > GridPointData
Definition: vtkAbstractGridConnectivity.h:195
vtkPStructuredGridConnectivity::GridIds
std::vector< int > GridIds
Definition: vtkPStructuredGridConnectivity.h:129
vtkPStructuredGridConnectivity::ExchangeGhostDataInit
void ExchangeGhostDataInit()
Helper method for exchanging ghost data.
vtkPStructuredGridConnectivity::GridExtentsAreEqual
bool GridExtentsAreEqual(int rhs[6], int lhs[6])
Returns true if the two extents are equal, otherwise false.
Definition: vtkPStructuredGridConnectivity.h:382
vtkPStructuredGridConnectivity::Initialized
bool Initialized
Definition: vtkPStructuredGridConnectivity.h:126
vtkPStructuredGridConnectivity::SerializeBufferSizes
void SerializeBufferSizes(int *&sizesbuf, vtkIdType &N)
Helper method to serialize the buffer sizes for the grids of this process to neighboring grids.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkPStructuredGridConnectivity::ClearRawBuffers
void ClearRawBuffers()
Clears all raw send/rcv buffers.
Definition: vtkPStructuredGridConnectivity.h:445
vtkPStructuredGridConnectivity::HasPointData
bool HasPointData(const int gridIdx)
Returns true iff the grid corresponding to the given ID has point data.
Definition: vtkPStructuredGridConnectivity.h:395
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:54
vtkPStructuredGridConnectivity::GridRanks
std::vector< int > GridRanks
Definition: vtkPStructuredGridConnectivity.h:128
vtkPStructuredGridConnectivity::DeserializeFieldData
void DeserializeFieldData(int ext[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Helper method to de-serialize field data.
vtkPStructuredGridConnectivity::UnpackGhostData
void UnpackGhostData()
Helper method to unpack the raw ghost data from the receive buffers in to the VTK remote point data-s...
vtkPStructuredGridConnectivity::MPIRequests
vtkMPICommunicator::Request * MPIRequests
Definition: vtkPStructuredGridConnectivity.h:151
vtkPStructuredGridConnectivity::SendBufferSizes
std::vector< std::vector< unsigned int > > SendBufferSizes
Definition: vtkPStructuredGridConnectivity.h:141
vtkPStructuredGridConnectivity::RemoteCellData
std::vector< std::vector< vtkCellData * > > RemoteCellData
Definition: vtkPStructuredGridConnectivity.h:136
vtkPStructuredGridConnectivity::PackGhostData
void PackGhostData()
Helper method to pack all the ghost data into send buffers.
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:77
vtkPStructuredGridConnectivity::GetNumberOfLocalGrids
int GetNumberOfLocalGrids()
Returns the number of local grids registers by the process that owns the current vtkPStructuredGridCo...
Definition: vtkPStructuredGridConnectivity.h:80
vtkAbstractGridConnectivity::NumberOfGrids
unsigned int NumberOfGrids
Definition: vtkAbstractGridConnectivity.h:189
vtkPStructuredGridConnectivity::TotalNumberOfRcvs
int TotalNumberOfRcvs
Definition: vtkPStructuredGridConnectivity.h:147
vtkPStructuredGridConnectivity::RegisterGrid
void RegisterGrid(const int gridID, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes) override
See vtkStructuredGridConnectivity::RegisterGrid.
vtkPStructuredGridConnectivity::IsGridRemote
bool IsGridRemote(const int gridID)
Returns true iff the grid is remote, otherwise false.
Definition: vtkPStructuredGridConnectivity.h:520
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:33
vtkPStructuredGridConnectivity::InitializeMessageCounters
void InitializeMessageCounters()
Sets all message counters to 0.
Definition: vtkPStructuredGridConnectivity.h:439
vtkStructuredGridConnectivity
vtkStructuredGridConnectivity is a concrete instance of vtkObject that implements functionality for c...
Definition: vtkStructuredGridConnectivity.h:58
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkPStructuredGridConnectivity::HasCellData
bool HasCellData(const int gridIdx)
Returns true iff the grid corresponding to the given ID has cell data.
Definition: vtkPStructuredGridConnectivity.h:410
vtkPStructuredGridConnectivity::TransferGhostDataFromNeighbors
void TransferGhostDataFromNeighbors(const int gridID) override
This method transfers the fields (point data and cell data) to the ghost extents from the neighboring...
vtkPStructuredGridConnectivity::SerializeFieldData
void SerializeFieldData(int sourceExtent[6], int targetExtent[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
Helper method to serialize field data.
vtkPStructuredGridConnectivity::ClearRemoteData
void ClearRemoteData()
Clears all internal VTK data-structures that are used to store the remote ghost data.
Definition: vtkPStructuredGridConnectivity.h:474
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkPStructuredGridConnectivity::vtkPStructuredGridConnectivity
vtkPStructuredGridConnectivity()
vtkPStructuredGridConnectivity::SerializeGhostData
void SerializeGhostData(const int sndGridID, const int rcvGrid, int sndext[6], unsigned char *&buffer, unsigned int &size)
Given a grid ID and the corresponding send extent, this method serializes the grid and data within th...
vtkStructuredNeighbor
An internal, light-weight class used to store neighbor information.
Definition: vtkStructuredNeighbor.h:27
vtkPStructuredGridConnectivity::RemotePointData
std::vector< std::vector< vtkPointData * > > RemotePointData
Definition: vtkPStructuredGridConnectivity.h:135
vtkPStructuredGridConnectivity::ComputeNeighbors
void ComputeNeighbors() override
Computes the neighboring topology of a distributed structured grid data-set.
vtkPStructuredGridConnectivity::DeserializeGhostPointData
void DeserializeGhostPointData(const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to de-serialize the ghost point data received from a remote process.
vtkPStructuredGridConnectivity::TotalNumberOfSends
int TotalNumberOfSends
Definition: vtkPStructuredGridConnectivity.h:146
vtkPStructuredGridConnectivity::RemotePoints
std::vector< std::vector< vtkPoints * > > RemotePoints
Definition: vtkPStructuredGridConnectivity.h:134
vtkPStructuredGridConnectivity::ExchangeGhostDataPost
void ExchangeGhostDataPost()
Helper method for exchanging ghost data.
vtkPStructuredGridConnectivity::DeserializeGhostData
void DeserializeGhostData(const int gridID, const int neiListID, const int neiGridIdx, int rcvext[6], unsigned char *buffer, unsigned int size)
Given the raw buffer consisting of ghost data, this method deserializes the object and returns the gr...
vtkPStructuredGridConnectivity::Controller
vtkMultiProcessController * Controller
Definition: vtkPStructuredGridConnectivity.h:124
vtkPStructuredGridConnectivity::Initialize
void Initialize()
Initializes this instance of vtkPStructuredGridConnectivity, essentially, the acquires the local proc...
vtkPStructuredGridConnectivity::SetNumberOfGrids
void SetNumberOfGrids(const unsigned int N) override
Sets the total number of domains distributed among processors.
vtkPStructuredGridConnectivity::ExchangeGhostData
void ExchangeGhostData()
Exchanges ghost data of the grids owned by this process.
vtkPStructuredGridConnectivity::~vtkPStructuredGridConnectivity
~vtkPStructuredGridConnectivity() override
vtkPStructuredGridConnectivity::TransferRemoteNeighborData
void TransferRemoteNeighborData(const int gridIdx, const int nei, const vtkStructuredNeighbor &Neighbor)
This method transfers all the remote neighbor data to the ghosted grid instance of the grid correspon...
vtkMPIController
Process communication using MPI.
Definition: vtkMPIController.h:56
vtkPStructuredGridConnectivity::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPStructuredGridConnectivity::TotalNumberOfMsgs
int TotalNumberOfMsgs
Definition: vtkPStructuredGridConnectivity.h:148
vtkPStructuredGridConnectivity::New
static vtkPStructuredGridConnectivity * New()
vtkStructuredGridConnectivity.h
vtkPStructuredGridConnectivity::DeserializeGridExtentForProcess
void DeserializeGridExtentForProcess(int *rcvbuffer, vtkIdType &N, const int processId)
Deserializes the received grid extent information to the GridExtents internal data-structures.
vtkAbstractGridConnectivity::GridCellData
std::vector< vtkCellData * > GridCellData
Definition: vtkAbstractGridConnectivity.h:196
vtkPStructuredGridConnectivity::RcvBufferSizes
std::vector< std::vector< unsigned int > > RcvBufferSizes
Definition: vtkPStructuredGridConnectivity.h:142
vtkMPICommunicator.h
vtkPStructuredGridConnectivity::PostSends
void PostSends()
Helper method to communicate ghost data.
vtkPStructuredGridConnectivity::CreateGhostLayers
void CreateGhostLayers(const int N=1) override
Creates ghost layers on the grids owned by this process using data from both local and remote block n...
vtkPStructuredGridConnectivity::DeserializeDataArray
void DeserializeDataArray(vtkDataArray *&dataArray, const int dataType, const int numberOfTuples, const int numberOfComponents, vtkMultiProcessStream &bytestream)
Helper method to deserialize the data array from a bytestream.
vtkPStructuredGridConnectivity::SerializeDataArray
void SerializeDataArray(vtkDataArray *dataArray, vtkMultiProcessStream &bytestream)
Serializes the data array into a bytestream.
vtkPStructuredGridConnectivity::SerializeGhostPoints
void SerializeGhostPoints(const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
Helper method to serialize the ghost points to send to a remote process.