VTK
vtkDIYAggregateDataSetFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDIYAggregateDataSetFilter.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 =========================================================================*/
22 #ifndef vtkDIYAggregateDataSetFilter_h
23 #define vtkDIYAggregateDataSetFilter_h
24 
25 #include "vtkFiltersParallelDIY2Module.h" // For export macro
27 
28 #include <map> // For passing computed data between methods
29 #include <string> // For passing computed data between methods
30 #include <vector> // For passing computed data between methods
31 
32 class vtkDataObject;
33 class vtkIdList;
34 
35 class VTKFILTERSPARALLELDIY2_EXPORT vtkDIYAggregateDataSetFilter : public vtkAggregateDataSetFilter
36 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42 protected:
44  ~vtkDIYAggregateDataSetFilter() override;
45 
46  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
47  vtkInformationVector* outputVector) override;
50  vtkInformationVector*) override;
51 
58  int GetTargetProcessId(int sourceProcessId, int numberOfProcesses);
59 
68  bool DoExtentsOverlap(int extent1[6], int extent2[6], int dimensions[3],
69  int* overlappingExtent);
70 
74  void GetExtent(vtkDataSet* dataSet, int extent[6]);
75 
79  void ExtractDataSetInformation(vtkDataSet* source, vtkDataSet* target);
80 
85  int MoveDataWithDIY(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
86  std::map<int, std::string>& serializedDataSets,
87  std::vector<std::string>& receivedDataSets);
88 
92  int MoveData(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
93  std::map<int, std::string>& serializedDataSets,
94  std::vector<std::string>& receivedDataSets);
95 
100  void ComputeProcessesIReceiveFrom(
101  int inputExent[6], int wholeExtent[6], int outputExtent[6], vtkIdList* processesIReceiveFrom);
102 
107  void ExtractRectilinearGridCoordinates(int* sourceExtent, int* targetExtent,
108  vtkDataArray* sourceCoordinates, vtkDataArray* targetCoordinates);
109 private:
111  void operator=(const vtkDIYAggregateDataSetFilter&) = delete;
112 
117  bool OutputInitialized;
118 };
119 
120 #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.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
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:33
list of point or cell ids
Definition: vtkIdList.h:30
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
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:58