VTK  9.3.20240424
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
23VTK_ABI_NAMESPACE_BEGIN
24class vtkDataObject;
25class vtkIdList;
26
27class VTKFILTERSPARALLELDIY2_EXPORT vtkDIYAggregateDataSetFilter : public vtkAggregateDataSetFilter
28{
30
31public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
35protected:
38
39 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
40 vtkInformationVector* outputVector) override;
42
49 int GetTargetProcessId(int sourceProcessId, int numberOfProcesses);
50
59 bool DoExtentsOverlap(int extent1[6], int extent2[6], int dimensions[3], int* overlappingExtent);
60
64 void GetExtent(vtkDataSet* dataSet, int extent[6]);
65
70
75 int MoveDataWithDIY(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
76 std::map<int, std::string>& serializedDataSets, std::vector<std::string>& receivedDataSets);
77
81 int MoveData(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
82 std::map<int, std::string>& serializedDataSets, std::vector<std::string>& receivedDataSets);
83
89 int inputExent[6], int wholeExtent[6], int outputExtent[6], vtkIdList* processesIReceiveFrom);
90
95 void ExtractRectilinearGridCoordinates(int* sourceExtent, int* targetExtent,
96 vtkDataArray* sourceCoordinates, vtkDataArray* targetCoordinates);
97
98private:
100 void operator=(const vtkDIYAggregateDataSetFilter&) = delete;
101
106 bool OutputInitialized;
107};
108
109VTK_ABI_NAMESPACE_END
110#endif
Aggregates data sets to a reduced number of processes.
Aggregates data sets to a reduced number of processes.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
bool DoExtentsOverlap(int extent1[6], int extent2[6], int dimensions[3], int *overlappingExtent)
Given two extents and dimensions (marking whether or not we have cells in that dimension with a value...
void ExtractRectilinearGridCoordinates(int *sourceExtent, int *targetExtent, vtkDataArray *sourceCoordinates, vtkDataArray *targetCoordinates)
Put appropriate values from sourceCoordinates into targetCoordinates based on the extents overlap.
int GetTargetProcessId(int sourceProcessId, int numberOfProcesses)
Given a source process id and number of processes, return a target process id for the aggregate opera...
~vtkDIYAggregateDataSetFilter() override
void GetExtent(vtkDataSet *dataSet, int extent[6])
Get the extent of the topologically regular dataset.
int MoveData(int inputExtent[6], int wholeExtent[6], int outputExtent[6], std::map< int, std::string > &serializedDataSets, std::vector< std::string > &receivedDataSets)
Move data directly with vtkMPIController.
void ExtractDataSetInformation(vtkDataSet *source, vtkDataSet *target)
Extract information from source dataset into target dataset.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int MoveDataWithDIY(int inputExtent[6], int wholeExtent[6], int outputExtent[6], std::map< int, std::string > &serializedDataSets, std::vector< std::string > &receivedDataSets)
Move data with DIY.
static vtkDIYAggregateDataSetFilter * New()
void ComputeProcessesIReceiveFrom(int inputExent[6], int wholeExtent[6], int outputExtent[6], vtkIdList *processesIReceiveFrom)
Determine which processes I receive data and put those process ranks (in order) into processesIReceiv...
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)