VTK
vtkPBGLCollectGraph.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLCollectGraph.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
53 #ifndef vtkPBGLCollectGraph_h
54 #define vtkPBGLCollectGraph_h
55 
56 #include "vtkInfovisParallelModule.h" // For export macro
57 #include "vtkStdString.h" // For string type
58 
59 #include <utility> // for pair
60 #include <numeric> // for accumulate, partial_sum
61 #include <functional> // for plus
62 
63 #include "vtkGraphAlgorithm.h"
64 
65 class vtkSelection;
67 
68 #if !defined(VTK_LEGACY_REMOVE)
69 class VTKINFOVISPARALLEL_EXPORT vtkPBGLCollectGraph : public vtkGraphAlgorithm
70 {
71 public:
72  static vtkPBGLCollectGraph *New();
74  void PrintSelf(ostream& os, vtkIndent indent);
75 
77 
84  vtkGetMacro(TargetProcessor, int);
85  vtkSetMacro(TargetProcessor, int);
87 
89 
95  vtkGetMacro(ReplicateGraph, bool);
96  vtkSetMacro(ReplicateGraph, bool);
97  vtkBooleanMacro(ReplicateGraph, bool);
99 
101 
105  vtkGetMacro(CopyVertexData, bool);
106  vtkSetMacro(CopyVertexData, bool);
107  vtkBooleanMacro(CopyVertexData, bool);
109 
111 
115  vtkGetMacro(CopyEdgeData, bool);
116  vtkSetMacro(CopyEdgeData, bool);
117  vtkBooleanMacro(CopyEdgeData, bool);
119 
121 
126  vtkGetMacro(CreateOriginProcessArray, bool);
127  vtkSetMacro(CreateOriginProcessArray, bool);
128  vtkBooleanMacro(CreateOriginProcessArray, bool);
130 
132 
136  vtkSetStringMacro(OriginProcessArrayName);
138 
139 protected:
142 
143  virtual int RequestData(
144  vtkInformation *,
147 
148  virtual int FillInputPortInformation(
149  int port, vtkInformation* info);
150 
151  virtual int FillOutputPortInformation(
152  int port, vtkInformation* info);
153 
159  void CopyStructureOfDataSetAttributes(vtkDataSetAttributes *inAttrs,
160  vtkDataSetAttributes *outAttrs,
161  vtkIdType numberOfTuples);
162 
163 private:
164  int TargetProcessor;
165  bool ReplicateGraph;
166  bool CopyVertexData;
167  bool CopyEdgeData;
168  bool CreateOriginProcessArray;
169  char * OriginProcessArrayName;
170 
171  vtkPBGLCollectGraph(const vtkPBGLCollectGraph&) VTK_DELETE_FUNCTION;
172  void operator=(const vtkPBGLCollectGraph&) VTK_DELETE_FUNCTION;
173 
174 };
175 
176 #endif //VTK_LEGACY_REMOVE
177 #endif
vtkStdString.h
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:54
vtkDistributedGraphHelper
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces.
Definition: vtkDistributedGraphHelper.h:80
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:58
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkSelection
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:43
vtkGraphAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkPBGLCollectGraph
Collects all of the pieces of a distributed vtkGraph into a single, non-distributed vtkGraph.
Definition: vtkPBGLCollectGraph.h:69
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()