VTK  9.0.2
vtkDistributedDataFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDistributedDataFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
35 #ifndef vtkDistributedDataFilter_h
36 #define vtkDistributedDataFilter_h
37 
38 #include "vtkDataObjectAlgorithm.h"
39 #include "vtkFiltersParallelModule.h" // For export macro
40 
41 #include <vector> // for vector
42 
43 class vtkBSPCuts;
45 class vtkPKdTree;
46 
47 class VTKFILTERSPARALLEL_EXPORT vtkDistributedDataFilter : public vtkDataObjectAlgorithm
48 {
49 public:
51 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
57 
61  vtkGetObjectMacro(Controller, vtkMultiProcessController);
63 
75 
93  vtkBooleanMacro(RetainKdtree, int);
94  vtkGetMacro(RetainKdtree, int);
95  vtkSetMacro(RetainKdtree, int);
96 
108  vtkBooleanMacro(IncludeAllIntersectingCells, int);
109  vtkGetMacro(IncludeAllIntersectingCells, int);
110  vtkSetMacro(IncludeAllIntersectingCells, int);
111 
118  vtkBooleanMacro(ClipCells, int);
119  vtkGetMacro(ClipCells, int);
120  vtkSetMacro(ClipCells, int);
121 
123  {
124  ASSIGN_TO_ONE_REGION = 0,
125  ASSIGN_TO_ALL_INTERSECTING_REGIONS = 1,
126  SPLIT_BOUNDARY_CELLS = 2
127  };
128 
130 
135  {
136  this->SetBoundaryMode(vtkDistributedDataFilter::ASSIGN_TO_ONE_REGION);
137  }
139  {
141  }
143  {
144  this->SetBoundaryMode(vtkDistributedDataFilter::SPLIT_BOUNDARY_CELLS);
145  }
148 
153 
164  vtkBooleanMacro(UseMinimalMemory, int);
165  vtkGetMacro(UseMinimalMemory, int);
166  vtkSetMacro(UseMinimalMemory, int);
167 
172  vtkGetMacro(MinimumGhostLevel, int);
173  vtkSetMacro(MinimumGhostLevel, int);
174 
179  vtkBooleanMacro(Timing, int);
180  vtkSetMacro(Timing, int);
181  vtkGetMacro(Timing, int);
182 
195  vtkBSPCuts* GetCuts() { return this->UserCuts; }
196  void SetCuts(vtkBSPCuts* cuts);
197 
207  void SetUserRegionAssignments(const int* map, int numRegions);
208 
209 protected:
212 
217  virtual int RequestInformation(
219  virtual int FillInputPortInformation(int port, vtkInformation* info) override;
220 
226  virtual int RequestDataObject(
228 
231 
233  int MyId;
234 
235  int* Target;
236  int* Source;
237 
240 
241  // User-adjustable minimum number of ghost levels.
243 
244  // Actual number of ghost levels used during execution.
246 
250 
251  int Timing;
252 
255 
257 
259 
260  std::vector<int> UserRegionAssignments;
261 
262 private:
264  void operator=(const vtkDistributedDataFilter&) = delete;
265 };
266 #endif
This class represents an axis-aligned Binary Spatial Partitioning of a 3D space.
Definition: vtkBSPCuts.h:45
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.
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.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
std::vector< int > UserRegionAssignments
static vtkDistributedDataFilter * New()
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Ensure previous filters don't send up ghost cells.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Build a vtkUnstructuredGrid to store the input.
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.
void SetController(vtkMultiProcessController *c)
Set/Get the communicator object.
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to create the correct type of data output.
a simple class to control print indentation
Definition: vtkIndent.h:34
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:58
@ info
Definition: vtkX3D.h:382
@ mode
Definition: vtkX3D.h:253
@ port
Definition: vtkX3D.h:453