VTK  9.0.1
vtkDIYKdTreeUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDIYKdTreeUtilities.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 =========================================================================*/
24 #ifndef vtkDIYKdTreeUtilities_h
25 #define vtkDIYKdTreeUtilities_h
26 
27 #include "vtkBoundingBox.h" // for vtkBoundingBox
28 #include "vtkDIYExplicitAssigner.h" // for vtkDIYExplicitAssigner
29 #include "vtkFiltersParallelDIY2Module.h" // for export macros
30 #include "vtkObject.h"
31 #include "vtkSmartPointer.h" // for vtkSmartPointer
32 #include <vector> // for std::vector
33 
34 class vtkDataObject;
35 class vtkDataSet;
36 class vtkIntArray;
39 class vtkPoints;
41 
42 class VTKFILTERSPARALLELDIY2_EXPORT vtkDIYKdTreeUtilities : public vtkObject
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
61  static std::vector<vtkBoundingBox> GenerateCuts(vtkDataObject* dobj, int number_of_partitions,
62  bool use_cell_centers, vtkMultiProcessController* controller = nullptr,
63  const double* local_bounds = nullptr);
64 
78  static std::vector<vtkBoundingBox> GenerateCuts(
79  const std::vector<vtkSmartPointer<vtkPoints> >& points, int number_of_partitions,
80  vtkMultiProcessController* controller = nullptr, const double* local_bounds = nullptr);
81 
97 
106  static bool GenerateGlobalCellIds(vtkPartitionedDataSet* parts,
107  vtkMultiProcessController* controller, vtkIdType* mb_offset = nullptr);
108 
117  static std::vector<int> ComputeAssignments(int num_blocks, int num_ranks);
118 
124  static vtkDIYExplicitAssigner CreateAssigner(diy::mpi::communicator& comm, int num_blocks);
125 
126 protected:
128  ~vtkDIYKdTreeUtilities() override;
129 
130 private:
132  void operator=(const vtkDIYKdTreeUtilities&) = delete;
133 };
134 
135 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkX3D::vector
@ vector
Definition: vtkX3D.h:243
vtkPartitionedDataSet
composite dataset to encapsulates a dataset consisting of partitions.
Definition: vtkPartitionedDataSet.h:46
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkSmartPointer< vtkPoints >
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkDIYExplicitAssigner.h
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:75
vtkDIYKdTreeUtilities
collection of utility functions for DIY-based KdTree algorithm
Definition: vtkDIYKdTreeUtilities.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
vtkSmartPointer.h
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDIYExplicitAssigner
assigner for use with DIY
Definition: vtkDIYExplicitAssigner.h:47
vtkBoundingBox.h
vtkObject.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:92
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59