VTK
dox/Parallel/vtkPBGLCollectGraph.h
Go to the documentation of this file.
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 "vtkStdString.h" // For string type
00054 
00055 #include <vtksys/stl/utility> // for pair
00056 #include <vtksys/stl/numeric> // for accumulate, partial_sum
00057 #include <vtksys/stl/functional> // for plus
00058 
00059 #include "vtkGraphAlgorithm.h"
00060 
00061 class vtkSelection;
00062 class vtkDistributedGraphHelper;
00063 
00064 class VTK_PARALLEL_EXPORT vtkPBGLCollectGraph : public vtkGraphAlgorithm
00065 {
00066 public:
00067   static vtkPBGLCollectGraph *New();
00068   vtkTypeMacro(vtkPBGLCollectGraph, vtkGraphAlgorithm);
00069   void PrintSelf(ostream& os, vtkIndent indent);
00070 
00072 
00076   vtkGetMacro(TargetProcessor, int);
00077   vtkSetMacro(TargetProcessor, int);
00079 
00081 
00085   vtkGetMacro(ReplicateGraph, bool);
00086   vtkSetMacro(ReplicateGraph, bool);
00087   vtkBooleanMacro(ReplicateGraph, bool);
00089 
00091 
00093   vtkGetMacro(CopyVertexData, bool);
00094   vtkSetMacro(CopyVertexData, bool);
00095   vtkBooleanMacro(CopyVertexData, bool);
00097 
00099 
00101   vtkGetMacro(CopyEdgeData, bool);
00102   vtkSetMacro(CopyEdgeData, bool);
00103   vtkBooleanMacro(CopyEdgeData, bool);
00105 
00107 
00110   vtkGetMacro(CreateOriginProcessArray, bool);
00111   vtkSetMacro(CreateOriginProcessArray, bool);
00112   vtkBooleanMacro(CreateOriginProcessArray, bool);
00114 
00116 
00118   vtkSetStringMacro(OriginProcessArrayName);
00120 
00121 protected:
00122   vtkPBGLCollectGraph();
00123   ~vtkPBGLCollectGraph();
00124 
00125   virtual int RequestData(
00126     vtkInformation *,
00127     vtkInformationVector **,
00128     vtkInformationVector *);
00129 
00130   virtual int FillInputPortInformation(
00131     int port, vtkInformation* info);
00132 
00133   virtual int FillOutputPortInformation(
00134     int port, vtkInformation* info);
00135 
00137 
00140   void CopyStructureOfDataSetAttributes(vtkDataSetAttributes *inAttrs,
00141                                         vtkDataSetAttributes *outAttrs,
00142                                         vtkIdType numberOfTuples);
00144 
00145 private:
00146   int TargetProcessor;
00147   bool ReplicateGraph;
00148   bool CopyVertexData;
00149   bool CopyEdgeData;
00150   bool CreateOriginProcessArray;
00151   char * OriginProcessArrayName;
00152 
00153   vtkPBGLCollectGraph(const vtkPBGLCollectGraph&);  // Not implemented.
00154   void operator=(const vtkPBGLCollectGraph&);  // Not implemented.
00155 
00156 };
00157 
00158 #endif