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 =========================================================================*/
25 #ifndef vtkDIYAggregateDataSetFilter_h
26 #define vtkDIYAggregateDataSetFilter_h
27 
28 #include "vtkFiltersParallelDIY2Module.h" // For export macro
30 
31 #include <map> // For passing computed data between methods
32 #include <string> // For passing computed data between methods
33 #include <vector> // For passing computed data between methods
34 
35 class vtkDataObject;
36 class vtkIdList;
37 
38 class VTKFILTERSPARALLELDIY2_EXPORT vtkDIYAggregateDataSetFilter : public vtkAggregateDataSetFilter
39 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
45 protected:
48 
49  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
50  vtkInformationVector* outputVector) override;
53  vtkInformationVector*) override;
54 
61  int GetTargetProcessId(int sourceProcessId, int numberOfProcesses);
62 
71  bool DoExtentsOverlap(int extent1[6], int extent2[6], int dimensions[3],
72  int* overlappingExtent);
73 
77  void GetExtent(vtkDataSet* dataSet, int extent[6]);
78 
83 
88  int MoveDataWithDIY(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
89  std::map<int, std::string>& serializedDataSets,
90  std::vector<std::string>& receivedDataSets);
91 
95  int MoveData(int inputExtent[6], int wholeExtent[6], int outputExtent[6],
96  std::map<int, std::string>& serializedDataSets,
97  std::vector<std::string>& receivedDataSets);
98 
104  int inputExent[6], int wholeExtent[6], int outputExtent[6], vtkIdList* processesIReceiveFrom);
105 
110  void ExtractRectilinearGridCoordinates(int* sourceExtent, int* targetExtent,
111  vtkDataArray* sourceCoordinates, vtkDataArray* targetCoordinates);
112 private:
114  void operator=(const vtkDIYAggregateDataSetFilter&) = delete;
115 
120  bool OutputInitialized;
121 };
122 
123 #endif
vtkDIYAggregateDataSetFilter::~vtkDIYAggregateDataSetFilter
~vtkDIYAggregateDataSetFilter() override
vtkDIYAggregateDataSetFilter::ExtractDataSetInformation
void ExtractDataSetInformation(vtkDataSet *source, vtkDataSet *target)
Extract information from source dataset into target dataset.
vtkDIYAggregateDataSetFilter::ExtractRectilinearGridCoordinates
void ExtractRectilinearGridCoordinates(int *sourceExtent, int *targetExtent, vtkDataArray *sourceCoordinates, vtkDataArray *targetCoordinates)
Put appropriate values from sourceCoordinates into targetCoordinates based on the extents overlap.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkDIYAggregateDataSetFilter::New
static vtkDIYAggregateDataSetFilter * New()
vtkDIYAggregateDataSetFilter::MoveData
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.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:825
vtkDIYAggregateDataSetFilter
Aggregates data sets to a reduced number of processes.
Definition: vtkDIYAggregateDataSetFilter.h:39
vtkDIYAggregateDataSetFilter::ComputeProcessesIReceiveFrom
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...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkDIYAggregateDataSetFilter::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkDIYAggregateDataSetFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDIYAggregateDataSetFilter::GetExtent
void GetExtent(vtkDataSet *dataSet, int extent[6])
Get the extent of the topologically regular dataset.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkAggregateDataSetFilter.h
vtkAggregateDataSetFilter
Aggregates data sets to a reduced number of processes.
Definition: vtkAggregateDataSetFilter.h:37
vtkDIYAggregateDataSetFilter::GetTargetProcessId
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::vtkDIYAggregateDataSetFilter
vtkDIYAggregateDataSetFilter()
vtkDIYAggregateDataSetFilter::DoExtentsOverlap
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...
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkDIYAggregateDataSetFilter::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:832
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkDIYAggregateDataSetFilter::MoveDataWithDIY
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.