 |
VTK
9.0.1
|
Go to the documentation of this file.
31 #ifndef vtkPStructuredGridConnectivity_h
32 #define vtkPStructuredGridConnectivity_h
35 #include "vtkFiltersParallelGeometryModule.h"
88 int GetGridRank(
const int gridID);
93 bool IsGridRemote(
const int gridID);
98 bool IsGridLocal(
const int gridID);
156 bool GridExtentsAreEqual(
int rhs[6],
int lhs[6]);
161 bool HasPointData(
const int gridIdx);
166 bool HasCellData(
const int gridIdx);
171 bool HasPoints(
const int gridIdx);
176 void InitializeMessageCounters();
182 void ClearRemoteData();
187 void ClearRawBuffers();
193 void RegisterRemoteGrid(
const int gridID,
int extents[6],
int process);
199 void TransferRemoteNeighborData(
212 void PackGhostData();
218 void UnpackGhostData();
224 void DeserializeBufferSizesForProcess(
int* buffersizes,
vtkIdType N,
const int processId);
230 void SerializeBufferSizes(
int*& sizesbuf,
vtkIdType& N);
236 void ExchangeBufferSizes();
243 void ExchangeGhostDataInit();
262 void CommunicateGhostData();
269 void ExchangeGhostDataPost();
274 void ExchangeGhostData();
291 void SerializeFieldData(
int sourceExtent[6],
int targetExtent[6],
vtkFieldData* fieldData,
310 void DeserializeGhostPoints(
316 void DeserializeDataArray(
vtkDataArray*& dataArray,
const int dataType,
const int numberOfTuples,
329 void DeserializeGhostPointData(
336 void DeserializeGhostCellData(
345 void SerializeGhostData(
const int sndGridID,
const int rcvGrid,
int sndext[6],
346 unsigned char*& buffer,
unsigned int&
size);
352 void DeserializeGhostData(
const int gridID,
const int neiListID,
const int neiGridIdx,
353 int rcvext[6],
unsigned char* buffer,
unsigned int size);
359 void ExchangeGridExtents();
365 void SerializeGridExtents(
int*& sndbuffer,
vtkIdType& N);
371 void DeserializeGridExtentForProcess(
int* rcvbuffer,
vtkIdType& N,
const int processId);
384 for (
int i = 0; i < 6; ++i)
386 if (rhs[i] != lhs[i])
398 assert(
"pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
413 assert(
"pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
428 assert(
"pre: grid index is out-of-bounds!" && (gridIdx >= 0) &&
451 for (
unsigned int i = 0; i < this->
SendBuffers.size(); ++i)
453 for (
unsigned int j = 0; j < this->
SendBuffers[i].size(); ++j)
462 for (
unsigned int i = 0; i < this->
RcvBuffers.size(); ++i)
464 for (
unsigned int j = 0; j < this->
RcvBuffers[i].size(); ++j)
477 for (
unsigned int i = 0; i < this->
RemotePoints.size(); ++i)
479 for (
unsigned int j = 0; j < this->
RemotePoints[i].size(); ++j)
528 assert(
"pre: Instance has not been initialized!" && this->
Initialized);
529 assert(
"pre: gridID is out-of-bounds" && (gridID >= 0) &&
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)));
represent and manipulate 3D points
bool HasPoints(const int gridIdx)
Returns true iff the grid corresponding to the given ID has points.
bool IsGridLocal(const int gridID)
Returns true iff the grid corresponding to the given gridID is local.
std::vector< vtkPoints * > GridPoints
represent and manipulate point attribute data
void SetNumberOfGrids(const unsigned int N) override
Set/Get the total number of domains distributed among processors.
std::vector< std::vector< unsigned char * > > RcvBuffers
stream used to pass data across processes using vtkMultiProcessController.
void ComputeNeighbors() override
Computes neighboring information.
int GetGridRank(const int gridID)
Returns the rank of the given gridID.
std::vector< std::vector< unsigned char * > > SendBuffers
dynamic, self-adjusting array of unsigned char
std::vector< vtkPointData * > GridPointData
std::vector< int > GridIds
bool GridExtentsAreEqual(int rhs[6], int lhs[6])
Returns true if the two extents are equal, otherwise false.
abstract superclass for arrays of numeric data
void ClearRawBuffers()
Clears all raw send/rcv buffers.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HasPointData(const int gridIdx)
Returns true iff the grid corresponding to the given ID has point data.
represent and manipulate fields of data
std::vector< int > GridRanks
vtkMPICommunicator::Request * MPIRequests
std::vector< std::vector< unsigned int > > SendBufferSizes
std::vector< std::vector< vtkCellData * > > RemoteCellData
Multiprocessing communication superclass.
int GetNumberOfLocalGrids()
Returns the number of local grids registers by the process that owns the current vtkPStructuredGridCo...
unsigned int NumberOfGrids
bool IsGridRemote(const int gridID)
Returns true iff the grid is remote, otherwise false.
represent and manipulate cell attribute data
void InitializeMessageCounters()
Sets all message counters to 0.
virtual void RegisterGrid(const int gridID, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes)
Registers the current grid corresponding to the grid ID by its global extent w.r.t.
a simple class to control print indentation
bool HasCellData(const int gridIdx)
Returns true iff the grid corresponding to the given ID has cell data.
void ClearRemoteData()
Clears all internal VTK data-structures that are used to store the remote ghost data.
virtual void TransferGhostDataFromNeighbors(const int gridID)
This method transfers the fields (point data and cell data) to the ghost extents from the neighboring...
std::vector< std::vector< vtkPointData * > > RemotePointData
std::vector< std::vector< vtkPoints * > > RemotePoints
vtkMultiProcessController * Controller
static vtkStructuredGridConnectivity * New()
void CreateGhostLayers(const int N=1) override
Creates ghost layers.
Process communication using MPI.
std::vector< vtkCellData * > GridCellData
std::vector< std::vector< unsigned int > > RcvBufferSizes