42#ifndef vtkAbstractGridConnectivity_h
43#define vtkAbstractGridConnectivity_h
47#include "vtkFiltersGeometryModule.h"
73 vtkSetMacro(NumberOfGhostLayers,
unsigned int);
74 vtkGetMacro(NumberOfGhostLayers,
unsigned int);
126 vtkPointData* GetGhostedGridPointData(
const int gridID);
134 vtkCellData* GetGhostedGridCellData(
const int gridID);
142 vtkPoints* GetGhostedPoints(
const int gridID);
157 void RegisterGridGhostArrays(
168 void RegisterGridNodes(
const int gridID,
vtkPoints* nodes);
175 void AllocateUserRegisterDataStructures();
176 void DeAllocateUserRegisterDataStructures();
184 void AllocateInternalDataStructures();
185 void DeAllocateInternalDataStructures();
221 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
223 assert(
"pre: Ghosted point ghost array" &&
237 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
239 assert(
"pre: Ghosted point ghost array" &&
253 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
269 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
285 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
297 assert(
"pre: Allocating UserRegister for N > 0 grids" && (this->
NumberOfGrids > 0));
309 assert(
"pre: Data-structure has not been properly allocated" &&
311 assert(
"pre: Data-structure has not been properly allocated" &&
313 assert(
"pre: Data-structure has not been properly allocated" &&
315 assert(
"pre: Data-structure has not been properly allocated" &&
317 assert(
"pre: Data-structure has not been properly allocated" &&
318 (this->
GridPoints.size() == this->NumberOfGrids));
356 assert(
"pre: Allocating Internal data-structured for N > 0 grids" && (this->
NumberOfGrids > 0));
374 assert(
"pre: Data-structure has not been properly allocated" &&
376 assert(
"pre: Data-structure has not been properly allocated" &&
378 assert(
"pre: Data-structure has not been properly allocated" &&
380 assert(
"pre: Data-structure has not been properly allocated" &&
382 assert(
"pre: Data-structure has not been properly allocated" &&
423 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
425 assert(
"pre: GridPointGhostArrays has not been allocated" &&
427 assert(
"pre: GridCellGhostArrays has not been allocated" &&
440 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
442 assert(
"pre: GridPointData has not been allocated!" &&
444 assert(
"pre: GridCellData has not been allocated!" &&
448 if (PointData !=
nullptr)
450 assert(
"pre: GridPointData[gridID] must be nullptr" && this->
GridPointData[gridID] ==
nullptr);
459 if (CellData !=
nullptr)
461 assert(
"pre: GridCellData[gridID] must be nullptr" && this->
GridCellData[gridID] ==
nullptr);
475 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
478 "pre: GridPoints has not been allocated!" && (this->
GridPoints.size() == this->NumberOfGrids));
480 if (nodes !=
nullptr)
482 assert(
"pre:GridPoints[gridID] must be nullptr" && this->
GridPoints[gridID] ==
nullptr);
484 this->
GridPoints[gridID]->SetDataTypeToDouble();
A superclass that defines the interface to be implemented by all concrete grid connectivity classes.
vtkUnsignedCharArray * GetGhostedPointGhostArray(const int gridID)
Returns the ghosted points ghost array 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.
void AllocateUserRegisterDataStructures()
Allocate/De-allocate the data-structures where the user-supplied grids will be registered.
vtkAbstractGridConnectivity()
virtual void ComputeNeighbors()=0
Computes the grid neighboring topology for the domain.
std::vector< vtkUnsignedCharArray * > GhostedPointGhostArray
unsigned int NumberOfGhostLayers
std::vector< vtkUnsignedCharArray * > GridCellGhostArrays
void RegisterGridNodes(const int gridID, vtkPoints *nodes)
Registers the grid nodes for the grid associated with the given gridID.
bool AllocatedGhostDataStructures
vtkPointData * GetGhostedGridPointData(const int gridID)
Returns the ghosted grid point data for the grid associated with the given grid ID.
std::vector< vtkCellData * > GridCellData
std::vector< vtkCellData * > GhostedGridCellData
std::vector< vtkPointData * > GridPointData
void RegisterFieldData(const int gridID, vtkPointData *PointData, vtkCellData *CellData)
Registers the grid's field data, i.e., the node and cell data.
virtual void SetNumberOfGrids(const unsigned int N)=0
Sets the total number of grids in the domain.
vtkCellData * GetGhostedGridCellData(const int gridID)
Returns the ghosted grid cell data for the grid associated with the given grid ID.
std::vector< vtkPoints * > GridPoints
std::vector< vtkPointData * > GhostedGridPointData
unsigned int GetNumberOfGrids()
Returns the total number of grids.
void AllocateInternalDataStructures()
Allocated/De-allocate the data-structures where the ghosted grid data will be stored.
unsigned int NumberOfGrids
void RegisterGridGhostArrays(const int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
Registers the ghostarrays for the given grid.
~vtkAbstractGridConnectivity() override
std::vector< vtkPoints * > GhostedGridPoints
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnsignedCharArray * GetGhostedCellGhostArray(const int gridID)
Returns the ghosted cells ghost array for the grid associated with the given grid ID.
virtual void CreateGhostLayers(const int N=1)=0
Creates N layers of ghost layers where N is the number of cells that will be added to each grid.
std::vector< vtkUnsignedCharArray * > GridPointGhostArrays
vtkPoints * GetGhostedPoints(const int gridID)
Returns the ghosted grid points for the grid associated with the given grid ID.
virtual void FillGhostArrays(const int gridId, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)=0
Fills the ghost arrays for the given grid.
std::vector< vtkUnsignedCharArray * > GhostedCellGhostArray
void DeAllocateInternalDataStructures()
Allocated/De-allocate the data-structures where the ghosted grid data will be stored.
represent and manipulate cell attribute data
static vtkCellData * New()
a simple class to control print indentation
abstract base class for most VTK objects
represent and manipulate point attribute data
static vtkPointData * New()
represent and manipulate 3D points
dynamic, self-adjusting array of unsigned char