VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPBGLCollectGraph.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00050 #ifndef __vtkPBGLCollectGraph_h 00051 #define __vtkPBGLCollectGraph_h 00052 00053 #include "vtkInfovisParallelModule.h" // For export macro 00054 #include "vtkStdString.h" // For string type 00055 00056 #include <vtksys/stl/utility> // for pair 00057 #include <vtksys/stl/numeric> // for accumulate, partial_sum 00058 #include <vtksys/stl/functional> // for plus 00059 00060 #include "vtkGraphAlgorithm.h" 00061 00062 class vtkSelection; 00063 class vtkDistributedGraphHelper; 00064 00065 class VTKINFOVISPARALLEL_EXPORT vtkPBGLCollectGraph : public vtkGraphAlgorithm 00066 { 00067 public: 00068 static vtkPBGLCollectGraph *New(); 00069 vtkTypeMacro(vtkPBGLCollectGraph, vtkGraphAlgorithm); 00070 void PrintSelf(ostream& os, vtkIndent indent); 00071 00073 00077 vtkGetMacro(TargetProcessor, int); 00078 vtkSetMacro(TargetProcessor, int); 00080 00082 00086 vtkGetMacro(ReplicateGraph, bool); 00087 vtkSetMacro(ReplicateGraph, bool); 00088 vtkBooleanMacro(ReplicateGraph, bool); 00090 00092 00094 vtkGetMacro(CopyVertexData, bool); 00095 vtkSetMacro(CopyVertexData, bool); 00096 vtkBooleanMacro(CopyVertexData, bool); 00098 00100 00102 vtkGetMacro(CopyEdgeData, bool); 00103 vtkSetMacro(CopyEdgeData, bool); 00104 vtkBooleanMacro(CopyEdgeData, bool); 00106 00108 00111 vtkGetMacro(CreateOriginProcessArray, bool); 00112 vtkSetMacro(CreateOriginProcessArray, bool); 00113 vtkBooleanMacro(CreateOriginProcessArray, bool); 00115 00117 00119 vtkSetStringMacro(OriginProcessArrayName); 00121 00122 protected: 00123 vtkPBGLCollectGraph(); 00124 ~vtkPBGLCollectGraph(); 00125 00126 virtual int RequestData( 00127 vtkInformation *, 00128 vtkInformationVector **, 00129 vtkInformationVector *); 00130 00131 virtual int FillInputPortInformation( 00132 int port, vtkInformation* info); 00133 00134 virtual int FillOutputPortInformation( 00135 int port, vtkInformation* info); 00136 00138 00141 void CopyStructureOfDataSetAttributes(vtkDataSetAttributes *inAttrs, 00142 vtkDataSetAttributes *outAttrs, 00143 vtkIdType numberOfTuples); 00145 00146 private: 00147 int TargetProcessor; 00148 bool ReplicateGraph; 00149 bool CopyVertexData; 00150 bool CopyEdgeData; 00151 bool CreateOriginProcessArray; 00152 char * OriginProcessArrayName; 00153 00154 vtkPBGLCollectGraph(const vtkPBGLCollectGraph&); // Not implemented. 00155 void operator=(const vtkPBGLCollectGraph&); // Not implemented. 00156 00157 }; 00158 00159 #endif