30#ifndef vtkAbstractGridConnectivity_h
31#define vtkAbstractGridConnectivity_h
35#include "vtkFiltersGeometryModule.h"
42VTK_ABI_NAMESPACE_BEGIN
53VTK_ABI_NAMESPACE_BEGIN
64 vtkSetMacro(NumberOfGhostLayers,
unsigned int);
65 vtkGetMacro(NumberOfGhostLayers,
unsigned int);
148 void RegisterGridGhostArrays(
159 void RegisterGridNodes(
int gridID,
vtkPoints* nodes);
166 void AllocateUserRegisterDataStructures();
167 void DeAllocateUserRegisterDataStructures();
175 void AllocateInternalDataStructures();
176 void DeAllocateInternalDataStructures();
211 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
213 assert(
"pre: Ghosted point ghost array" &&
227 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
229 assert(
"pre: Ghosted point ghost array" &&
243 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
259 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
275 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
287 assert(
"pre: Allocating UserRegister for N > 0 grids" && (this->
NumberOfGrids > 0));
299 assert(
"pre: Data-structure has not been properly allocated" &&
301 assert(
"pre: Data-structure has not been properly allocated" &&
303 assert(
"pre: Data-structure has not been properly allocated" &&
305 assert(
"pre: Data-structure has not been properly allocated" &&
307 assert(
"pre: Data-structure has not been properly allocated" &&
308 (this->
GridPoints.size() == this->NumberOfGrids));
346 assert(
"pre: Allocating Internal data-structured for N > 0 grids" && (this->
NumberOfGrids > 0));
364 assert(
"pre: Data-structure has not been properly allocated" &&
366 assert(
"pre: Data-structure has not been properly allocated" &&
368 assert(
"pre: Data-structure has not been properly allocated" &&
370 assert(
"pre: Data-structure has not been properly allocated" &&
372 assert(
"pre: Data-structure has not been properly allocated" &&
413 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
415 assert(
"pre: GridPointGhostArrays has not been allocated" &&
417 assert(
"pre: GridCellGhostArrays has not been allocated" &&
430 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
432 assert(
"pre: GridPointData has not been allocated!" &&
434 assert(
"pre: GridCellData has not been allocated!" &&
438 if (PointData !=
nullptr)
440 assert(
"pre: GridPointData[gridID] must be nullptr" && this->
GridPointData[gridID] ==
nullptr);
449 if (CellData !=
nullptr)
451 assert(
"pre: GridCellData[gridID] must be nullptr" && this->
GridCellData[gridID] ==
nullptr);
465 assert(
"pre: GridID is out-of-bound GridPointData" && (gridID >= 0) &&
468 "pre: GridPoints has not been allocated!" && (this->
GridPoints.size() == this->NumberOfGrids));
470 if (nodes !=
nullptr)
472 assert(
"pre:GridPoints[gridID] must be nullptr" && this->
GridPoints[gridID] ==
nullptr);
474 this->
GridPoints[gridID]->SetDataTypeToDouble();
A superclass that defines the interface to be implemented by all concrete grid connectivity classes.
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
vtkPoints * GetGhostedPoints(int gridID)
Returns the ghosted grid points for the grid associated with the given grid ID.
unsigned int NumberOfGhostLayers
std::vector< vtkUnsignedCharArray * > GridCellGhostArrays
virtual void CreateGhostLayers(int N=1)=0
Creates N layers of ghost layers where N is the number of cells that will be added to each grid.
void RegisterGridGhostArrays(int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
Registers the ghostarrays for the given grid.
bool AllocatedGhostDataStructures
std::vector< vtkCellData * > GridCellData
vtkCellData * GetGhostedGridCellData(int gridID)
Returns the ghosted grid cell data for the grid associated with the given grid ID.
void RegisterFieldData(int gridID, vtkPointData *PointData, vtkCellData *CellData)
Registers the grid's field data, i.e., the node and cell data.
vtkPointData * GetGhostedGridPointData(int gridID)
Returns the ghosted grid point data for the grid associated with the given grid ID.
std::vector< vtkCellData * > GhostedGridCellData
std::vector< vtkPointData * > GridPointData
std::vector< vtkPoints * > GridPoints
vtkUnsignedCharArray * GetGhostedPointGhostArray(int gridID)
Returns the ghosted points ghost array for the grid associated with the given grid ID.
virtual void FillGhostArrays(int gridId, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)=0
Fills the ghost arrays for the given grid.
std::vector< vtkPointData * > GhostedGridPointData
vtkUnsignedCharArray * GetGhostedCellGhostArray(int gridID)
Returns the ghosted cells ghost array for the grid associated with the given grid ID.
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
~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.
std::vector< vtkUnsignedCharArray * > GridPointGhostArrays
void RegisterGridNodes(int gridID, vtkPoints *nodes)
Registers the grid nodes for the grid associated with the given gridID.
std::vector< vtkUnsignedCharArray * > GhostedCellGhostArray
void DeAllocateInternalDataStructures()
Allocated/De-allocate the data-structures where the ghosted grid data will be stored.
virtual void SetNumberOfGrids(unsigned int N)=0
Sets the total number of grids in the domain.
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