VTK
|
vtkPUnstructuredGridConnectivity implements functionality for generating ghost zones for a distributed unstructured grid. More...
#include <vtkPUnstructuredGridConnectivity.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkPUnstructuredGridConnectivity * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
void | RegisterGrid (vtkUnstructuredGrid *gridPtr) |
Registers the grid in this process. More... | |
void | BuildGhostZoneConnectivity () |
Builds the ghost-zone connectivity. More... | |
void | UpdateGhosts () |
Exchanges ghost zone data (i.e., node-centered or cell-centered fields). More... | |
virtual void | SetController (vtkMPIController *) |
Set/Get the underlying MPI controller used for communication. More... | |
virtual vtkMPIController * | GetController () |
Set/Get the underlying MPI controller used for communication. More... | |
virtual void | SetGlobalIDFieldName (const char *) |
Set/Get the name of the GlobalID field. More... | |
virtual char * | GetGlobalIDFieldName () |
Set/Get the name of the GlobalID field. More... | |
virtual vtkUnstructuredGrid * | GetGhostedGrid () |
Returns the ghosted grid. More... | |
![]() | |
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 () |
int | HasObserver (unsigned long event) |
int | 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... | |
vtkCommand * | GetCommand (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... | |
int | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | 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... | |
![]() | |
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 vtkPUnstructuredGridConnectivity * | New () |
static int | IsTypeOf (const char *type) |
static vtkPUnstructuredGridConnectivity * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static vtkObject * | New () |
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 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 vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkPUnstructuredGridConnectivity () | |
virtual | ~vtkPUnstructuredGridConnectivity () |
void | FillGhostZoneCells (const int neiRank, vtkCellData *ghostData, vtkIdType *cellIdx, const unsigned int numGhostCells) |
Given the deserialized cell-centered ghost data from the given neighboring rank, this method fills in the cell-centered fields of the ghost zone. More... | |
void | FillGhostZoneNodes (const int neiRank, vtkPointData *ghostData, vtkIdType *globalIdx, const unsigned int numGhostNodes) |
Given the deserialized node-centered ghost data from the given neighboring rank, this method fills in the node-centered fields of the ghost zone. More... | |
void | DeSerializeGhostZones () |
Deserializes the raw buffers received from each neighboring rank and updates the ghosted grid instance by filling in the values for the ghost zones. More... | |
void | CreatePersistentRcvBuffers () |
This method exchanges the buffer sizes among neighboring processes and allocates a persistent buffer for the communication. More... | |
void | SerializeGhostZones () |
This method serializes the local data (node-centered and/or cell-centered) for each rank that this process/grid communicates with. More... | |
void | SynchLocalData () |
Synchs the data on the input grid in this process to the ghosted grid instance. More... | |
void | EnqueueNodeLinks (const int rmtRank, const vtkIdType ghostCell, const vtkIdType adjCell, vtkIdList *shared) |
Loops through the nodes of the ghost cell and the local adjacent cell and determines what. More... | |
bool | IsCellConnected (vtkCell *c, vtkIdType *globalId, const vtkIdType N, vtkIdType &adjCell, vtkIdList *sharedIds) |
Given the cell, c, this method checks if it is connected to the grid assigned to this process. More... | |
void | InsertGhostCellNodes (vtkCell *ghostCell, vtkIdTypeArray *ghostGridGlobalIdx, vtkIdType *globalIdArray, vtkUnstructuredGrid *bGrid, vtkIdType *cellPts) |
Inserts the ghost cell nodes in to the ghosted instance of the grid. More... | |
void | ProcessRemoteGrid (const int rmtRank, vtkUnstructuredGrid *bGrid) |
Process the remote boundary grid and injects cells in to the ghosted grid if a match is found. More... | |
void | BuildGhostedGridAndCommLists () |
Builds the ghosted grid and communication lists. More... | |
void | SerializeUnstructuredGrid (vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream) |
Serializes the unstructured grid into a bytestream. More... | |
void | DeSerializeUnstructuredGrid (vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream) |
De-serializes the unstructured grid from the given bytestream. More... | |
void | WriteUnstructuredGrid (vtkUnstructuredGrid *grid, const char *fileName) |
Writes the given unstructured grid to an ASCII file. More... | |
void | ExtractSurfaceMesh () |
Loops through the auxiliary FaceList, constructed in MarkFaces, and extracts the faces and nodes on the boundary. More... | |
void | MarkFaces () |
Loops through the input grid cell faces and updates the auxiliary data-structures to associates a count with each face. More... | |
void | ExtractBoundaryCell (const vtkIdType cellIdx, const vtkIdType numCellNodes, vtkIdType *cellNodes, vtkPoints *nodes, vtkIdTypeArray *localIdx, vtkIdTypeArray *globaIdx) |
Extracts the boundary cell from the input grid and inserts it in to the boundary grid. More... | |
bool | IsCellOnBoundary (vtkIdType *cellNodes, vtkIdType N) |
Checks if the cell, composed by the supplied nodes, is on the boundary. More... | |
void | ExchangeBoundaryGrids () |
Exchanged the boundary grids among candidate ranks. More... | |
void | ExchangeBoundaryGridSizes (int size) |
Exchange boundary grid sizes. More... | |
void | BoundingBoxCollision () |
Collides the bounds of this process with the bounding boxes of all other processes. More... | |
void | ExchangeGridBounds () |
Exchanges the grid bounds of this process with all other processes. More... | |
void | ExtractBoundaryGrid () |
Extracts the boundary grid geometry from the input grid. More... | |
![]() | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. More... | |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
char * | GlobalIDFieldName |
vtkUnstructuredGrid * | InputGrid |
vtkUnstructuredGrid * | GhostedGrid |
vtkMPIController * | Controller |
vtk::details::GridInfo * | AuxiliaryData |
vtk::details::CommunicationLinks * | CommLists |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
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:
Definition at line 99 of file vtkPUnstructuredGridConnectivity.h.
Definition at line 104 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
|
protectedvirtual |
|
static |
|
static |
|
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 vtkObjectBase.
|
static |
|
protectedvirtual |
vtkPUnstructuredGridConnectivity* vtkPUnstructuredGridConnectivity::NewInstance | ( | ) | const |
|
virtual |
|
virtual |
Set/Get the underlying MPI controller used for communication.
|
virtual |
Set/Get the underlying MPI controller used for communication.
|
virtual |
Set/Get the name of the GlobalID field.
By default, "GlobalID" is assumed.
|
virtual |
Set/Get the name of the GlobalID field.
By default, "GlobalID" is assumed.
|
virtual |
Returns the ghosted grid.
void vtkPUnstructuredGridConnectivity::RegisterGrid | ( | vtkUnstructuredGrid * | gridPtr | ) |
Registers the grid in this process.
void vtkPUnstructuredGridConnectivity::BuildGhostZoneConnectivity | ( | ) |
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.
void vtkPUnstructuredGridConnectivity::UpdateGhosts | ( | ) |
Exchanges ghost zone data (i.e., node-centered or cell-centered fields).
NOTE: This method must be called after BuildGhostZoneConnectivity.
|
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.
|
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.
|
protected |
Deserializes the raw buffers received from each neighboring rank and updates the ghosted grid instance by filling in the values for the ghost zones.
|
protected |
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
|
protected |
This method serializes the local data (node-centered and/or cell-centered) for each rank that this process/grid communicates with.
|
protected |
Synchs the data on the input grid in this process to the ghosted grid instance.
|
protected |
Loops through the nodes of the ghost cell and the local adjacent cell and determines what.
|
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.
|
protected |
Inserts the ghost cell nodes in to the ghosted instance of the grid.
|
protected |
Process the remote boundary grid and injects cells in to the ghosted grid if a match is found.
|
protected |
Builds the ghosted grid and communication lists.
|
protected |
Serializes the unstructured grid into a bytestream.
|
protected |
De-serializes the unstructured grid from the given bytestream.
|
protected |
Writes the given unstructured grid to an ASCII file.
NOTE: Used for debugging.
|
protected |
Loops through the auxiliary FaceList, constructed in MarkFaces, and extracts the faces and nodes on the boundary.
|
protected |
Loops through the input grid cell faces and updates the auxiliary data-structures to associates a count with each face.
|
protected |
Extracts the boundary cell from the input grid and inserts it in to the boundary grid.
|
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.
|
protected |
Exchanged the boundary grids among candidate ranks.
|
protected |
Exchange boundary grid sizes.
|
protected |
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.
|
protected |
Exchanges the grid bounds of this process with all other processes.
Upon completion, each process will have the global grid bounds of every process.
|
protected |
Extracts the boundary grid geometry from the input grid.
Note: this method only extract the mesh and global/local ID information.
|
protected |
Definition at line 153 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
Definition at line 154 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
Definition at line 155 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
Definition at line 156 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
Definition at line 158 of file vtkPUnstructuredGridConnectivity.h.
|
protected |
Definition at line 159 of file vtkPUnstructuredGridConnectivity.h.