VTK  9.3.20240417
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 (unsigned int N) override
 Sets the total number of domains distributed among processors. More...
 
void RegisterGrid (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 (int gridID)
 Returns the rank of the given gridID. More...
 
bool IsGridRemote (int gridID)
 Returns true iff the grid is remote, otherwise false. More...
 
bool IsGridLocal (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...
 
void CreateGhostLayers (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 (int gridID, int extent[6])
 Returns the grid extent of the grid corresponding to the given grid ID. More...
 
void SetGhostedGridExtent (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 (int gridID, int ext[6])
 Returns the ghosted grid extent for the block corresponding the. More...
 
int GetNumberOfNeighbors (int gridID)
 Returns the number of neighbors for the grid corresponding to the given grid ID. More...
 
vtkStructuredNeighbor GetGridNeighbor (int gridID, int nei)
 Returns the neighbor corresponding to the index nei for the grid with the given (global) grid ID. More...
 
vtkIdListGetNeighbors (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 (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 int * GetWholeExtent ()
 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 (int gridID)
 Returns the ghosted points ghost array for the grid associated with the given grid ID. More...
 
vtkUnsignedCharArrayGetGhostedCellGhostArray (int gridID)
 Returns the ghosted cells ghost array for the grid associated with the given grid ID. More...
 
vtkPointDataGetGhostedGridPointData (int gridID)
 Returns the ghosted grid point data for the grid associated with the given grid ID. More...
 
vtkCellDataGetGhostedGridCellData (int gridID)
 Returns the ghosted grid cell data for the grid associated with the given grid ID. More...
 
vtkPointsGetGhostedPoints (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)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output. More...
 
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...
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes. More...
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). 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...
 
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...
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space. 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...
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not. 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 (vtkTypeBool 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 vtkTypeBool 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 vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. 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 (int gridIdx)
 Returns true iff the grid corresponding to the given ID has point data. More...
 
bool HasCellData (int gridIdx)
 Returns true iff the grid corresponding to the given ID has cell data. More...
 
bool HasPoints (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 (int gridID, int extents[6], int process)
 Registers a remote grid with the given grid Id, structured extents and process. More...
 
void TransferRemoteNeighborData (int gridIdx, 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...
 
void TransferGhostDataFromNeighbors (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, 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 (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 (int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to serialize ghost point data. More...
 
void SerializeGhostCellData (int gridIdx, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to serialize ghost cell data. More...
 
void DeserializeGhostPoints (int gridIdx, 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, int dataType, int numberOfTuples, 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 (int gridIdx, int nei, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to de-serialize the ghost point data received from a remote process. More...
 
void DeserializeGhostCellData (int gridIdx, int nei, int ext[6], vtkMultiProcessStream &bytestream)
 Helper method to de-serialize the ghost cell data received from a remote process. More...
 
void SerializeGhostData (int sndGridID, 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 (int gridID, int neiListID, 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, 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 (int idx, int Lo, int Hi)
 Returns true iff Lo <= idx <= Hi, otherwise false. More...
 
bool StrictlyInsideBounds (int idx, int Lo, 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 (int gridID, int dataDescription, int GridExtent[6], int RealExtent[6], vtkUnsignedCharArray *nodesArray)
 Fills the ghost array for the nodes. More...
 
void FillCellsGhostArray (int dataDescription, int numNodesPerCell, int dims[3], int CellExtent[6], vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
 Fills the ghost array for the grid cells. More...
 
void SearchNeighbors (int gridID, int i, int j, 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 (int gridID, int i, int j, 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, int numNodes)
 Marks the cell property for the cell composed by the nodes with the given ghost fields. More...
 
void GetRealExtent (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], int i, int j, int k)
 Checks if the node corresponding to the given global i,j,k coordinates is a ghost node or not. More...
 
bool IsNodeOnBoundaryOfExtent (int i, int j, 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 (int gridID, int RealExtent[6], int i, int j, 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 (int i, int j, 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 (int i, int j, 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 (int i, int j, 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 (int i, 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 (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 (int i, 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], int CardinalityOfA, int B[2], int CardinalityOfB, int overlap[2])
 Checks if the intervals A,B partially overlap. More...
 
void EstablishNeighbors (int i, 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 (int gridID, 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 (int gridID, int blockDirection)
 Removes a block connection along the given direction for the block corresponding to the given gridID. More...
 
void AddBlockConnection (int gridID, int blockDirection)
 Adds a block connection along the given direction for the block corresponding to the given gridID. More...
 
void ClearBlockConnections (int gridID)
 Clears all block connections for the block corresponding to the given grid ID. More...
 
int GetNumberOfConnectingBlockFaces (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 (int gridID)
 Sets the block topology connections for the grid corresponding to gridID. More...
 
void GetIJKBlockOrientation (int i, int j, 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 (int idx, int ExtentLo, int ExtentHi, int OnLo, int OnHi, int NotOnBoundary)
 A helper method that computes the 1-D i-j-k orientation to facilitate the implementation of GetNodeBlockOrientation. More...
 
void CreateGhostedExtent (int gridID, int N)
 Creates the ghosted extent of the grid corresponding to the given gridID. More...
 
void GetGhostedExtent (int *ghostedExtent, int GridExtent[6], int minIdx, int maxIdx, int N)
 Gets the ghosted extent from the given grid extent along the dimension given by minIdx and maxIdx. More...
 
void CreateGhostedMaskArrays (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 (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, 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, 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 (int gridID)
 This method transfers the registered grid data to the corresponding ghosted grid data. More...
 
void ComputeNeighborSendAndRcvExtent (int gridID, int N)
 This method computes, the send and rcv extents for each neighbor of each grid. More...
 
void TransferLocalNeighborData (int gridID, const vtkStructuredNeighbor &Neighbor)
 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 (int gridIdx, 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 (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 (int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
 Registers the ghostarrays for the given grid. More...
 
void RegisterFieldData (int gridID, vtkPointData *PointData, vtkCellData *CellData)
 Registers the grid's field data, i.e., the node and cell data. More...
 
void RegisterGridNodes (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 ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkMultiProcessControllerController
 
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::RequestMPIRequests
 
- Protected Attributes inherited from vtkStructuredGridConnectivity
int DataDimension
 
int DataDescription
 
int WholeExtent [6]
 
std::vector< int > GridExtents
 
std::vector< int > GhostedExtents
 
std::vector< unsigned char > BlockTopology
 
std::vector< std::vector< vtkStructuredNeighbor > > Neighbors
 
std::map< std::pair< int, int >, int > NeighborPair2NeighborListIndex
 
- 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
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

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 40 of file vtkPStructuredGridConnectivity.h.

Member Typedef Documentation

◆ Superclass

Definition at line 45 of file vtkPStructuredGridConnectivity.h.

Constructor & Destructor Documentation

◆ vtkPStructuredGridConnectivity()

vtkPStructuredGridConnectivity::vtkPStructuredGridConnectivity ( )
protected

◆ ~vtkPStructuredGridConnectivity()

vtkPStructuredGridConnectivity::~vtkPStructuredGridConnectivity ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkPStructuredGridConnectivity::IsTypeOf ( const char *  type)
static

◆ IsA()

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.

◆ SafeDownCast()

static vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkPStructuredGridConnectivity::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkStructuredGridConnectivity.

◆ NewInstance()

vtkPStructuredGridConnectivity* vtkPStructuredGridConnectivity::NewInstance ( ) const

◆ PrintSelf()

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.

◆ SetController()

virtual void vtkPStructuredGridConnectivity::SetController ( vtkMultiProcessController )
virtual

Set & Get the process controller.

◆ GetController()

virtual vtkMultiProcessController* vtkPStructuredGridConnectivity::GetController ( )
virtual

Set & Get the process controller.

◆ SetNumberOfGrids()

void vtkPStructuredGridConnectivity::SetNumberOfGrids ( unsigned int  N)
overridevirtual

Sets the total number of domains distributed among processors.

Reimplemented from vtkStructuredGridConnectivity.

◆ RegisterGrid()

void vtkPStructuredGridConnectivity::RegisterGrid ( int  gridID,
int  extents[6],
vtkUnsignedCharArray nodesGhostArray,
vtkUnsignedCharArray cellGhostArray,
vtkPointData pointData,
vtkCellData cellData,
vtkPoints gridNodes 
)
overridevirtual

◆ GetNumberOfLocalGrids()

int vtkPStructuredGridConnectivity::GetNumberOfLocalGrids ( )
inline

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

Definition at line 72 of file vtkPStructuredGridConnectivity.h.

◆ GetGridRank()

int vtkPStructuredGridConnectivity::GetGridRank ( 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 527 of file vtkPStructuredGridConnectivity.h.

◆ IsGridRemote()

bool vtkPStructuredGridConnectivity::IsGridRemote ( int  gridID)
inline

Returns true iff the grid is remote, otherwise false.

Definition at line 510 of file vtkPStructuredGridConnectivity.h.

◆ IsGridLocal()

bool vtkPStructuredGridConnectivity::IsGridLocal ( int  gridID)
inline

Returns true iff the grid corresponding to the given gridID is local.

Definition at line 516 of file vtkPStructuredGridConnectivity.h.

◆ Initialize()

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.

◆ ComputeNeighbors()

void vtkPStructuredGridConnectivity::ComputeNeighbors ( )
overridevirtual

Computes the neighboring topology of a distributed structured grid data-set.

See vtkStructuredGridConnectivity::ComputeNeighbors

Reimplemented from vtkStructuredGridConnectivity.

◆ CreateGhostLayers()

void vtkPStructuredGridConnectivity::CreateGhostLayers ( 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.

◆ GridExtentsAreEqual()

bool vtkPStructuredGridConnectivity::GridExtentsAreEqual ( int  rhs[6],
int  lhs[6] 
)
inlineprotected

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

Definition at line 372 of file vtkPStructuredGridConnectivity.h.

◆ HasPointData()

bool vtkPStructuredGridConnectivity::HasPointData ( int  gridIdx)
inlineprotected

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

Definition at line 385 of file vtkPStructuredGridConnectivity.h.

◆ HasCellData()

bool vtkPStructuredGridConnectivity::HasCellData ( int  gridIdx)
inlineprotected

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

Definition at line 400 of file vtkPStructuredGridConnectivity.h.

◆ HasPoints()

bool vtkPStructuredGridConnectivity::HasPoints ( int  gridIdx)
inlineprotected

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

Definition at line 415 of file vtkPStructuredGridConnectivity.h.

◆ InitializeMessageCounters()

void vtkPStructuredGridConnectivity::InitializeMessageCounters ( )
inlineprotected

Sets all message counters to 0.

Definition at line 429 of file vtkPStructuredGridConnectivity.h.

◆ ClearRemoteData()

void vtkPStructuredGridConnectivity::ClearRemoteData ( )
inlineprotected

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

Definition at line 464 of file vtkPStructuredGridConnectivity.h.

◆ ClearRawBuffers()

void vtkPStructuredGridConnectivity::ClearRawBuffers ( )
inlineprotected

Clears all raw send/rcv buffers.

Definition at line 435 of file vtkPStructuredGridConnectivity.h.

◆ RegisterRemoteGrid()

void vtkPStructuredGridConnectivity::RegisterRemoteGrid ( int  gridID,
int  extents[6],
int  process 
)
protected

Registers a remote grid with the given grid Id, structured extents and process.

◆ TransferRemoteNeighborData()

void vtkPStructuredGridConnectivity::TransferRemoteNeighborData ( int  gridIdx,
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.

◆ TransferGhostDataFromNeighbors()

void vtkPStructuredGridConnectivity::TransferGhostDataFromNeighbors ( 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.

◆ PackGhostData()

void vtkPStructuredGridConnectivity::PackGhostData ( )
protected

Helper method to pack all the ghost data into send buffers.

◆ UnpackGhostData()

void vtkPStructuredGridConnectivity::UnpackGhostData ( )
protected

Helper method to unpack the raw ghost data from the receive buffers in to the VTK remote point data-structures.

◆ DeserializeBufferSizesForProcess()

void vtkPStructuredGridConnectivity::DeserializeBufferSizesForProcess ( int *  buffersizes,
vtkIdType  N,
int  processId 
)
protected

Helper method to deserialize the buffer sizes coming from the given process.

◆ SerializeBufferSizes()

void vtkPStructuredGridConnectivity::SerializeBufferSizes ( int *&  sizesbuf,
vtkIdType N 
)
protected

Helper method to serialize the buffer sizes for the grids of this process to neighboring grids.

◆ ExchangeBufferSizes()

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.

◆ ExchangeGhostDataInit()

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.

◆ PostReceives()

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.

◆ PostSends()

void vtkPStructuredGridConnectivity::PostSends ( )
protected

Helper method to communicate ghost data.

Loops through the neighbors and for every remote neighbor posts a non-blocking send.

◆ CommunicateGhostData()

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.

◆ ExchangeGhostDataPost()

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.

◆ ExchangeGhostData()

void vtkPStructuredGridConnectivity::ExchangeGhostData ( )
protected

Exchanges ghost data of the grids owned by this process.

◆ SerializeGhostPoints()

void vtkPStructuredGridConnectivity::SerializeGhostPoints ( int  gridIdx,
int  ext[6],
vtkMultiProcessStream bytestream 
)
protected

Helper method to serialize the ghost points to send to a remote process.

Called from SerializeGhostData.

◆ SerializeDataArray()

void vtkPStructuredGridConnectivity::SerializeDataArray ( vtkDataArray dataArray,
vtkMultiProcessStream bytestream 
)
protected

Serializes the data array into a bytestream.

◆ SerializeFieldData()

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.

◆ SerializeGhostPointData()

void vtkPStructuredGridConnectivity::SerializeGhostPointData ( int  gridIdx,
int  ext[6],
vtkMultiProcessStream bytestream 
)
protected

Helper method to serialize ghost point data.

Called from SerializeGhostData.

◆ SerializeGhostCellData()

void vtkPStructuredGridConnectivity::SerializeGhostCellData ( int  gridIdx,
int  ext[6],
vtkMultiProcessStream bytestream 
)
protected

Helper method to serialize ghost cell data.

Called from SerializeGhostData.

◆ DeserializeGhostPoints()

void vtkPStructuredGridConnectivity::DeserializeGhostPoints ( int  gridIdx,
int  nei,
int  ext[6],
vtkMultiProcessStream bytestream 
)
protected

Helper method to de-serialize the ghost points received from a remote process.

Called from DeserializeGhostData.

◆ DeserializeDataArray()

void vtkPStructuredGridConnectivity::DeserializeDataArray ( vtkDataArray *&  dataArray,
int  dataType,
int  numberOfTuples,
int  numberOfComponents,
vtkMultiProcessStream bytestream 
)
protected

Helper method to deserialize the data array from a bytestream.

◆ DeserializeFieldData()

void vtkPStructuredGridConnectivity::DeserializeFieldData ( int  ext[6],
vtkFieldData fieldData,
vtkMultiProcessStream bytestream 
)
protected

Helper method to de-serialize field data.

Called from DeserializeGhostPointData and DeserializeGhostCellData.

◆ DeserializeGhostPointData()

void vtkPStructuredGridConnectivity::DeserializeGhostPointData ( int  gridIdx,
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.

◆ DeserializeGhostCellData()

void vtkPStructuredGridConnectivity::DeserializeGhostCellData ( int  gridIdx,
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.

◆ SerializeGhostData()

void vtkPStructuredGridConnectivity::SerializeGhostData ( int  sndGridID,
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().

◆ DeserializeGhostData()

void vtkPStructuredGridConnectivity::DeserializeGhostData ( int  gridID,
int  neiListID,
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.

◆ ExchangeGridExtents()

void vtkPStructuredGridConnectivity::ExchangeGridExtents ( )
protected

Exchanges the grid extents among all processes and fully populates the GridExtents vector.

◆ SerializeGridExtents()

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.

◆ DeserializeGridExtentForProcess()

void vtkPStructuredGridConnectivity::DeserializeGridExtentForProcess ( int *  rcvbuffer,
vtkIdType N,
int  processId 
)
protected

Deserializes the received grid extent information to the GridExtents internal data-structures.

Member Data Documentation

◆ Controller

vtkMultiProcessController* vtkPStructuredGridConnectivity::Controller
protected

Definition at line 116 of file vtkPStructuredGridConnectivity.h.

◆ Rank

int vtkPStructuredGridConnectivity::Rank
protected

Definition at line 117 of file vtkPStructuredGridConnectivity.h.

◆ Initialized

bool vtkPStructuredGridConnectivity::Initialized
protected

Definition at line 118 of file vtkPStructuredGridConnectivity.h.

◆ GridRanks

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

Definition at line 120 of file vtkPStructuredGridConnectivity.h.

◆ GridIds

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

Definition at line 121 of file vtkPStructuredGridConnectivity.h.

◆ RemotePoints

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

Definition at line 126 of file vtkPStructuredGridConnectivity.h.

◆ RemotePointData

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

Definition at line 127 of file vtkPStructuredGridConnectivity.h.

◆ RemoteCellData

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

Definition at line 128 of file vtkPStructuredGridConnectivity.h.

◆ SendBufferSizes

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

Definition at line 133 of file vtkPStructuredGridConnectivity.h.

◆ RcvBufferSizes

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

Definition at line 134 of file vtkPStructuredGridConnectivity.h.

◆ SendBuffers

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

Definition at line 135 of file vtkPStructuredGridConnectivity.h.

◆ RcvBuffers

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

Definition at line 136 of file vtkPStructuredGridConnectivity.h.

◆ TotalNumberOfSends

int vtkPStructuredGridConnectivity::TotalNumberOfSends
protected

Definition at line 138 of file vtkPStructuredGridConnectivity.h.

◆ TotalNumberOfRcvs

int vtkPStructuredGridConnectivity::TotalNumberOfRcvs
protected

Definition at line 139 of file vtkPStructuredGridConnectivity.h.

◆ TotalNumberOfMsgs

int vtkPStructuredGridConnectivity::TotalNumberOfMsgs
protected

Definition at line 140 of file vtkPStructuredGridConnectivity.h.

◆ MPIRequests

vtkMPICommunicator::Request* vtkPStructuredGridConnectivity::MPIRequests
protected

Definition at line 143 of file vtkPStructuredGridConnectivity.h.


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