41 #ifndef VTKABSTRACTGRIDCONNECTIVITY_H_
42 #define VTKABSTRACTGRIDCONNECTIVITY_H_
45 #include "vtkFiltersGeometryModule.h"
46 #include "vtkObject.h"
47 #include "vtkPoints.h"
48 #include "vtkPointData.h"
50 #include "vtkUnsignedCharArray.h"
55 class vtkUnsignedCharArray;
66 void PrintSelf(ostream &os,vtkIndent indent );
70 vtkSetMacro( NumberOfGhostLayers,
unsigned int );
71 vtkGetMacro( NumberOfGhostLayers,
unsigned int);
79 virtual void SetNumberOfGrids(
const unsigned int N ) = 0;
85 virtual void ComputeNeighbors( ) = 0;
91 virtual void CreateGhostLayers(
const int N=1 ) = 0;
97 vtkUnsignedCharArray* GetGhostedPointGhostArray(
const int gridID );
103 vtkUnsignedCharArray* GetGhostedCellGhostArray(
const int gridID );
109 vtkPointData* GetGhostedGridPointData(
const int gridID );
115 vtkCellData* GetGhostedGridCellData(
const int gridID );
121 vtkPoints* GetGhostedPoints(
const int gridID );
129 virtual void FillGhostArrays(
131 vtkUnsignedCharArray* nodesArray,
132 vtkUnsignedCharArray* cellsArray ) = 0;
137 void RegisterGridGhostArrays(
138 const int gridID,vtkUnsignedCharArray *nodesArray,
139 vtkUnsignedCharArray *cellsArray );
144 void RegisterFieldData(
145 const int gridID, vtkPointData *PointData,
vtkCellData *CellData );
150 void RegisterGridNodes(
const int gridID, vtkPoints *nodes );
156 void AllocateUserRegisterDataStructures();
157 void DeAllocateUserRegisterDataStructures();
163 void AllocateInternalDataStructures();
164 void DeAllocateInternalDataStructures();
194 inline vtkUnsignedCharArray*
203 assert(
"pre: GridID is out-of-bound GridPointData" &&
204 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids) ) );
205 assert(
"pre: Ghosted point ghost array" &&
212 inline vtkUnsignedCharArray*
220 assert(
"pre: GridID is out-of-bound GridPointData" &&
221 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
222 assert(
"pre: Ghosted point ghost array" &&
237 assert(
"pre: GridID is out-of-bound GridPointData" &&
238 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
239 assert(
"pre: Ghosted point ghost array" &&
254 assert(
"pre: GridID is out-of-bound GridPointData" &&
255 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
256 assert(
"pre: Ghosted point ghost array" &&
271 assert(
"pre: GridID is out-of-bound GridPointData" &&
272 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
273 assert(
"pre: Ghosted point ghost array" &&
284 assert(
"pre: Allocating UserRegister for N > 0 grids" &&
298 assert(
"pre: Data-structure has not been properly allocated" &&
300 assert(
"pre: Data-structure has not been properly allocated" &&
302 assert(
"pre: Data-structure has not been properly allocated" &&
304 assert(
"pre: Data-structure has not been properly allocated" &&
306 assert(
"pre: Data-structure has not been properly allocated" &&
346 assert(
"pre: Allocating Internal data-structured for N > 0 grids" &&
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" &&
374 assert(
"pre: Data-structure has not been properly allocated" &&
413 vtkUnsignedCharArray *nodesArray,
414 vtkUnsignedCharArray *cellsArray )
417 assert(
"pre: GridID is out-of-bound GridPointData" &&
418 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
419 assert(
"pre: GridPointGhostArrays has not been allocated" &&
421 assert(
"pre: GridCellGhostArrays has not been allocated" &&
431 const int gridID, vtkPointData *PointData,
vtkCellData *CellData )
434 assert(
"pre: GridID is out-of-bound GridPointData" &&
435 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
436 assert(
"pre: GridPointData has not been allocated!" &&
438 assert(
"pre: GridCellData has not been allocated!" &&
442 if( PointData != NULL )
444 assert(
"pre: GridPointData[gridID] must be NULL" &&
454 if( CellData != NULL )
456 assert(
"pre: GridCellData[gridID] must be NULL" &&
469 const int gridID, vtkPoints *nodes )
472 assert(
"pre: GridID is out-of-bound GridPointData" &&
473 (gridID >= 0) && (gridID < static_cast<int>(this->
NumberOfGrids)));
474 assert(
"pre: GridPoints has not been allocated!" &&
479 assert(
"pre:GridPoints[gridID] must be NULL" &&
481 this->
GridPoints[ gridID ] = vtkPoints::New();
482 this->
GridPoints[ gridID ]->SetDataTypeToDouble();
483 this->
GridPoints[ gridID ]->ShallowCopy( nodes );
unsigned int NumberOfGhostLayers
void RegisterFieldData(const int gridID, vtkPointData *PointData, vtkCellData *CellData)
std::vector< vtkUnsignedCharArray * > GhostedPointGhostArray
represent and manipulate cell attribute data
std::vector< vtkPoints * > GridPoints
vtkCellData * GetGhostedGridCellData(const int gridID)
void DeAllocateUserRegisterDataStructures()
std::vector< vtkUnsignedCharArray * > GridPointGhostArrays
static vtkCellData * New()
vtkUnsignedCharArray * GetGhostedPointGhostArray(const int gridID)
vtkUnsignedCharArray * GetGhostedCellGhostArray(const int gridID)
std::vector< vtkUnsignedCharArray * > GridCellGhostArrays
std::vector< vtkPointData * > GhostedGridPointData
vtkPointData * GetGhostedGridPointData(const int gridID)
bool AllocatedGhostDataStructures
void RegisterGridGhostArrays(const int gridID, vtkUnsignedCharArray *nodesArray, vtkUnsignedCharArray *cellsArray)
unsigned int NumberOfGrids
unsigned int GetNumberOfGrids()
vtkPoints * GetGhostedPoints(const int gridID)
std::vector< vtkCellData * > GhostedGridCellData
std::vector< vtkUnsignedCharArray * > GhostedCellGhostArray
void RegisterGridNodes(const int gridID, vtkPoints *nodes)
void AllocateUserRegisterDataStructures()
void AllocateInternalDataStructures()
std::vector< vtkPoints * > GhostedGridPoints
void DeAllocateInternalDataStructures()
std::vector< vtkPointData * > GridPointData
std::vector< vtkCellData * > GridCellData