12 #ifndef vtkExtentRCBPartitioner_h
13 #define vtkExtentRCBPartitioner_h
15 #include "vtkCommonExecutionModelModule.h"
21 VTK_ABI_NAMESPACE_BEGIN
35 assert(
"pre: Number of partitions requested must be > 0" && (N >= 0));
37 this->NumberOfPartitions = N;
50 this->GlobalExtent[0] = imin;
51 this->GlobalExtent[1] = imax;
52 this->GlobalExtent[2] = jmin;
53 this->GlobalExtent[3] = jmax;
54 this->GlobalExtent[4] = kmin;
55 this->GlobalExtent[5] = kmax;
59 this->SetGlobalExtent(ext[0], ext[1], ext[2], ext[3], ext[4], ext[5]);
76 vtkSetMacro(NumberOfGhostLayers,
int);
77 vtkGetMacro(NumberOfGhostLayers,
int);
84 vtkGetMacro(NumExtents,
int);
95 void GetPartitionExtent(
int idx,
int ext[6]);
108 this->PartitionExtents.clear();
109 this->NumExtents = 0;
110 this->ExtentIsPartitioned =
false;
119 void ExtendGhostLayers(
int ext[6]);
129 ext[minIdx] -= this->NumberOfGhostLayers;
130 ext[maxIdx] += this->NumberOfGhostLayers;
132 (ext[minIdx] < this->GlobalExtent[minIdx]) ? this->GlobalExtent[minIdx] : ext[minIdx];
134 (ext[maxIdx] > this->GlobalExtent[maxIdx]) ? this->GlobalExtent[maxIdx] : ext[maxIdx];
141 void AcquireDataDescription();
146 void GetExtent(
int idx,
int ext[6]);
151 void AddExtent(
int ext[6]);
157 void ReplaceExtent(
int idx,
int ext[6]);
162 void SplitExtent(
int parent[6],
int s1[6],
int s2[6],
int splitDimension);
168 int GetNumberOfTotalExtents();
173 int GetNumberOfNodes(
int ext[6]);
178 int GetNumberOfCells(
int ext[6]);
183 int GetLongestDimensionLength(
int ext[6]);
188 int GetLongestDimension(
int ext[6]);
215 VTK_ABI_NAMESPACE_END
void SetGlobalExtent(int imin, int imax, int jmin, int jmax, int kmin, int kmax)
Set/Get the global extent array to be partitioned.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNumberOfPartitions(int N)
Set/Get the number of requested partitions.
void SetGlobalExtent(int ext[6])
Set/Get the global extent array to be partitioned.
vtkTypeBool DuplicateNodes
This method partitions a global extent to N partitions where N is a user supplied parameter...
a simple class to control print indentation
std::vector< int > PartitionExtents
void GetGhostedExtent(int ext[6], int minIdx, int maxIdx)
Givent an extent and the min/max of the dimension we are looking at, this method will produce a ghost...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void Reset()
Resets the partitioner to the initial state, all previous partition extents are cleared.