VTK  9.7.1
vtkPartitioningStrategy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
25 #ifndef vtkPartitioningStrategy_h
26 #define vtkPartitioningStrategy_h
27 
28 #include "vtkFiltersParallelDIY2Module.h" // for export macro
29 #include "vtkObject.h"
30 #include "vtkSmartPointer.h" // for member variables
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkIdTypeArray;
36 class VTKFILTERSPARALLELDIY2_EXPORT vtkPartitioningStrategy : public vtkObject
37 {
38 public:
40  void PrintSelf(std::ostream& os, vtkIndent indent) override;
41 
46  {
47  POINTS = 0,
48  CELLS = 1
49  };
50 
76  {
77  public:
81  PartitionedEntity TargetEntity = CELLS;
93  vtkIdType NumberOfPartitions = 0;
94  };
95 
103  virtual std::vector<PartitionInformation> ComputePartition(vtkPartitionedDataSetCollection*) = 0;
104 
106 
110  void SetController(vtkMultiProcessController*);
111  vtkGetObjectMacro(Controller, vtkMultiProcessController);
113 
115 
118  vtkGetMacro(NumberOfPartitions, vtkIdType);
119  vtkSetMacro(NumberOfPartitions, vtkIdType);
121 
122 protected:
124  ~vtkPartitioningStrategy() override;
125 
126  vtkMultiProcessController* Controller = nullptr;
127 
128  vtkIdType NumberOfPartitions = -1;
129 
130 private:
132  void operator=(const vtkPartitioningStrategy&) = delete;
133 };
134 VTK_ABI_NAMESPACE_END
135 
136 #endif // vtkPartitioningStrategy_h
PartitionedEntity
An enum defining which principal entity is being partitioned.
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:363
a simple class to control print indentation
Definition: vtkIndent.h:28
A strategy interface for partitioning meshes.
Encapsulation structure for describing the result of a partitioning calculation.
vtkNew< vtkIdTypeArray > TargetPartitions
An array defining on which rank each currently local principal entity should be shipped to...
vtkNew< vtkIdTypeArray > BoundaryNeighborPartitions
A 2 component array defining boundary entity indexes and their neighbor partition index...
Composite dataset that groups datasets as a collection.
Multiprocessing communication superclass.