61#ifndef vtkRedistributeDataSetFilter_h
62#define vtkRedistributeDataSetFilter_h
65#include "vtkFiltersParallelDIY2Module.h"
73#include VTK_DIY2(diy/assigner.hpp)
76VTK_ABI_NAMESPACE_BEGIN
102 ASSIGN_TO_ONE_REGION = 0,
103 ASSIGN_TO_ALL_INTERSECTING_REGIONS = 1,
104 SPLIT_BOUNDARY_CELLS = 2
120 vtkSetClampMacro(BoundaryMode,
int, ASSIGN_TO_ONE_REGION, SPLIT_BOUNDARY_CELLS);
121 vtkGetMacro(BoundaryMode,
int);
125 this->SetBoundaryMode(ASSIGN_TO_ALL_INTERSECTING_REGIONS);
136 vtkSetMacro(UseExplicitCuts,
bool);
137 vtkGetMacro(UseExplicitCuts,
bool);
138 vtkBooleanMacro(UseExplicitCuts,
bool);
146 const std::vector<vtkBoundingBox>&
GetExplicitCuts()
const {
return this->ExplicitCuts; }
175 vtkSetMacro(ExpandExplicitCuts,
bool);
176 vtkGetMacro(ExpandExplicitCuts,
bool);
177 vtkBooleanMacro(ExpandExplicitCuts,
bool);
185 const std::vector<vtkBoundingBox>&
GetCuts()
const {
return this->Cuts; }
207 vtkGetMacro(NumberOfPartitions,
int);
224 vtkSetMacro(PreservePartitionsInOutput,
bool);
225 vtkGetMacro(PreservePartitionsInOutput,
bool);
226 vtkBooleanMacro(PreservePartitionsInOutput,
bool);
234 vtkSetMacro(GenerateGlobalCellIds,
bool);
235 vtkGetMacro(GenerateGlobalCellIds,
bool);
236 vtkBooleanMacro(GenerateGlobalCellIds,
bool);
246 const std::vector<vtkBoundingBox>& cuts,
const vtkBoundingBox& bounds);
256 vtkSetMacro(EnableDebugging,
bool);
257 vtkGetMacro(EnableDebugging,
bool);
258 vtkBooleanMacro(EnableDebugging,
bool);
270 vtkSetMacro(LoadBalanceAcrossAllBlocks,
bool);
271 vtkGetMacro(LoadBalanceAcrossAllBlocks,
bool);
272 vtkBooleanMacro(LoadBalanceAcrossAllBlocks,
bool);
305 vtkDataSet* dataset,
const std::vector<vtkBoundingBox>& cuts);
313 const std::vector<vtkBoundingBox>& cuts,
vtkIdType* mb_offset =
nullptr);
314 bool RedistributeDataSet(
327 std::vector<vtkBoundingBox> ExplicitCuts;
328 std::vector<vtkBoundingBox> Cuts;
329 std::shared_ptr<diy::Assigner> Assigner;
333 int NumberOfPartitions;
334 bool PreservePartitionsInOutput;
335 bool GenerateGlobalCellIds;
336 bool UseExplicitCuts;
337 bool ExpandExplicitCuts;
338 bool EnableDebugging;
340 bool LoadBalanceAcrossAllBlocks;
Fast, simple class for representing and operating on 3D bounds.
Superclass for algorithms that produce only data object as output.
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
abstract class to specify dataset behavior
a simple class to control print indentation
Composite dataset that organizes datasets into blocks.
composite dataset to encapsulates pieces of dataset.
Multiprocessing communication superclass.
composite dataset to encapsulates a dataset consisting of partitions.
redistributes input dataset into requested number of partitions
static vtkRedistributeDataSetFilter * New()
void SetBoundaryModeToAssignToAllIntersectingRegions()
Specify how cells on the boundaries are handled.
const vtkBoundingBox & GetExplicitCut(int index) const
Specify the cuts to use when UseExplicitCuts is true.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AddExplicitCut(const double bbox[6])
Specify the cuts to use when UseExplicitCuts is true.
virtual vtkSmartPointer< vtkPartitionedDataSet > SplitDataSet(vtkDataSet *dataset, const std::vector< vtkBoundingBox > &cuts)
This method is called to split a vtkDataSet into multiple datasets by the vector of vtkBoundingBox pa...
const std::vector< vtkBoundingBox > & GetExplicitCuts() const
Specify the cuts to use when UseExplicitCuts is true.
int GetNumberOfExplicitCuts() const
Specify the cuts to use when UseExplicitCuts is true.
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
void SetExplicitCuts(const std::vector< vtkBoundingBox > &boxes)
Specify the cuts to use when UseExplicitCuts is true.
~vtkRedistributeDataSetFilter() override
std::vector< vtkBoundingBox > ExpandCuts(const std::vector< vtkBoundingBox > &cuts, const vtkBoundingBox &bounds)
Helper function to expand a collection of bounding boxes to include the bounds specified.
void RemoveAllExplicitCuts()
Specify the cuts to use when UseExplicitCuts is true.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const std::vector< vtkBoundingBox > & GetCuts() const
Returns the cuts used by the most recent RequestData call.
void SetBoundaryModeToAssignToOneRegion()
Specify how cells on the boundaries are handled.
std::shared_ptr< const diy::Assigner > GetAssigner() const
Specify the DIY assigner used for distributing cuts.
virtual std::vector< vtkBoundingBox > GenerateCuts(vtkDataObject *data)
This method is called to generate the partitions for the input dataset.
void AddExplicitCut(const vtkBoundingBox &bbox)
Specify the cuts to use when UseExplicitCuts is true.
void SetAssigner(std::shared_ptr< diy::Assigner > assigner)
Specify the DIY assigner used for distributing cuts.
vtkRedistributeDataSetFilter()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetBoundaryModeToSplitBoundaryCells()
Specify how cells on the boundaries are handled.
std::shared_ptr< diy::Assigner > GetAssigner()
Specify the DIY assigner used for distributing cuts.
Hold a reference to a vtkObjectBase instance.