42 #ifndef vtkAbstractGridConnectivity_h 43 #define vtkAbstractGridConnectivity_h 46 #include "vtkFiltersGeometryModule.h" 73 vtkSetMacro( NumberOfGhostLayers,
unsigned int );
74 vtkGetMacro( NumberOfGhostLayers,
unsigned int);
84 virtual void SetNumberOfGrids(
const unsigned int N ) = 0;
94 virtual void ComputeNeighbors( ) = 0;
102 virtual void CreateGhostLayers(
const int N=1 ) = 0;
126 vtkPointData* GetGhostedGridPointData(
const int gridID );
134 vtkCellData* GetGhostedGridCellData(
const int gridID );
142 vtkPoints* GetGhostedPoints(
const int gridID );
151 virtual void FillGhostArrays(
159 void RegisterGridGhostArrays(
166 void RegisterFieldData(
172 void RegisterGridNodes(
const int gridID,
vtkPoints *nodes );
180 void AllocateUserRegisterDataStructures();
181 void DeAllocateUserRegisterDataStructures();
189 void AllocateInternalDataStructures();
190 void DeAllocateInternalDataStructures();
227 assert(
"pre: GridID is out-of-bound GridPointData" &&
228 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids) ) );
229 assert(
"pre: Ghosted point ghost array" &&
244 assert(
"pre: GridID is out-of-bound GridPointData" &&
245 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
246 assert(
"pre: Ghosted point ghost array" &&
261 assert(
"pre: GridID is out-of-bound GridPointData" &&
262 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
263 assert(
"pre: Ghosted point ghost array" &&
278 assert(
"pre: GridID is out-of-bound GridPointData" &&
279 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
280 assert(
"pre: Ghosted point ghost array" &&
295 assert(
"pre: GridID is out-of-bound GridPointData" &&
296 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
297 assert(
"pre: Ghosted point ghost array" &&
308 assert(
"pre: Allocating UserRegister for N > 0 grids" &&
322 assert(
"pre: Data-structure has not been properly allocated" &&
324 assert(
"pre: Data-structure has not been properly allocated" &&
326 assert(
"pre: Data-structure has not been properly allocated" &&
328 assert(
"pre: Data-structure has not been properly allocated" &&
330 assert(
"pre: Data-structure has not been properly allocated" &&
370 assert(
"pre: Allocating Internal data-structured for N > 0 grids" &&
390 assert(
"pre: Data-structure has not been properly allocated" &&
392 assert(
"pre: Data-structure has not been properly allocated" &&
394 assert(
"pre: Data-structure has not been properly allocated" &&
396 assert(
"pre: Data-structure has not been properly allocated" &&
398 assert(
"pre: Data-structure has not been properly allocated" &&
441 assert(
"pre: GridID is out-of-bound GridPointData" &&
442 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
443 assert(
"pre: GridPointGhostArrays has not been allocated" &&
445 assert(
"pre: GridCellGhostArrays has not been allocated" &&
458 assert(
"pre: GridID is out-of-bound GridPointData" &&
459 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
460 assert(
"pre: GridPointData has not been allocated!" &&
462 assert(
"pre: GridCellData has not been allocated!" &&
466 if( PointData !=
nullptr )
468 assert(
"pre: GridPointData[gridID] must be nullptr" &&
478 if( CellData !=
nullptr )
480 assert(
"pre: GridCellData[gridID] must be nullptr" &&
496 assert(
"pre: GridID is out-of-bound GridPointData" &&
497 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
498 assert(
"pre: GridPoints has not been allocated!" &&
501 if( nodes !=
nullptr )
503 assert(
"pre:GridPoints[gridID] must be nullptr" &&
506 this->
GridPoints[ gridID ]->SetDataTypeToDouble();
507 this->
GridPoints[ gridID ]->ShallowCopy( nodes );
unsigned int NumberOfGhostLayers
void RegisterFieldData(const int gridID, vtkPointData *PointData, vtkCellData *CellData)
Registers the grid's field data, i.e., the node and cell data.
abstract base class for most VTK objects
represent and manipulate point attribute data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< vtkUnsignedCharArray *> GhostedPointGhostArray
represent and manipulate cell attribute data
std::vector< vtkPoints *> GridPoints
static vtkPointData * New()
vtkCellData * GetGhostedGridCellData(const int gridID)
Returns the ghosted grid cell data for the grid associated with the given grid ID.
void DeAllocateUserRegisterDataStructures()
Allocate/De-allocate the data-structures where the user-supplied grids will be registered.
std::vector< vtkUnsignedCharArray *> GridPointGhostArrays
static vtkCellData * New()
vtkUnsignedCharArray * GetGhostedPointGhostArray(const int gridID)
Returns the ghosted points ghost array for the grid associated with the given grid ID...
a simple class to control print indentation
vtkUnsignedCharArray * GetGhostedCellGhostArray(const int gridID)
Returns the ghosted cells ghost array for the grid associated with the given grid ID...
std::vector< vtkUnsignedCharArray *> GridCellGhostArrays
std::vector< vtkPointData *> GhostedGridPointData
A superclass that defines the interface to be implemented by all concrete grid connectivity classes...
vtkPointData * GetGhostedGridPointData(const int gridID)
Returns the ghosted grid point data for the grid associated with the given grid ID.
bool AllocatedGhostDataStructures
dynamic, self-adjusting array of unsigned char
void RegisterGridGhostArrays(const int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
Registers the ghostarrays for the given grid.
unsigned int NumberOfGrids
unsigned int GetNumberOfGrids()
Returns the total number of grids.
vtkPoints * GetGhostedPoints(const int gridID)
Returns the ghosted grid points for the grid associated with the given grid ID.
std::vector< vtkCellData *> GhostedGridCellData
std::vector< vtkUnsignedCharArray *> GhostedCellGhostArray
void RegisterGridNodes(const int gridID, vtkPoints *nodes)
Registers the grid nodes for the grid associated with the given gridID.
void AllocateUserRegisterDataStructures()
Allocate/De-allocate the data-structures where the user-supplied grids will be registered.
void AllocateInternalDataStructures()
Allocated/De-allocate the data-structures where the ghosted grid data will be stored.
std::vector< vtkPoints *> GhostedGridPoints
void DeAllocateInternalDataStructures()
Allocated/De-allocate the data-structures where the ghosted grid data will be stored.
std::vector< vtkPointData *> GridPointData
represent and manipulate 3D points
std::vector< vtkCellData *> GridCellData