VTK
vtkPUnstructuredGridConnectivity.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPStructuredGridConnectivity.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
64 #ifndef VTKPUNSTRUCTUREDGRIDCONNECTIVITY_H_
65 #define VTKPUNSTRUCTUREDGRIDCONNECTIVITY_H_
66 
67 #include "vtkFiltersParallelGeometryModule.h" // For export macro
68 #include "vtkObject.h"
69 
70 // Forward Declarations
71 class vtkCell;
72 class vtkCellData;
73 class vtkIdList;
74 class vtkIdTypeArray;
75 class vtkMPIController;
77 class vtkPointData;
78 class vtkPoints;
80 
81 // Forward Declaration of internal data-structures
82 namespace vtk
83 {
84 namespace details
85 {
86 
87 struct GridInfo;
88 struct MeshLinks;
89 struct CommunicationLinks;
90 
91 } // END namespace details
92 } // END namespace vkt
93 
95  public vtkObject
96 {
97 public:
100  void PrintSelf(ostream& os, vtkIndent indent);
101 
103 
107 
109 
111  vtkSetStringMacro(GlobalIDFieldName);
112  vtkGetStringMacro(GlobalIDFieldName);
114 
116 
119 
122 
128 
132  void UpdateGhosts();
133 
134 protected:
137 
138  char* GlobalIDFieldName; // The field of the global IDs.
139  vtkUnstructuredGrid* InputGrid; // The input grid, to be ghosted.
140  vtkUnstructuredGrid* GhostedGrid; // This is the output from this class.
141  vtkMPIController* Controller; // Supplied MPI controller.
142 
143 // BTX
144  vtk::details::GridInfo* AuxiliaryData; // Data used to build the ghost zones.
145  vtk::details::CommunicationLinks* CommLists; // Persistent comm lists.
146 // ETX
147 
149 
153  const int neiRank,
154  vtkCellData* ghostData,
155  vtkIdType* cellIdx,
156  const unsigned int numGhostCells);
158 
160 
164  const int neiRank,
165  vtkPointData* ghostData,
166  vtkIdType* globalIdx,
167  const unsigned int numGhostNodes);
169 
174 
180 
185 
189 
191 
194  const int rmtRank,
195  const vtkIdType ghostCell,
196  const vtkIdType adjCell,
197  vtkIdList* shared);
199 
201 
208  vtkCell* c,vtkIdType* globalId, const vtkIdType N,
209  vtkIdType& adjCell,
210  vtkIdList* sharedIds);
212 
214 
216  vtkCell* ghostCell,
217  vtkIdTypeArray* ghostGridGlobalIdx,
218  vtkIdType* globalIdArray,
219  vtkUnstructuredGrid* bGrid,
220  vtkIdType* cellPts);
222 
224 
227  const int rmtRank,vtkUnstructuredGrid* bGrid);
229 
232 
234 
238 
240 
244 
247  void WriteUnstructuredGrid(vtkUnstructuredGrid* grid, const char* fileName);
248 
252 
255  void MarkFaces();
256 
258 
261  const vtkIdType cellIdx,
262  const vtkIdType numCellNodes,
263  vtkIdType* cellNodes,
264  vtkPoints* nodes,
265  vtkIdTypeArray* localIdx,
266  vtkIdTypeArray* globaIdx
267  );
269 
273  bool IsCellOnBoundary(vtkIdType* cellNodes, vtkIdType N);
274 
277 
280 
286 
291 
295 
296 private:
298  void operator=(const vtkPUnstructuredGridConnectivity&); // Not implemented
299 };
300 
301 #endif /* VTKPUNSTRUCTUREDGRIDCONNECTIVITY_H_ */
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkPUnstructuredGridConnectivity::ExtractBoundaryCell
void ExtractBoundaryCell(const vtkIdType cellIdx, const vtkIdType numCellNodes, vtkIdType *cellNodes, vtkPoints *nodes, vtkIdTypeArray *localIdx, vtkIdTypeArray *globaIdx)
vtkPUnstructuredGridConnectivity::IsCellOnBoundary
bool IsCellOnBoundary(vtkIdType *cellNodes, vtkIdType N)
vtkPUnstructuredGridConnectivity::GlobalIDFieldName
char * GlobalIDFieldName
Definition: vtkPUnstructuredGridConnectivity.h:138
vtkPUnstructuredGridConnectivity::SerializeUnstructuredGrid
void SerializeUnstructuredGrid(vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
vtkPUnstructuredGridConnectivity::vtkPUnstructuredGridConnectivity
vtkPUnstructuredGridConnectivity()
vtkPUnstructuredGridConnectivity::ExchangeBoundaryGridSizes
void ExchangeBoundaryGridSizes(int size)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkPUnstructuredGridConnectivity::FillGhostZoneNodes
void FillGhostZoneNodes(const int neiRank, vtkPointData *ghostData, vtkIdType *globalIdx, const unsigned int numGhostNodes)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkPUnstructuredGridConnectivity::BuildGhostedGridAndCommLists
void BuildGhostedGridAndCommLists()
vtkPUnstructuredGridConnectivity::UpdateGhosts
void UpdateGhosts()
vtkPUnstructuredGridConnectivity::SerializeGhostZones
void SerializeGhostZones()
vtkPUnstructuredGridConnectivity::SynchLocalData
void SynchLocalData()
vtkMultiProcessStream
stream used to pass data across processes using vtkMultiProcessController.
Definition: vtkMultiProcessStream.h:40
vtkPUnstructuredGridConnectivity::BuildGhostZoneConnectivity
void BuildGhostZoneConnectivity()
vtkPUnstructuredGridConnectivity::WriteUnstructuredGrid
void WriteUnstructuredGrid(vtkUnstructuredGrid *grid, const char *fileName)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPUnstructuredGridConnectivity::Controller
vtkMPIController * Controller
Definition: vtkPUnstructuredGridConnectivity.h:141
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkPUnstructuredGridConnectivity::ExchangeBoundaryGrids
void ExchangeBoundaryGrids()
vtkFiltersParallelGeometryModule.h
vtkPUnstructuredGridConnectivity::ExtractSurfaceMesh
void ExtractSurfaceMesh()
vtkPUnstructuredGridConnectivity::EnqueueNodeLinks
void EnqueueNodeLinks(const int rmtRank, const vtkIdType ghostCell, const vtkIdType adjCell, vtkIdList *shared)
vtkPUnstructuredGridConnectivity::CreatePersistentRcvBuffers
void CreatePersistentRcvBuffers()
vtkPUnstructuredGridConnectivity::RegisterGrid
void RegisterGrid(vtkUnstructuredGrid *gridPtr)
vtkgl::c
const GLubyte * c
Definition: vtkgl.h:15720
vtkPUnstructuredGridConnectivity::ExchangeGridBounds
void ExchangeGridBounds()
vtkPUnstructuredGridConnectivity::ExtractBoundaryGrid
void ExtractBoundaryGrid()
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkPUnstructuredGridConnectivity::BoundingBoxCollision
void BoundingBoxCollision()
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPUnstructuredGridConnectivity::FillGhostZoneCells
void FillGhostZoneCells(const int neiRank, vtkCellData *ghostData, vtkIdType *cellIdx, const unsigned int numGhostCells)
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkPUnstructuredGridConnectivity::AuxiliaryData
vtk::details::GridInfo * AuxiliaryData
Definition: vtkPUnstructuredGridConnectivity.h:144
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkPUnstructuredGridConnectivity::InsertGhostCellNodes
void InsertGhostCellNodes(vtkCell *ghostCell, vtkIdTypeArray *ghostGridGlobalIdx, vtkIdType *globalIdArray, vtkUnstructuredGrid *bGrid, vtkIdType *cellPts)
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkPUnstructuredGridConnectivity::InputGrid
vtkUnstructuredGrid * InputGrid
Definition: vtkPUnstructuredGridConnectivity.h:139
vtkObject.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkPUnstructuredGridConnectivity
Definition: vtkPUnstructuredGridConnectivity.h:96
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:49
vtkgl::g
GLboolean GLboolean g
Definition: vtkgl.h:12312
vtkPUnstructuredGridConnectivity::DeSerializeUnstructuredGrid
void DeSerializeUnstructuredGrid(vtkUnstructuredGrid *g, vtkMultiProcessStream &bytestream)
vtk
Definition: vtkAtomicTypeConcepts.h:19
vtkPUnstructuredGridConnectivity::CommLists
vtk::details::CommunicationLinks * CommLists
Definition: vtkPUnstructuredGridConnectivity.h:145
vtkPUnstructuredGridConnectivity::New
static vtkPUnstructuredGridConnectivity * New()
vtkPUnstructuredGridConnectivity::GhostedGrid
vtkUnstructuredGrid * GhostedGrid
Definition: vtkPUnstructuredGridConnectivity.h:140
vtkPUnstructuredGridConnectivity::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPUnstructuredGridConnectivity::MarkFaces
void MarkFaces()
vtkPUnstructuredGridConnectivity::~vtkPUnstructuredGridConnectivity
virtual ~vtkPUnstructuredGridConnectivity()
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:82
vtkPUnstructuredGridConnectivity::IsCellConnected
bool IsCellConnected(vtkCell *c, vtkIdType *globalId, const vtkIdType N, vtkIdType &adjCell, vtkIdList *sharedIds)
vtkMPIController
Process communication using MPI.
Definition: vtkMPIController.h:61
vtkPUnstructuredGridConnectivity::ProcessRemoteGrid
void ProcessRemoteGrid(const int rmtRank, vtkUnstructuredGrid *bGrid)
vtkPUnstructuredGridConnectivity::DeSerializeGhostZones
void DeSerializeGhostZones()
VTKFILTERSPARALLELGEOMETRY_EXPORT
#define VTKFILTERSPARALLELGEOMETRY_EXPORT
Definition: vtkFiltersParallelGeometryModule.h:15
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843