VTK  9.7.1
vtkDIYAggregateDataSetFilter.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
13 #ifndef vtkDIYAggregateDataSetFilter_h
14 #define vtkDIYAggregateDataSetFilter_h
15 
17 #include "vtkFiltersParallelDIY2Module.h" // For export macro
18 
19 #include <map> // For passing computed data between methods
20 #include <string> // For passing computed data between methods
21 #include <vector> // For passing computed data between methods
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkDataObject;
25 class vtkIdList;
26 
27 class VTKFILTERSPARALLELDIY2_EXPORT vtkDIYAggregateDataSetFilter : public vtkAggregateDataSetFilter
28 {
30 
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
35 protected:
37  ~vtkDIYAggregateDataSetFilter() override;
38 
39  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
40  vtkInformationVector* outputVector) override;
42 
49  int GetTargetProcessId(int sourceProcessId, int numberOfProcesses);
50 
59  bool DoExtentsOverlap(
60  int extent1[6], int extent2[6], int dimensions[3], int overlappingExtent[6]);
61 
65  void GetExtent(vtkDataSet* dataSet, int extent[6]);
66 
70  void ExtractDataSetInformation(vtkDataSet* source, vtkDataSet* target);
71 
76  int MoveDataWithDIY(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
77  std::map<int, std::string>& serializedDataSets, std::vector<std::string>& receivedDataSets);
78 
82  int MoveData(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
83  std::map<int, std::string>& serializedDataSets, std::vector<std::string>& receivedDataSets);
84 
89  void ComputeProcessesIReceiveFrom(
90  int inputExent[6], int wholeExtent[6], int outputExtent[6], vtkIdList* processesIReceiveFrom);
91 
96  void ExtractRectilinearGridCoordinates(int* sourceExtent, int* targetExtent,
97  vtkDataArray* sourceCoordinates, vtkDataArray* targetCoordinates);
98 
99 private:
101  void operator=(const vtkDIYAggregateDataSetFilter&) = delete;
102 
107  bool OutputInitialized;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif
Aggregates data sets to a reduced number of processes.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkAggregateDataSetFilter * New()
a simple class to control print indentation
Definition: vtkIndent.h:28
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
list of point or cell ids
Definition: vtkIdList.h:25
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
Aggregates data sets to a reduced number of processes.
general representation of visualization data
Definition: vtkDataObject.h:55