25 #ifndef vtkExtentRCBPartitioner_h
26 #define vtkExtentRCBPartitioner_h
45 assert(
"pre: Number of partitions requested must be > 0" && (N >= 0) );
47 this->NumberOfPartitions = N;
57 this->GlobalExtent[0] = imin;
58 this->GlobalExtent[1] = imax;
59 this->GlobalExtent[2] = jmin;
60 this->GlobalExtent[3] = jmax;
61 this->GlobalExtent[4] = kmin;
62 this->GlobalExtent[5] = kmax;
66 this->SetGlobalExtent( ext[0], ext[1], ext[2], ext[3], ext[4], ext[5] );
72 vtkSetMacro(DuplicateNodes,
int);
73 vtkGetMacro(DuplicateNodes,
int);
74 vtkBooleanMacro(DuplicateNodes,
int);
79 vtkSetMacro(NumberOfGhostLayers,
int);
80 vtkGetMacro(NumberOfGhostLayers,
int);
85 vtkGetMacro(NumExtents,
int);
92 void GetPartitionExtent(
const int idx,
int ext[6] );
103 this->PartitionExtents.clear();
104 this->NumExtents = 0;
105 this->ExtentIsPartitioned =
false;
112 void ExtendGhostLayers(
int ext[6] );
119 int ext[6],
const int minIdx,
const int maxIdx )
121 ext[minIdx]-=this->NumberOfGhostLayers;
122 ext[maxIdx]+=this->NumberOfGhostLayers;
123 ext[minIdx] = (ext[minIdx] < this->GlobalExtent[minIdx])?
124 this->GlobalExtent[minIdx] : ext[minIdx];
125 ext[maxIdx] = (ext[maxIdx] > this->GlobalExtent[maxIdx])?
126 this->GlobalExtent[maxIdx] : ext[maxIdx];
132 void AcquireDataDescription();
135 void GetExtent(
const int idx,
int ext[6] );
138 void AddExtent(
int ext[6]);
142 void ReplaceExtent(
const int idx,
int ext[6]);
145 void SplitExtent(
int parent[6],
int s1[6],
int s2[6],
int splitDimension);
149 int GetNumberOfTotalExtents();
153 int GetNumberOfNodes(
int ext[6] );
157 int GetNumberOfCells(
int ext[6] );
160 int GetLongestDimensionLength(
int ext[6] );
163 int GetLongestDimension(
int ext[6] );
void SetGlobalExtent(int imin, int imax, int jmin, int jmax, int kmin, int kmax)
#define VTKCOMMONEXECUTIONMODEL_EXPORT
abstract base class for most VTK objects
void SetGlobalExtent(int ext[6])
void GetGhostedExtent(int ext[6], const int minIdx, const int maxIdx)
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
void SetNumberOfPartitions(const int N)
std::vector< int > PartitionExtents