VTK  9.4.20241104
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
32VTK_ABI_NAMESPACE_BEGIN
33class vtkIdTypeArray;
36class VTKFILTERSPARALLELDIY2_EXPORT vtkPartitioningStrategy : public vtkObject
37{
38public:
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
111 vtkGetObjectMacro(Controller, vtkMultiProcessController);
113
115
118 vtkGetMacro(NumberOfPartitions, vtkIdType);
119 vtkSetMacro(NumberOfPartitions, vtkIdType);
121
122protected:
125
126 vtkMultiProcessController* Controller = nullptr;
127
128 vtkIdType NumberOfPartitions = -1;
129
130private:
132 void operator=(const vtkPartitioningStrategy&) = delete;
133};
134VTK_ABI_NAMESPACE_END
135
136#endif // vtkPartitioningStrategy_h
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Multiprocessing communication superclass.
Allocate and hold a VTK object.
Definition vtkNew.h:167
abstract base class for most VTK objects
Definition vtkObject.h:162
Composite dataset that groups datasets as a collection.
A strategy interface for partitioning meshes.
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
PartitionedEntity
An enum defining which principal entity is being partitioned.
virtual std::vector< PartitionInformation > ComputePartition(vtkPartitionedDataSetCollection *)=0
Main method for subclasses to implement in order to define their partitioning method (should be calle...
void PrintSelf(std::ostream &os, vtkIndent indent) override
~vtkPartitioningStrategy() override
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.
int vtkIdType
Definition vtkType.h:315