VTK
|
#include <vtkPStructuredGridConnectivity.h>
Public Types | |
typedef vtkStructuredGridConnectivity | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkPStructuredGridConnectivity * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetNumberOfGrids (const unsigned int N) |
int | GetGridRank (const int gridID) |
bool | IsGridRemote (const int gridID) |
bool | IsGridLocal (const int gridID) |
void | Initialize () |
void | ComputeNeighbors () |
virtual void | CreateGhostLayers (const int N=1) |
virtual void | SetController (vtkMultiProcessController *) |
virtual vtkMultiProcessController * | GetController () |
void | RegisterGrid (const int gridID, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes) |
int | GetNumberOfLocalGrids () |
Static Public Member Functions | |
static vtkPStructuredGridConnectivity * | New () |
static int | IsTypeOf (const char *type) |
static vtkPStructuredGridConnectivity * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkPStructuredGridConnectivity () | |
~vtkPStructuredGridConnectivity () | |
bool | GridExtentsAreEqual (int rhs[6], int lhs[6]) |
bool | HasPointData (const int gridIdx) |
bool | HasCellData (const int gridIdx) |
bool | HasPoints (const int gridIdx) |
void | InitializeMessageCounters () |
void | ClearRemoteData () |
void | ClearRawBuffers () |
void | RegisterRemoteGrid (const int gridID, int extents[6], int process) |
virtual void | TransferGhostDataFromNeighbors (const int gridID) |
void | PackGhostData () |
void | UnpackGhostData () |
void | SerializeBufferSizes (int *&sizesbuf, vtkIdType &N) |
void | ExchangeBufferSizes () |
void | ExchangeGhostDataInit () |
void | PostReceives () |
void | PostSends () |
void | CommunicateGhostData () |
void | ExchangeGhostDataPost () |
void | ExchangeGhostData () |
void | ExchangeGridExtents () |
void | SerializeGridExtents (int *&sndbuffer, vtkIdType &N) |
void | TransferRemoteNeighborData (const int gridIdx, const int nei, const vtkStructuredNeighbor &Neighbor) |
void | DeserializeBufferSizesForProcess (int *buffersizes, vtkIdType N, const int processId) |
void | SerializeGhostPoints (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream) |
void | SerializeDataArray (vtkDataArray *dataArray, vtkMultiProcessStream &bytestream) |
void | SerializeFieldData (int sourceExtent[6], int targetExtent[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream) |
void | SerializeGhostPointData (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream) |
void | SerializeGhostCellData (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream) |
void | DeserializeGhostPoints (const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream) |
void | DeserializeDataArray (vtkDataArray *&dataArray, const int dataType, const int numberOfTuples, const int numberOfComponents, vtkMultiProcessStream &bytestream) |
void | DeserializeFieldData (int ext[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream) |
void | DeserializeGhostPointData (const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream) |
void | DeserializeGhostCellData (const int gridIdx, const int nei, int ext[6], vtkMultiProcessStream &bytestream) |
void | SerializeGhostData (const int sndGridID, const int rcvGrid, int sndext[6], unsigned char *&buffer, unsigned int &size) |
void | DeserializeGhostData (const int gridID, const int neiListID, const int neiGridIdx, int rcvext[6], unsigned char *buffer, unsigned int size) |
void | DeserializeGridExtentForProcess (int *rcvbuffer, vtkIdType &N, const int processId) |
Protected Attributes | |
vtkMultiProcessController * | Controller |
int | Rank |
bool | Initialized |
std::vector< int > | GridRanks |
std::vector< int > | GridIds |
std::vector< std::vector < vtkPoints * > > | RemotePoints |
std::vector< std::vector < vtkPointData * > > | RemotePointData |
std::vector< std::vector < vtkCellData * > > | RemoteCellData |
std::vector< std::vector < unsigned int > > | SendBufferSizes |
std::vector< std::vector < unsigned int > > | RcvBufferSizes |
std::vector< std::vector < unsigned char * > > | SendBuffers |
std::vector< std::vector < unsigned char * > > | RcvBuffers |
int | TotalNumberOfSends |
int | TotalNumberOfRcvs |
int | TotalNumberOfMsgs |
vtkMPICommunicator::Request * | MPIRequests |
vtkPStructuredGridConnectivity inherits from vtkStructuredGridConnectivity and implements functionality to compute the neighboring topology within a single, partitioned and distributed structured grid dataset.
Definition at line 50 of file vtkPStructuredGridConnectivity.h.
Reimplemented from vtkStructuredGridConnectivity.
Definition at line 55 of file vtkPStructuredGridConnectivity.h.
vtkPStructuredGridConnectivity::vtkPStructuredGridConnectivity | ( | ) | [protected] |
vtkPStructuredGridConnectivity::~vtkPStructuredGridConnectivity | ( | ) | [protected] |
static vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkStructuredGridConnectivity.
static int vtkPStructuredGridConnectivity::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkStructuredGridConnectivity.
virtual int vtkPStructuredGridConnectivity::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkStructuredGridConnectivity.
static vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkStructuredGridConnectivity.
virtual vtkObjectBase* vtkPStructuredGridConnectivity::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkStructuredGridConnectivity.
Reimplemented from vtkStructuredGridConnectivity.
void vtkPStructuredGridConnectivity::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkStructuredGridConnectivity.
virtual void vtkPStructuredGridConnectivity::SetController | ( | vtkMultiProcessController * | ) | [virtual] |
Set & Get the process controller
virtual vtkMultiProcessController* vtkPStructuredGridConnectivity::GetController | ( | ) | [virtual] |
Set & Get the process controller
void vtkPStructuredGridConnectivity::SetNumberOfGrids | ( | const unsigned int | N | ) | [virtual] |
Sets the total number of domains distributed among processors
Reimplemented from vtkStructuredGridConnectivity.
void vtkPStructuredGridConnectivity::RegisterGrid | ( | const int | gridID, |
int | extents[6], | ||
vtkUnsignedCharArray * | nodesGhostArray, | ||
vtkUnsignedCharArray * | cellGhostArray, | ||
vtkPointData * | pointData, | ||
vtkCellData * | cellData, | ||
vtkPoints * | gridNodes | ||
) | [virtual] |
See vtkStructuredGridConnectivity::RegisterGrid
Reimplemented from vtkStructuredGridConnectivity.
int vtkPStructuredGridConnectivity::GetNumberOfLocalGrids | ( | ) | [inline] |
Returns the number of local grids registers by the process that owns the current vtkPStructuredGridConnectivity instance
Definition at line 80 of file vtkPStructuredGridConnectivity.h.
int vtkPStructuredGridConnectivity::GetGridRank | ( | const int | gridID | ) | [inline] |
Returns the rank of the given gridID. A nominal value of -1 for the return value of this method indicates that possibly ComputeNeighbors has not been called and consequently the GridRanks vector has not been populated yet.
Definition at line 516 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::IsGridRemote | ( | const int | gridID | ) | [inline] |
Returns true iff the grid is remote, otherwise false.
Definition at line 499 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::IsGridLocal | ( | const int | gridID | ) | [inline] |
Returns true iff the grid corresponding to the given gridID is local.
Definition at line 505 of file vtkPStructuredGridConnectivity.h.
Initializes this instance of vtkPStructuredGridConnectivity, essentially, the acquires the local process ID from the registered controller. If a controller is not registered, the global controller is set.
void vtkPStructuredGridConnectivity::ComputeNeighbors | ( | ) | [virtual] |
Computes the neighboring topology of a distributed structured grid data-set. See vtkStructuredGridConnectivity::ComputeNeighbors
Reimplemented from vtkStructuredGridConnectivity.
virtual void vtkPStructuredGridConnectivity::CreateGhostLayers | ( | const int | N = 1 | ) | [virtual] |
Creates ghost layers on the grids owned by this process using data from both local and remote block neighbors.
Reimplemented from vtkStructuredGridConnectivity.
bool vtkPStructuredGridConnectivity::GridExtentsAreEqual | ( | int | rhs[6], |
int | lhs[6] | ||
) | [inline, protected] |
Returns true if the two extents are equal, otherwise false.
Definition at line 354 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::HasPointData | ( | const int | gridIdx | ) | [inline, protected] |
Returns true iff the grid corresponding to the given ID has point data.
Definition at line 368 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::HasCellData | ( | const int | gridIdx | ) | [inline, protected] |
Returns true iff the grid corresponding to the given ID has cell data.
Definition at line 383 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::HasPoints | ( | const int | gridIdx | ) | [inline, protected] |
Returns true iff the grid corresponding to the given ID has points.
Definition at line 398 of file vtkPStructuredGridConnectivity.h.
void vtkPStructuredGridConnectivity::InitializeMessageCounters | ( | ) | [inline, protected] |
Sets all message counters to 0.
Definition at line 412 of file vtkPStructuredGridConnectivity.h.
void vtkPStructuredGridConnectivity::ClearRemoteData | ( | ) | [inline, protected] |
Clears all internal VTK data-structures that are used to store the remote ghost data.
Definition at line 453 of file vtkPStructuredGridConnectivity.h.
void vtkPStructuredGridConnectivity::ClearRawBuffers | ( | ) | [inline, protected] |
Clears all raw send/rcv buffers
Definition at line 418 of file vtkPStructuredGridConnectivity.h.
void vtkPStructuredGridConnectivity::RegisterRemoteGrid | ( | const int | gridID, |
int | extents[6], | ||
int | process | ||
) | [protected] |
Registers a remote grid with the given grid Id, structured extents and process.
void vtkPStructuredGridConnectivity::TransferRemoteNeighborData | ( | const int | gridIdx, |
const int | nei, | ||
const vtkStructuredNeighbor & | Neighbor | ||
) | [protected] |
This method transfers all the remote neighbor data to the ghosted grid instance of the grid corresponding to the given grid index.
virtual void vtkPStructuredGridConnectivity::TransferGhostDataFromNeighbors | ( | const int | gridID | ) | [protected, virtual] |
This method transfers the fields (point data and cell data) to the ghost extents from the neighboring grids of the grid corresponding to the given gridID.
Reimplemented from vtkStructuredGridConnectivity.
void vtkPStructuredGridConnectivity::PackGhostData | ( | ) | [protected] |
Helper method to pack all the ghost data into send buffers.
void vtkPStructuredGridConnectivity::UnpackGhostData | ( | ) | [protected] |
Helper method to unpack the raw ghost data from the receive buffers in to the VTK remote point data-structures.
void vtkPStructuredGridConnectivity::DeserializeBufferSizesForProcess | ( | int * | buffersizes, |
vtkIdType | N, | ||
const int | processId | ||
) | [protected] |
Helper method to deserialize the buffer sizes coming from the given process.
void vtkPStructuredGridConnectivity::SerializeBufferSizes | ( | int *& | sizesbuf, |
vtkIdType & | N | ||
) | [protected] |
Helper method to serialize the buffer sizes for the grids of this process to neighboring grids.
void vtkPStructuredGridConnectivity::ExchangeBufferSizes | ( | ) | [protected] |
Helper method to exchange buffer sizes.Each process sends the send buffer size of each grid to each of its neighbors.
void vtkPStructuredGridConnectivity::ExchangeGhostDataInit | ( | ) | [protected] |
Helper method for exchanging ghost data. It loops through all the grids, and for each neighbor it constructs the corresponding send buffer. size and posts a non-blocking receive.
void vtkPStructuredGridConnectivity::PostReceives | ( | ) | [protected] |
Helper method to communicate ghost data. Loops through all the neighbors and for every remote neighbor posts a non-blocking receive.
void vtkPStructuredGridConnectivity::PostSends | ( | ) | [protected] |
Helper method to communicate ghost data. Loops through the neighbors and for every remote neighbor posts a non-blocking send.
void vtkPStructuredGridConnectivity::CommunicateGhostData | ( | ) | [protected] |
Helper method for exchanging ghost data. It loops through all the grids and for each neighbor of each grid it serializes the data in the send extent and posts a non-blocking send.
void vtkPStructuredGridConnectivity::ExchangeGhostDataPost | ( | ) | [protected] |
Helper method for exchanging ghost data. It blocks until all requests are complete (via a waitAll) and then de-serializes the receive buffers to form the corresponding remote data-structures.
void vtkPStructuredGridConnectivity::ExchangeGhostData | ( | ) | [protected] |
Exchanges ghost data of the grids owned by this process.
void vtkPStructuredGridConnectivity::SerializeGhostPoints | ( | const int | gridIdx, |
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to serialize the ghost points to send to a remote process. Called from SerializeGhostData.
void vtkPStructuredGridConnectivity::SerializeDataArray | ( | vtkDataArray * | dataArray, |
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Serializes the data array into a bytestream.
void vtkPStructuredGridConnectivity::SerializeFieldData | ( | int | sourceExtent[6], |
int | targetExtent[6], | ||
vtkFieldData * | fieldData, | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to serialize field data. Called from SerializeGhostPointData and SerializeGhostCellData.
void vtkPStructuredGridConnectivity::SerializeGhostPointData | ( | const int | gridIdx, |
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to serialize ghost point data. Called from SerializeGhostData.
void vtkPStructuredGridConnectivity::SerializeGhostCellData | ( | const int | gridIdx, |
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to serialize ghost cell data. Called from SerializeGhostData.
void vtkPStructuredGridConnectivity::DeserializeGhostPoints | ( | const int | gridIdx, |
const int | nei, | ||
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to de-serialize the ghost points received from a remote process. Called from DeserializeGhostData.
void vtkPStructuredGridConnectivity::DeserializeDataArray | ( | vtkDataArray *& | dataArray, |
const int | dataType, | ||
const int | numberOfTuples, | ||
const int | numberOfComponents, | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to deserialize the data array from a bytestream.
void vtkPStructuredGridConnectivity::DeserializeFieldData | ( | int | ext[6], |
vtkFieldData * | fieldData, | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to de-serialize field data. Called from DeserializeGhostPointData and DeserializeGhostCellData.
void vtkPStructuredGridConnectivity::DeserializeGhostPointData | ( | const int | gridIdx, |
const int | nei, | ||
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to de-serialize the ghost point data received from a remote process. Called from DeserializeGhostData.
void vtkPStructuredGridConnectivity::DeserializeGhostCellData | ( | const int | gridIdx, |
const int | nei, | ||
int | ext[6], | ||
vtkMultiProcessStream & | bytestream | ||
) | [protected] |
Helper method to de-serialize the ghost cell data received from a remote process. Called from DeserializeGhostCellData.
void vtkPStructuredGridConnectivity::SerializeGhostData | ( | const int | sndGridID, |
const int | rcvGrid, | ||
int | sndext[6], | ||
unsigned char *& | buffer, | ||
unsigned int & | size | ||
) | [protected] |
Given a grid ID and the corresponding send extent, this method serializes the grid and data within the given extent. Upon return, the buffer is allocated and contains the data in raw form, ready to be sent. Called from vtkPStructuredGridConnectivity::PackGhostData().
void vtkPStructuredGridConnectivity::DeserializeGhostData | ( | const int | gridID, |
const int | neiListID, | ||
const int | neiGridIdx, | ||
int | rcvext[6], | ||
unsigned char * | buffer, | ||
unsigned int | size | ||
) | [protected] |
Given the raw buffer consisting of ghost data, this method deserializes the object and returns the gridID and rcvext of the grid.
void vtkPStructuredGridConnectivity::ExchangeGridExtents | ( | ) | [protected] |
Exchanges the grid extents among all processes and fully populates the GridExtents vector.
void vtkPStructuredGridConnectivity::SerializeGridExtents | ( | int *& | sndbuffer, |
vtkIdType & | N | ||
) | [protected] |
Serializes the grid extents and information in a buffer to send over MPI The data is serialized as follows: ID imin imax jmin jmax kmin kmax
void vtkPStructuredGridConnectivity::DeserializeGridExtentForProcess | ( | int * | rcvbuffer, |
vtkIdType & | N, | ||
const int | processId | ||
) | [protected] |
Deserializes the received grid extent information to the GridExtents internal data-structures.
Definition at line 114 of file vtkPStructuredGridConnectivity.h.
int vtkPStructuredGridConnectivity::Rank [protected] |
Definition at line 115 of file vtkPStructuredGridConnectivity.h.
bool vtkPStructuredGridConnectivity::Initialized [protected] |
Definition at line 116 of file vtkPStructuredGridConnectivity.h.
std::vector< int > vtkPStructuredGridConnectivity::GridRanks [protected] |
Definition at line 119 of file vtkPStructuredGridConnectivity.h.
std::vector< int > vtkPStructuredGridConnectivity::GridIds [protected] |
Definition at line 120 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< vtkPoints* > > vtkPStructuredGridConnectivity::RemotePoints [protected] |
Definition at line 125 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< vtkPointData* > > vtkPStructuredGridConnectivity::RemotePointData [protected] |
Definition at line 126 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< vtkCellData* > > vtkPStructuredGridConnectivity::RemoteCellData [protected] |
Definition at line 127 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< unsigned int > > vtkPStructuredGridConnectivity::SendBufferSizes [protected] |
Definition at line 132 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< unsigned int > > vtkPStructuredGridConnectivity::RcvBufferSizes [protected] |
Definition at line 133 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< unsigned char* > > vtkPStructuredGridConnectivity::SendBuffers [protected] |
Definition at line 134 of file vtkPStructuredGridConnectivity.h.
std::vector< std::vector< unsigned char* > > vtkPStructuredGridConnectivity::RcvBuffers [protected] |
Definition at line 135 of file vtkPStructuredGridConnectivity.h.
Definition at line 137 of file vtkPStructuredGridConnectivity.h.
int vtkPStructuredGridConnectivity::TotalNumberOfRcvs [protected] |
Definition at line 138 of file vtkPStructuredGridConnectivity.h.
int vtkPStructuredGridConnectivity::TotalNumberOfMsgs [protected] |
Definition at line 139 of file vtkPStructuredGridConnectivity.h.
Definition at line 142 of file vtkPStructuredGridConnectivity.h.