VTK  9.3.20240327
vtkDistributedDataFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
23 #ifndef vtkDistributedDataFilter_h
24 #define vtkDistributedDataFilter_h
25 
26 #include "vtkDataObjectAlgorithm.h"
27 #include "vtkFiltersParallelModule.h" // For export macro
28 
29 #include <vector> // for vector
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkBSPCuts;
34 class vtkPKdTree;
35 
36 class VTKFILTERSPARALLEL_EXPORT vtkDistributedDataFilter : public vtkDataObjectAlgorithm
37 {
38 public:
40 
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
46 
50  vtkGetObjectMacro(Controller, vtkMultiProcessController);
52 
64 
82  vtkBooleanMacro(RetainKdtree, int);
83  vtkGetMacro(RetainKdtree, int);
84  vtkSetMacro(RetainKdtree, int);
85 
97  vtkBooleanMacro(IncludeAllIntersectingCells, int);
98  vtkGetMacro(IncludeAllIntersectingCells, int);
99  vtkSetMacro(IncludeAllIntersectingCells, int);
100 
107  vtkBooleanMacro(ClipCells, int);
108  vtkGetMacro(ClipCells, int);
109  vtkSetMacro(ClipCells, int);
110 
112  {
113  ASSIGN_TO_ONE_REGION = 0,
114  ASSIGN_TO_ALL_INTERSECTING_REGIONS = 1,
115  SPLIT_BOUNDARY_CELLS = 2
116  };
117 
119 
124  {
125  this->SetBoundaryMode(vtkDistributedDataFilter::ASSIGN_TO_ONE_REGION);
126  }
128  {
130  }
132  {
133  this->SetBoundaryMode(vtkDistributedDataFilter::SPLIT_BOUNDARY_CELLS);
134  }
137 
142 
153  vtkBooleanMacro(UseMinimalMemory, int);
154  vtkGetMacro(UseMinimalMemory, int);
155  vtkSetMacro(UseMinimalMemory, int);
156 
161  vtkGetMacro(MinimumGhostLevel, int);
162  vtkSetMacro(MinimumGhostLevel, int);
163 
168  vtkBooleanMacro(Timing, int);
169  vtkSetMacro(Timing, int);
170  vtkGetMacro(Timing, int);
171 
184  vtkBSPCuts* GetCuts() { return this->UserCuts; }
185  void SetCuts(vtkBSPCuts* cuts);
186 
196  void SetUserRegionAssignments(const int* map, int numRegions);
197 
198 protected:
201 
208 
215 
218 
220  int MyId;
221 
222  int* Target;
223  int* Source;
224 
227 
228  // User-adjustable minimum number of ghost levels.
230 
231  // Actual number of ghost levels used during execution.
233 
237 
238  int Timing;
239 
242 
244 
246 
247  std::vector<int> UserRegionAssignments;
248 
249 private:
251  void operator=(const vtkDistributedDataFilter&) = delete;
252 };
253 VTK_ABI_NAMESPACE_END
254 #endif
This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.
Definition: vtkBSPCuts.h:31
Superclass for algorithms that produce only data object as output.
Serial stand-in for parallel filter that distributes data among processors.
void SetUserRegionAssignments(const int *map, int numRegions)
vtkBSPCuts doesn't have information about process assignments for the cuts.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Build a vtkUnstructuredGrid to store the input.
vtkMultiProcessController * Controller
vtkBSPCuts * GetCuts()
You can set the k-d tree decomposition, rather than have D3 compute it.
~vtkDistributedDataFilter() override
vtkPKdTree * GetKdtree()
Get a pointer to the parallel k-d tree object.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to create the correct type of data output.
std::vector< int > UserRegionAssignments
static vtkDistributedDataFilter * New()
void SetBoundaryModeToAssignToAllIntersectingRegions()
Handling of ClipCells and IncludeAllIntersectingCells.
int GetBoundaryMode()
Handling of ClipCells and IncludeAllIntersectingCells.
void SetBoundaryModeToSplitBoundaryCells()
Handling of ClipCells and IncludeAllIntersectingCells.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Ensure previous filters don't send up ghost cells.
void SetBoundaryModeToAssignToOneRegion()
Handling of ClipCells and IncludeAllIntersectingCells.
void SetCuts(vtkBSPCuts *cuts)
void SetBoundaryMode(int mode)
Handling of ClipCells and IncludeAllIntersectingCells.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetController(vtkMultiProcessController *c)
Set/Get the communicator object.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
Build a k-d tree decomposition of a list of points.
Definition: vtkPKdTree.h:44
@ info
Definition: vtkX3D.h:376
@ mode
Definition: vtkX3D.h:247
@ port
Definition: vtkX3D.h:447