VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPUnstructuredGridConnectivity Class Reference

#include <vtkPUnstructuredGridConnectivity.h>

Inheritance diagram for vtkPUnstructuredGridConnectivity:
Inheritance graph
[legend]
Collaboration diagram for vtkPUnstructuredGridConnectivity:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkPUnstructuredGridConnectivityNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void RegisterGrid (vtkUnstructuredGrid *gridPtr)
void BuildGhostZoneConnectivity ()
void UpdateGhosts ()
virtual void SetController (vtkMPIController *)
virtual vtkMPIControllerGetController ()
virtual void SetGlobalIDFieldName (const char *)
virtual char * GetGlobalIDFieldName ()
virtual vtkUnstructuredGridGetGhostedGrid ()

Static Public Member Functions

static
vtkPUnstructuredGridConnectivity
New ()
static int IsTypeOf (const char *type)
static
vtkPUnstructuredGridConnectivity
SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPUnstructuredGridConnectivity ()
virtual ~vtkPUnstructuredGridConnectivity ()
void DeSerializeGhostZones ()
void CreatePersistentRcvBuffers ()
void SerializeGhostZones ()
void SynchLocalData ()
void BuildGhostedGridAndCommLists ()
void WriteUnstructuredGrid (vtkUnstructuredGrid *grid, const char *fileName)
void ExtractSurfaceMesh ()
void MarkFaces ()
bool IsCellOnBoundary (vtkIdType *cellNodes, vtkIdType N)
void ExchangeBoundaryGrids ()
void ExchangeBoundaryGridSizes (int size)
void BoundingBoxCollision ()
void ExchangeGridBounds ()
void ExtractBoundaryGrid ()
void FillGhostZoneCells (const int neiRank, vtkCellData *ghostData, vtkIdType *cellIdx, const unsigned int numGhostCells)
void FillGhostZoneNodes (const int neiRank, vtkPointData *ghostData, vtkIdType *globalIdx, const unsigned int numGhostNodes)
void EnqueueNodeLinks (const int rmtRank, const vtkIdType ghostCell, const vtkIdType adjCell, vtkIdList *shared)
bool IsCellConnected (vtkCell *c, vtkIdType *globalId, const vtkIdType N, vtkIdType &adjCell, vtkIdList *sharedIds)
void InsertGhostCellNodes (vtkCell *ghostCell, vtkIdTypeArray *ghostGridGlobalIdx, vtkIdType *globalIdArray, vtkUnstructuredGrid *bGrid, vtkIdType *cellPts)
void ProcessRemoteGrid (const int rmtRank, vtkUnstructuredGrid *bGrid)
void SerializeUnstructuredGrid (vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
void DeSerializeUnstructuredGrid (vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
void ExtractBoundaryCell (const vtkIdType cellIdx, const vtkIdType numCellNodes, vtkIdType *cellNodes, vtkPoints *nodes, vtkIdTypeArray *localIdx, vtkIdTypeArray *globaIdx)

Protected Attributes

char * GlobalIDFieldName
vtkUnstructuredGridInputGrid
vtkUnstructuredGridGhostedGrid
vtkMPIControllerController
vtk::details::GridInfo * AuxiliaryData
vtk::details::CommunicationLinks * CommLists

Detailed Description

vtkPUnstructuredGridConnectivity implements functionality for generating ghost zones for a distributed unstructured grid. Generating ghost zones is implemented in two stages. First, we build the ghost zones, which amounts to building the connectivity of the ghosted grid and communication links, and second, we update the ghost zones by communicating the fields on the ghost cells and nodes. The main steps involved in this process are as follows:

  1. Each process computes a bounding box of the grid it owns.
  2. The bounding boxes are then distributed to all processes by an AllGather collective call.
  3. Each process loops through the list of bounding boxes and computes box intersections with its local bounding box.
  4. The list of intersecting bounding boxes, yields an abbreviated list of candidate neighbors.
  5. Given the local grid, each process then extracts the boundary grid, which consists of nodes/cells on the boundary, global node IDs and the local cell IDs w.r.t. the local grid.
  6. Boundary grids are then exchanged among candidate neighbors using point-to-point communication.
  7. Next, each process constructs the topology of the ghost zones and communication links, using the local boundary grid and the list of remote boundary grids.
  8. The communication links store a source/target pair for nodes/cells among connected grids and remain persistent in memory.
  9. Last, the fields (node- and/or cell-centered) are updated, using point-to-point communication by processing the communication links.
Warning:
  • The code currently assumes one grid per rank.
  • GlobalID information must be available.
  • The grid must be globally conforming, i.e., no hanging nodes.
  • Only topologically face-adjacent ghost cells are considered.
  • PointData and CellData must match across partitions/processes.
See also:
vtkPUnstructuredGridGhostDataGenerator
Tests:
vtkPUnstructuredGridConnectivity (Tests)

Definition at line 94 of file vtkPUnstructuredGridConnectivity.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 99 of file vtkPUnstructuredGridConnectivity.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

static int vtkPUnstructuredGridConnectivity::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkPUnstructuredGridConnectivity::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 vtkObject.

Reimplemented from vtkObject.

Reimplemented from vtkObject.

Reimplemented from vtkObject.

void vtkPUnstructuredGridConnectivity::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Set/Get the underlying MPI controller used for communication.

Set/Get the underlying MPI controller used for communication.

virtual void vtkPUnstructuredGridConnectivity::SetGlobalIDFieldName ( const char *  ) [virtual]

Set/Get the name of the GlobalID field. By default, "GlobalID" is assumed.

Set/Get the name of the GlobalID field. By default, "GlobalID" is assumed.

Returns the ghosted grid.

Registers the grid in this process

Builds the ghost-zone connectivity. This method sets up the necessary communication lists for updating the ghost zones. NOTE: the local grid, must be registered, by calling RegisterGrid(), prior to calling this method.

Exchanges ghost zone data (i.e., node-centered or cell-centered fields). NOTE: This method must be called after BuildGhostZoneConnectivity.

void vtkPUnstructuredGridConnectivity::FillGhostZoneCells ( const int  neiRank,
vtkCellData ghostData,
vtkIdType cellIdx,
const unsigned int  numGhostCells 
) [protected]

Given the deserialized cell-centered ghost data from the given neighboring rank, this method fills in the cell-centered fields of the ghost zone.

void vtkPUnstructuredGridConnectivity::FillGhostZoneNodes ( const int  neiRank,
vtkPointData ghostData,
vtkIdType globalIdx,
const unsigned int  numGhostNodes 
) [protected]

Given the deserialized node-centered ghost data from the given neighboring rank, this method fills in the node-centered fields of the ghost zone.

Deserializes the raw buffers received from each neighboring rank and updates the ghosted grid instance by filling in the values for the ghost zones.

This method exchanges the buffer sizes among neighboring processes and allocates a persistent buffer for the communication. This exchange and memory allocation happens only the first time the data is exchanged

This method serializes the local data (node-centered and/or cell-centered) for each rank that this process/grid communicates with.

Synchs the data on the input grid in this process to the ghosted grid instance.

void vtkPUnstructuredGridConnectivity::EnqueueNodeLinks ( const int  rmtRank,
const vtkIdType  ghostCell,
const vtkIdType  adjCell,
vtkIdList shared 
) [protected]

Loops through the nodes of the ghost cell and the local adjacent cell and determines what

bool vtkPUnstructuredGridConnectivity::IsCellConnected ( vtkCell c,
vtkIdType globalId,
const vtkIdType  N,
vtkIdType adjCell,
vtkIdList sharedIds 
) [protected]

Given the cell, c, this method checks if it is connected to the grid assigned to this process. The method will return -1, if the cell is not connected. If the cell is connected, adjCell will hold the cell index of the cell w.r.t. the input grid that the ghost cell is face-adjacent to as well as the shared global Ids of the face between the ghost and the face-adjacent, boundary cell.

void vtkPUnstructuredGridConnectivity::InsertGhostCellNodes ( vtkCell ghostCell,
vtkIdTypeArray ghostGridGlobalIdx,
vtkIdType globalIdArray,
vtkUnstructuredGrid bGrid,
vtkIdType cellPts 
) [protected]

Inserts the ghost cell nodes in to the ghosted instance of the grid.

void vtkPUnstructuredGridConnectivity::ProcessRemoteGrid ( const int  rmtRank,
vtkUnstructuredGrid bGrid 
) [protected]

Process the remote boundary grid and injects cells in to the ghosted grid if a match is found.

Builds the ghosted grid and communication lists

Serializes the unstructured grid into a bytestream.

De-serializes the unstructured grid from the given bytestream.

void vtkPUnstructuredGridConnectivity::WriteUnstructuredGrid ( vtkUnstructuredGrid grid,
const char *  fileName 
) [protected]

Writes the given unstructured grid to an ASCII file. NOTE: Used for debugging.

Loops through the auxiliary FaceList, constructed in MarkFaces, and extracts the faces and nodes on the boundary.

Loops through the input grid cell faces and updates the auxiliary data-structures to associates a count with each face.

void vtkPUnstructuredGridConnectivity::ExtractBoundaryCell ( const vtkIdType  cellIdx,
const vtkIdType  numCellNodes,
vtkIdType cellNodes,
vtkPoints nodes,
vtkIdTypeArray localIdx,
vtkIdTypeArray globaIdx 
) [protected]

Extracts the boundary cell from the input grid and inserts it in to the boundary grid.

bool vtkPUnstructuredGridConnectivity::IsCellOnBoundary ( vtkIdType cellNodes,
vtkIdType  N 
) [protected]

Checks if the cell, composed by the supplied nodes, is on the boundary. A cell is on the boundary iff any of its nodes touch the boundary.

Exchanged the boundary grids among candidate ranks.

Exchange boundary grid sizes

Collides the bounds of this process with the bounding boxes of all other processes. The processes whose bounding boxes intersect yield the list of candidate ranks with which boundary grids will be exchanged.

Exchanges the grid bounds of this process with all other processes. Upon completion, each process will have the global grid bounds of every process.

Extracts the boundary grid geometry from the input grid. Note: this method only extract the mesh and global/local ID information.


Member Data Documentation

Definition at line 138 of file vtkPUnstructuredGridConnectivity.h.

Definition at line 139 of file vtkPUnstructuredGridConnectivity.h.

Definition at line 140 of file vtkPUnstructuredGridConnectivity.h.

Definition at line 141 of file vtkPUnstructuredGridConnectivity.h.

vtk::details::GridInfo* vtkPUnstructuredGridConnectivity::AuxiliaryData [protected]

Definition at line 144 of file vtkPUnstructuredGridConnectivity.h.

vtk::details::CommunicationLinks* vtkPUnstructuredGridConnectivity::CommLists [protected]

Definition at line 145 of file vtkPUnstructuredGridConnectivity.h.


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