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] );
81 vtkGetMacro(DuplicateNodes,
int);
90 vtkGetMacro(NumberOfGhostLayers,
int);
97 vtkGetMacro(NumExtents,
int);
121 this->PartitionExtents.clear();
122 this->NumExtents = 0;
123 this->ExtentIsPartitioned =
false;
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];
176 void SplitExtent(
int parent[6],
int s1[6],
int s2[6],
int splitDimension);
This method partitions a global extent to N partitions where N is a user supplied parameter.
int GetNumberOfCells(int ext[6])
Computes the total number of cells for the given structured grid extent.
void PrintSelf(ostream &oss, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void GetExtent(const int idx, int ext[6])
Returns the extent at the position corresponding to idx.
void ReplaceExtent(const int idx, int ext[6])
Replaces the extent at the position indicated by idx with the provided extent.
int GetNumberOfTotalExtents()
Returns the total number of extents.
void SetNumberOfPartitions(const int N)
Set/Get the number of requested partitions.
~vtkExtentRCBPartitioner() override
void PrintExtent(const std::string &name, int ext[6])
A convenience method for debugging purposes.
void SetGlobalExtent(int imin, int imax, int jmin, int jmax, int kmin, int kmax)
Set/Get the global extent array to be partitioned.
static vtkExtentRCBPartitioner * New()
void SplitExtent(int parent[6], int s1[6], int s2[6], int splitDimension)
Splits the extent along the given dimension.
int GetNumberOfNodes(int ext[6])
Computes the total number of nodes for the given structured grid extent.
void Partition()
Partitions the extent.
vtkExtentRCBPartitioner()
std::vector< int > PartitionExtents
int GetLongestDimensionLength(int ext[6])
Returns the length of the longest dimension.
void AddExtent(int ext[6])
Adds the extent to the end of the list of partitioned extents.
void SetGlobalExtent(int ext[6])
void GetPartitionExtent(const int idx, int ext[6])
Returns the extent of the partition corresponding to the given ID.
void AcquireDataDescription()
Gets the structured data-description based on the givenn global extent.
void GetGhostedExtent(int ext[6], const int minIdx, const int maxIdx)
Givent an extent and the min/max of the dimension we are looking at, this method will produce a ghost...
int GetLongestDimension(int ext[6])
Returns the longest edge.
void ExtendGhostLayers(int ext[6])
Given an extent, this method will create ghost layers on each side of the boundary in each dimension.
a simple class to control print indentation
abstract base class for most VTK objects
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.