VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPStructuredGridConnectivity Class Reference

vtkPStructuredGridConnectivity inherits from vtkStructuredGridConnectivity and implements functionality to compute the neighboring topology within a single, partitioned and distributed structured grid dataset. More...

#include <vtkPStructuredGridConnectivity.h>

Inheritance diagram for vtkPStructuredGridConnectivity:
[legend]
Collaboration diagram for vtkPStructuredGridConnectivity:
[legend]

Public Types

typedef vtkStructuredGridConnectivity Superclass
 
- Public Types inherited from vtkStructuredGridConnectivity
typedef vtkAbstractGridConnectivity Superclass
 
- Public Types inherited from vtkAbstractGridConnectivity
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkPStructuredGridConnectivityNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void SetNumberOfGrids (const unsigned int N) override
 Sets the total number of domains distributed among processors. More...
 
void RegisterGrid (const int gridID, int extents[6], vtkUnsignedCharArray *nodesGhostArray, vtkUnsignedCharArray *cellGhostArray, vtkPointData *pointData, vtkCellData *cellData, vtkPoints *gridNodes) override
 See vtkStructuredGridConnectivity::RegisterGrid. More...
 
int GetNumberOfLocalGrids ()
 Returns the number of local grids registers by the process that owns the current vtkPStructuredGridConnectivity instance. More...
 
int GetGridRank (const int gridID)
 Returns the rank of the given gridID. More...
 
bool IsGridRemote (const int gridID)
 Returns true iff the grid is remote, otherwise false. More...
 
bool IsGridLocal (const int gridID)
 Returns true iff the grid corresponding to the given gridID is local. More...
 
void Initialize ()
 Initializes this instance of vtkPStructuredGridConnectivity, essentially, the acquires the local process ID from the registered controller. More...
 
void ComputeNeighbors () override
 Computes the neighboring topology of a distributed structured grid data-set. More...
 
virtual 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 neighbors. More...
 
virtual void SetController (vtkMultiProcessController *)
 Set & Get the process controller. More...
 
virtual vtkMultiProcessControllerGetController ()
 Set & Get the process controller. More...
 
- Public Member Functions inherited from vtkStructuredGridConnectivity
vtkStructuredGridConnectivityNewInstance () const
 
void GetGridExtent (const int gridID, int extent[6])
 Returns the grid extent of the grid corresponding to the given grid ID. More...
 
void SetGhostedGridExtent (const int gridID, int ext[6])
 Sets the ghosted grid extent for the grid corresponding to the given grid ID to the given extent. More...
 
void GetGhostedGridExtent (const int gridID, int ext[6])
 Returns the ghosted grid extent for the block corresponding the. More...
 
int GetNumberOfNeighbors (const int gridID)
 Returns the number of neighbors for the grid corresponding to the given grid ID. More...
 
vtkStructuredNeighbor GetGridNeighbor (const int gridID, const int nei)
 Returns the neighbor corresponding to the index nei for the grid with the given (global) grid ID. More...
 
vtkIdListGetNeighbors (const int gridID, int *extents)
 Returns the list of neighboring blocks for the given grid and the corresponding overlapping extents are filled in the 1-D flat array strided by 6. More...
 
void FillGhostArrays (const int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray) override
 Fills the mesh property arrays, nodes and cells, for the grid corresponding to the given grid ID. More...
 
virtual void SetWholeExtent (int, int, int, int, int, int)
 Set/Get the whole extent of the grid. More...
 
virtual void SetWholeExtent (int[6])
 Set/Get the whole extent of the grid. More...
 
virtual intGetWholeExtent ()
 Set/Get the whole extent of the grid. More...
 
virtual void GetWholeExtent (int &, int &, int &, int &, int &, int &)
 Set/Get the whole extent of the grid. More...
 
virtual void GetWholeExtent (int[6])
 Set/Get the whole extent of the grid. More...
 
virtual int GetDataDimension ()
 Returns the data dimension based on the whole extent. More...
 
- Public Member Functions inherited from vtkAbstractGridConnectivity
vtkAbstractGridConnectivityNewInstance () const
 
unsigned int GetNumberOfGrids ()
 Returns the total number of grids. More...
 
vtkUnsignedCharArrayGetGhostedPointGhostArray (const int gridID)
 Returns the ghosted points ghost array for the grid associated with the given grid ID. More...
 
vtkUnsignedCharArrayGetGhostedCellGhostArray (const int gridID)
 Returns the ghosted cells ghost array for the grid associated with the given grid ID. More...
 
vtkPointDataGetGhostedGridPointData (const int gridID)
 Returns the ghosted grid point data for the grid associated with the given grid ID. More...
 
vtkCellDataGetGhostedGridCellData (const int gridID)
 Returns the ghosted grid cell data for the grid associated with the given grid ID. More...
 
vtkPointsGetGhostedPoints (const int gridID)
 Returns the ghosted grid points for the grid associated with the given grid ID. More...
 
virtual void SetNumberOfGhostLayers (unsigned int)
 Set/Get the number of ghost layers. More...
 
virtual unsigned int GetNumberOfGhostLayers ()
 Set/Get the number of ghost layers. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkPStructuredGridConnectivityNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkPStructuredGridConnectivitySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkStructuredGridConnectivity
static vtkStructuredGridConnectivityNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkStructuredGridConnectivitySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractGridConnectivity
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractGridConnectivitySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkPStructuredGridConnectivity ()
 
 ~vtkPStructuredGridConnectivity () override
 
bool GridExtentsAreEqual (int rhs[6], int lhs[6])
 Returns true if the two extents are equal, otherwise false. More...
 
bool HasPointData (const int gridIdx)
 Returns true iff the grid corresponding to the given ID has point data. More...
 
bool HasCellData (const int gridIdx)
 Returns true iff the grid corresponding to the given ID has cell data. More...
 
bool HasPoints (const int gridIdx)
 Returns true iff the grid corresponding to the given ID has points. More...
 
void InitializeMessageCounters ()
 Sets all message counters to 0. More...
 
void ClearRemoteData ()
 Clears all internal VTK data-structures that are used to store the remote ghost data. More...
 
void ClearRawBuffers ()
 Clears all raw send/rcv buffers. More...
 
void RegisterRemoteGrid (const int gridID, int extents[6], int process)
 Registers a remote grid with the given grid Id, structured extents and process. More...
 
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 corresponding to the given grid index. More...
 
virtual void TransferGhostDataFromNeighbors (const int gridID) override
 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. More...
 
void PackGhostData ()
 Helper method to pack all the ghost data into send buffers. More...
 
void UnpackGhostData ()
 Helper method to unpack the raw ghost data from the receive buffers in to the VTK remote point data-structures. More...
 
void DeserializeBufferSizesForProcess (int *buffersizes, vtkIdType N, const int processId)
 Helper method to deserialize the buffer sizes coming from the given process. More...
 
void SerializeBufferSizes (int *&sizesbuf, vtkIdType &N)
 Helper method to serialize the buffer sizes for the grids of this process to neighboring grids. More...
 
void ExchangeBufferSizes ()
 Helper method to exchange buffer sizes.Each process sends the send buffer size of each grid to each of its neighbors. More...
 
void ExchangeGhostDataInit ()
 Helper method for exchanging ghost data. More...
 
void PostReceives ()
 Helper method to communicate ghost data. More...
 
void PostSends ()
 Helper method to communicate ghost data. More...
 
void CommunicateGhostData ()
 Helper method for exchanging ghost data. More...
 
void ExchangeGhostDataPost ()
 Helper method for exchanging ghost data. More...
 
void ExchangeGhostData ()
 Exchanges ghost data of the grids owned by this process. More...
 
void SerializeGhostPoints (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to serialize the ghost points to send to a remote process. More...
 
void SerializeDataArray (vtkDataArray *dataArray, vtkMultiProcessStream &bytestream)
 Serializes the data array into a bytestream. More...
 
void SerializeFieldData (int sourceExtent[6], int targetExtent[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
 Helper method to serialize field data. More...
 
void SerializeGhostPointData (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to serialize ghost point data. More...
 
void SerializeGhostCellData (const int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to serialize ghost cell data. More...
 
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. More...
 
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. More...
 
void DeserializeFieldData (int ext[6], vtkFieldData *fieldData, vtkMultiProcessStream &bytestream)
 Helper method to de-serialize field data. More...
 
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. More...
 
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. More...
 
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 the given extent. More...
 
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 gridID and rcvext of the grid. More...
 
void ExchangeGridExtents ()
 Exchanges the grid extents among all processes and fully populates the GridExtents vector. More...
 
void SerializeGridExtents (int *&sndbuffer, vtkIdType &N)
 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. More...
 
void DeserializeGridExtentForProcess (int *rcvbuffer, vtkIdType &N, const int processId)
 Deserializes the received grid extent information to the GridExtents internal data-structures. More...
 
- Protected Member Functions inherited from vtkStructuredGridConnectivity
 vtkStructuredGridConnectivity ()
 
 ~vtkStructuredGridConnectivity () override
 
bool InBounds (const int idx, const int Lo, const int Hi)
 Returns true iff Lo <= idx <= Hi, otherwise false. More...
 
bool StrictlyInsideBounds (const int idx, const int Lo, const int Hi)
 Returns true iff Lo < idx < Hi, otherwise false. More...
 
bool IsSubset (int A[2], int B[2])
 Returns true iff A is a subset of B, otherwise false. More...
 
int Cardinality (int S[2])
 Returns the cardinality of a range S. More...
 
void FillNodesGhostArray (const int gridID, const int dataDescription, int GridExtent[6], int RealExtent[6], vtkUnsignedCharArray *nodeArray)
 Fills the ghost array for the nodes. More...
 
void FillCellsGhostArray (const int dataDescription, const int numNodesPerCell, int dims[3], int CellExtent[6], vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
 Fills the ghost array for the grid cells. More...
 
void SearchNeighbors (const int gridID, const int i, const int j, const int k, vtkIdList *neiList)
 Given a point (i,j,k) belonging to the grid corresponding to the given gridID, this method searches for the grids that this point is neighboring with. More...
 
void MarkNodeProperty (const int gridID, const int i, const int j, const int k, int ext[6], int RealExtent[6], unsigned char &pfield)
 Marks the node properties with the node with the given global i,j,k grid coordinates w.r.t. More...
 
void MarkCellProperty (unsigned char &pfield, unsigned char *nodeGhostFields, const int numNodes)
 Marks the cell property for the cell composed by the nodes with the given ghost fields. More...
 
void GetRealExtent (const int gridID, int GridExtent[6], int RealExtent[6])
 Given a grid extent, this method computes the RealExtent. More...
 
bool IsGhostNode (int GridExtent[6], int RealExtent[6], const int i, const int j, const int k)
 Checks if the node corresponding to the given global i,j,k coordinates is a ghost node or not. More...
 
bool IsNodeOnBoundaryOfExtent (const int i, const int j, const int k, int ext[6])
 Checks if the node corresponding to the given global i,j,k coordinates is on the boundary of the given extent. More...
 
bool IsNodeOnSharedBoundary (const int gridID, int RealExtent[6], const int i, const int j, const int k)
 Checks if the node corresponding to the given global i,j,k coordinates is on the shared boundary, i.e., a partition interface. More...
 
bool IsNodeOnBoundary (const int i, const int j, const int k)
 Checks if the node corresponding to the given global i,j,k coordinates touches the real boundaries of the domain given the whole extent. More...
 
bool IsNodeInterior (const int i, const int j, const int k, int GridExtent[6])
 Checks if the node, corresponding to the given global i,j,k coordinates is within the interior of the given global grid extent. More...
 
bool IsNodeWithinExtent (const int i, const int j, const int k, int GridExtent[6])
 Checks if the node corresponding to the given global i,j,k coordinates is within the given extent, inclusive of the extent bounds. More...
 
void SetNeighbors (const int i, const int j, int i2jOrientation[3], int j2iOrientation[3], int overlapExtent[6])
 Creates a neighbor from i-to-j and from j-to-i. More...
 
void DetermineNeighborOrientation (const int idx, int A[2], int B[2], int overlap[2], int orient[3])
 Given two overlapping extents A,B and the corresponding overlap extent this method computes A's relative neighboring orientation w.r.t to its neighbor, B. More...
 
void DetectNeighbors (const int i, const int j, int ex1[6], int ex2[6], int orientation[3], int ndim)
 Detects if the two extents, ex1 and ex2, corresponding to the grids with grid IDs i,j respectively, are neighbors, i.e, they either share a corner, an edge or a plane in 3-D. More...
 
int IntervalOverlap (int A[2], int B[2], int overlap[2])
 Checks if the intervals A,B overlap. More...
 
int DoPartialOverlap (int s[2], int S[2], int overlap[2])
 Checks if the internals s,S partially overlap where |s| < |S|. More...
 
int PartialOverlap (int A[2], const int CofA, int B[2], const int CofB, int overlap[2])
 Checks if the intervals A,B partially overlap. More...
 
void EstablishNeighbors (const int i, const int j)
 Establishes the neighboring information between the two grids corresponding to grid ids "i" and "j" with i < j. More...
 
void AcquireDataDescription ()
 Based on the user-supplied WholeExtent, this method determines the topology of the structured domain, e.g., VTK_XYZ_GRID, VTK_XY_PLANE, etc. More...
 
bool HasBlockConnection (const int gridID, const int blockDirection)
 Checks if the block corresponding to the given grid ID has a block adjacent to it in the given block direction. More...
 
void RemoveBlockConnection (const int gridID, const int blockDirection)
 Removes a block connection along the given direction for the block corresponding to the given gridID. More...
 
void AddBlockConnection (const int gridID, const int blockDirection)
 Adds a block connection along the given direction for the block corresponding to the given gridID. More...
 
void ClearBlockConnections (const int gridID)
 Clears all block connections for the block corresponding to the given grid ID. More...
 
int GetNumberOfConnectingBlockFaces (const int gridID)
 Returns the number of faces of the block corresponding to the given grid ID that are adjacent to at least one other block. More...
 
void SetBlockTopology (const int gridID)
 Sets the block topology connections for the grid corresponding to gridID. More...
 
void GetIJKBlockOrientation (const int i, const int j, const int k, int ext[6], int orientation[3])
 Given i-j-k coordinates and the grid defined by tis extent, ext, this method determines IJK orientation with respect to the block boundaries, i.e., the 6 block faces. More...
 
int Get1DOrientation (const int idx, const int ExtentLo, const int ExtentHi, const int OnLo, const int OnHi, const int NotOnBoundary)
 A helper method that computes the 1-D i-j-k orientation to facilitate the implementation of GetNodeBlockOrientation. More...
 
void CreateGhostedExtent (const int gridID, const int N)
 Creates the ghosted extent of the grid corresponding to the given gridID. More...
 
void GetGhostedExtent (int *ghostedExtent, int GridExtent[6], const int minIdx, const int maxIdx, const int N)
 Gets the ghosted extent from the given grid extent along the dimension given by minIdx and maxIdx. More...
 
void CreateGhostedMaskArrays (const int gridID)
 This method creates the ghosted mask arrays, i.e., the NodeGhostArrays and the CellGhostArrays for the grid corresponding to the given gridID. More...
 
void InitializeGhostData (const int gridID)
 This method initializes the ghost data according to the computed ghosted grid extent for the grid with the given grid ID. More...
 
void AllocatePointData (vtkPointData *RPD, const int N, vtkPointData *PD)
 Adds/creates all the arrays in the reference grid point data, RPD, to the user-supplied point data instance, PD, where the number of points is given by N. More...
 
void AllocateCellData (vtkCellData *RCD, const int N, vtkCellData *CD)
 Adds/creates all the arrays in the reference grid cell data, RCD, to the user-supplied cell data instance, CD, where the number of cells is given by N. More...
 
void TransferRegisteredDataToGhostedData (const int gridID)
 This method transfers the registered grid data to the corresponding ghosted grid data. More...
 
void ComputeNeighborSendAndRcvExtent (const int gridID, const int N)
 This method computes, the send and rcv extents for each neighbor of each grid. More...
 
void TransferLocalNeighborData (const int gridID, const vtkStructuredNeighbor &Neighor)
 This method transfers the fields. More...
 
void CopyCoordinates (vtkPoints *source, vtkIdType sourceIdx, vtkPoints *target, vtkIdType targetIdx)
 Copies the coordinates from the source points to the target points. More...
 
void CopyFieldData (vtkFieldData *source, vtkIdType sourceIdx, vtkFieldData *target, vtkIdType targetIdx)
 Loops through all arrays in the source and for each array, it copies the tuples from sourceIdx to the target at targetIdx. More...
 
int GetNeighborIndex (const int gridIdx, const int NeighborGridIdx)
 Given a global grid ID and the neighbor grid ID, this method returns the neighbor index w.r.t. More...
 
void PrintExtent (int extent[6])
 Prints the extent, used for debugging. More...
 
int GetNumberOfNodesPerCell (const int dim)
 Returns the number of nodes per cell according to the given dimension. More...
 
- Protected Member Functions inherited from vtkAbstractGridConnectivity
 vtkAbstractGridConnectivity ()
 
 ~vtkAbstractGridConnectivity () override
 
void RegisterGridGhostArrays (const int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
 Registers the ghostarrays for the given grid. More...
 
void RegisterFieldData (const int gridID, vtkPointData *PointData, vtkCellData *CellData)
 Registers the grid's field data, i.e., the node and cell data. More...
 
void RegisterGridNodes (const int gridID, vtkPoints *nodes)
 Registers the grid nodes for the grid associated with the given gridID. More...
 
void AllocateUserRegisterDataStructures ()
 Allocate/De-allocate the data-structures where the user-supplied grids will be registered. More...
 
void DeAllocateUserRegisterDataStructures ()
 Allocate/De-allocate the data-structures where the user-supplied grids will be registered. More...
 
void AllocateInternalDataStructures ()
 Allocated/De-allocate the data-structures where the ghosted grid data will be stored. More...
 
void DeAllocateInternalDataStructures ()
 Allocated/De-allocate the data-structures where the ghosted grid data will be stored. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkMultiProcessControllerController
 
int Rank
 
bool Initialized
 
std::vector< intGridRanks
 
std::vector< intGridIds
 
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::RequestMPIRequests
 
- Protected Attributes inherited from vtkStructuredGridConnectivity
int DataDimension
 
int DataDescription
 
int WholeExtent [6]
 
std::vector< intGridExtents
 
std::vector< intGhostedExtents
 
std::vector< unsigned char > BlockTopology
 
std::vector< std::vector< vtkStructuredNeighbor > > Neighbors
 
std::map< std::pair< int, int >, intNeighborPair2NeighborListIndex
 
- Protected Attributes inherited from vtkAbstractGridConnectivity
unsigned int NumberOfGrids
 
unsigned int NumberOfGhostLayers
 
std::vector< vtkUnsignedCharArray * > GridPointGhostArrays
 
std::vector< vtkUnsignedCharArray * > GridCellGhostArrays
 
std::vector< vtkPointData * > GridPointData
 
std::vector< vtkCellData * > GridCellData
 
std::vector< vtkPoints * > GridPoints
 
bool AllocatedGhostDataStructures
 
std::vector< vtkPointData * > GhostedGridPointData
 
std::vector< vtkCellData * > GhostedGridCellData
 
std::vector< vtkUnsignedCharArray * > GhostedPointGhostArray
 
std::vector< vtkUnsignedCharArray * > GhostedCellGhostArray
 
std::vector< vtkPoints * > GhostedGridPoints
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

vtkPStructuredGridConnectivity inherits from vtkStructuredGridConnectivity and implements functionality to compute the neighboring topology within a single, partitioned and distributed structured grid dataset.

Warning
Initialize(), ComputeNeighbors() and CreateGhostLayers() are collective operations, every process must call that method.
See also
vtkStructuredGridConnectivity
Tests:
vtkPStructuredGridConnectivity (Tests)

Definition at line 51 of file vtkPStructuredGridConnectivity.h.

Member Typedef Documentation

Definition at line 56 of file vtkPStructuredGridConnectivity.h.

Constructor & Destructor Documentation

vtkPStructuredGridConnectivity::vtkPStructuredGridConnectivity ( )
protected
vtkPStructuredGridConnectivity::~vtkPStructuredGridConnectivity ( )
overrideprotected

Member Function Documentation

static vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::New ( )
static
static vtkTypeBool vtkPStructuredGridConnectivity::IsTypeOf ( const char *  type)
static
virtual vtkTypeBool 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
virtual vtkObjectBase* vtkPStructuredGridConnectivity::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkStructuredGridConnectivity.

vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::NewInstance ( ) const
void vtkPStructuredGridConnectivity::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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)
overridevirtual

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 
)
overridevirtual
int vtkPStructuredGridConnectivity::GetNumberOfLocalGrids ( )
inline

Returns the number of local grids registers by the process that owns the current vtkPStructuredGridConnectivity instance.

Definition at line 86 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 563 of file vtkPStructuredGridConnectivity.h.

bool vtkPStructuredGridConnectivity::IsGridRemote ( const int  gridID)
inline

Returns true iff the grid is remote, otherwise false.

Definition at line 546 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 552 of file vtkPStructuredGridConnectivity.h.

void vtkPStructuredGridConnectivity::Initialize ( )

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 ( )
overridevirtual

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)
overridevirtual

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] 
)
inlineprotected

Returns true if the two extents are equal, otherwise false.

Definition at line 407 of file vtkPStructuredGridConnectivity.h.

bool vtkPStructuredGridConnectivity::HasPointData ( const int  gridIdx)
inlineprotected

Returns true iff the grid corresponding to the given ID has point data.

Definition at line 421 of file vtkPStructuredGridConnectivity.h.

bool vtkPStructuredGridConnectivity::HasCellData ( const int  gridIdx)
inlineprotected

Returns true iff the grid corresponding to the given ID has cell data.

Definition at line 436 of file vtkPStructuredGridConnectivity.h.

bool vtkPStructuredGridConnectivity::HasPoints ( const int  gridIdx)
inlineprotected

Returns true iff the grid corresponding to the given ID has points.

Definition at line 451 of file vtkPStructuredGridConnectivity.h.

void vtkPStructuredGridConnectivity::InitializeMessageCounters ( )
inlineprotected

Sets all message counters to 0.

Definition at line 465 of file vtkPStructuredGridConnectivity.h.

void vtkPStructuredGridConnectivity::ClearRemoteData ( )
inlineprotected

Clears all internal VTK data-structures that are used to store the remote ghost data.

Definition at line 500 of file vtkPStructuredGridConnectivity.h.

void vtkPStructuredGridConnectivity::ClearRawBuffers ( )
inlineprotected

Clears all raw send/rcv buffers.

Definition at line 471 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)
overrideprotectedvirtual

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.

Member Data Documentation

vtkMultiProcessController* vtkPStructuredGridConnectivity::Controller
protected

Definition at line 131 of file vtkPStructuredGridConnectivity.h.

int vtkPStructuredGridConnectivity::Rank
protected

Definition at line 132 of file vtkPStructuredGridConnectivity.h.

bool vtkPStructuredGridConnectivity::Initialized
protected

Definition at line 133 of file vtkPStructuredGridConnectivity.h.

std::vector< int > vtkPStructuredGridConnectivity::GridRanks
protected

Definition at line 135 of file vtkPStructuredGridConnectivity.h.

std::vector< int > vtkPStructuredGridConnectivity::GridIds
protected

Definition at line 136 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< vtkPoints* > > vtkPStructuredGridConnectivity::RemotePoints
protected

Definition at line 141 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< vtkPointData* > > vtkPStructuredGridConnectivity::RemotePointData
protected

Definition at line 142 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< vtkCellData* > > vtkPStructuredGridConnectivity::RemoteCellData
protected

Definition at line 143 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< unsigned int > > vtkPStructuredGridConnectivity::SendBufferSizes
protected

Definition at line 148 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< unsigned int > > vtkPStructuredGridConnectivity::RcvBufferSizes
protected

Definition at line 149 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< unsigned char* > > vtkPStructuredGridConnectivity::SendBuffers
protected

Definition at line 150 of file vtkPStructuredGridConnectivity.h.

std::vector< std::vector< unsigned char* > > vtkPStructuredGridConnectivity::RcvBuffers
protected

Definition at line 151 of file vtkPStructuredGridConnectivity.h.

int vtkPStructuredGridConnectivity::TotalNumberOfSends
protected

Definition at line 153 of file vtkPStructuredGridConnectivity.h.

int vtkPStructuredGridConnectivity::TotalNumberOfRcvs
protected

Definition at line 154 of file vtkPStructuredGridConnectivity.h.

int vtkPStructuredGridConnectivity::TotalNumberOfMsgs
protected

Definition at line 155 of file vtkPStructuredGridConnectivity.h.

vtkMPICommunicator::Request* vtkPStructuredGridConnectivity::MPIRequests
protected

Definition at line 158 of file vtkPStructuredGridConnectivity.h.


The documentation for this class was generated from the following file: