26 #ifndef vtkExtentRCBPartitioner_h
27 #define vtkExtentRCBPartitioner_h
29 #include "vtkCommonExecutionModelModule.h"
48 assert(
"pre: Number of partitions requested must be > 0" && (N >= 0) );
50 this->NumberOfPartitions = N;
63 this->GlobalExtent[0] = imin;
64 this->GlobalExtent[1] = imax;
65 this->GlobalExtent[2] = jmin;
66 this->GlobalExtent[3] = jmax;
67 this->GlobalExtent[4] = kmin;
68 this->GlobalExtent[5] = kmax;
72 this->SetGlobalExtent( ext[0], ext[1], ext[2], ext[3], ext[4], ext[5] );
89 vtkSetMacro(NumberOfGhostLayers,
int);
90 vtkGetMacro(NumberOfGhostLayers,
int);
97 vtkGetMacro(NumExtents,
int);
108 void GetPartitionExtent(
const int idx,
int ext[6] );
121 this->PartitionExtents.clear();
122 this->NumExtents = 0;
123 this->ExtentIsPartitioned =
false;
132 void ExtendGhostLayers(
int ext[6] );
141 int ext[6],
const int minIdx,
const int maxIdx )
143 ext[minIdx]-=this->NumberOfGhostLayers;
144 ext[maxIdx]+=this->NumberOfGhostLayers;
145 ext[minIdx] = (ext[minIdx] < this->GlobalExtent[minIdx])?
146 this->GlobalExtent[minIdx] : ext[minIdx];
147 ext[maxIdx] = (ext[maxIdx] > this->GlobalExtent[maxIdx])?
148 this->GlobalExtent[maxIdx] : ext[maxIdx];
155 void AcquireDataDescription();
160 void GetExtent(
const int idx,
int ext[6] );
165 void AddExtent(
int ext[6]);
171 void ReplaceExtent(
const int idx,
int ext[6]);
176 void SplitExtent(
int parent[6],
int s1[6],
int s2[6],
int splitDimension);
182 int GetNumberOfTotalExtents();
187 int GetNumberOfNodes(
int ext[6] );
192 int GetNumberOfCells(
int ext[6] );
197 int GetLongestDimensionLength(
int ext[6] );
202 int GetLongestDimension(
int ext[6] );