VTK
vtkPBGLDistributedGraphHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBGLDistributedGraphHelper.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 (C) 2008 The Trustees of Indiana University.
17  * Use, modification and distribution is subject to the Boost Software
18  * License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)
19  */
42 #ifndef vtkPBGLDistributedGraphHelper_h
43 #define vtkPBGLDistributedGraphHelper_h
44 
45 #include "vtkInfovisParallelModule.h" // For export macro
47 
48 class vtkPBGLDistributedGraphHelperInternals;
49 
50 namespace boost { namespace graph { namespace distributed {
51  class mpi_process_group;
52 } } }
53 
54 #if !defined(VTK_LEGACY_REMOVE)
55 class VTKINFOVISPARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
56 {
57  public:
59 
63  static vtkPBGLDistributedGraphHelper* New();
64 
73  void Synchronize();
74 
79 
83  boost::graph::distributed::mpi_process_group GetProcessGroup();
84 
89  vtkPBGLDistributedGraphHelperInternals *Internals;
90 
91  void PrintSelf(ostream& os, vtkIndent indent);
92 
93  protected:
96 
97  enum Tags
98  {
99  // Find a vertex by pedigree ID. This always has a reply.
101 
102  // Find the source and target by edge ID. This always has a reply.
104 
105  // Add a vertex with the given pedigree ID.
108 
109  // Add a vertex with the given property array.
112 
113  // Add a back edge; the forward edge has already been added.
116 
117  // Add an edge; don't reply.
120 
121  // Add an edge; return the edge ID.
124 
125  // Add an edge via (pedigree, id); don't reply.
128 
129  // Add an edge via (pedigree, id); return the edge ID.
132 
133  // Add an edge via (id, pedigree); don't reply.
136 
137  // Add an edge via (pedigree, pedigree); don't reply.
139  ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
140 
141  };
142 
150  void AddVertexInternal(vtkVariantArray *propertyArr,
151  vtkIdType *vertex);
152 
157  void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
158 
165  void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
166  vtkVariantArray *propertyArr,
167  vtkEdgeType *edge);
168 
177  void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
178  bool directed, vtkVariantArray *propertyArr,
179  vtkEdgeType *edge);
180 
189  void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
190  bool directed, vtkVariantArray *propertyArr,
191  vtkEdgeType *edge);
192 
202  void AddEdgeInternal(const vtkVariant& uPedigreeId,
203  const vtkVariant& vPedigreeId,
204  bool directed, vtkVariantArray *propertyArr,
205  vtkEdgeType *edge);
211  vtkIdType FindVertex(const vtkVariant& pedigreeId);
212 
218  void FindEdgeSourceAndTarget(vtkIdType id,
220 
225  void AttachToGraph(vtkGraph *graph);
226 
227  private:
229  void operator=(const vtkPBGLDistributedGraphHelper&) VTK_DELETE_FUNCTION;
230 
231  friend class vtkPBGLDistributedGraphHelperInternals;
232 
233 };
234 
235 #endif //VTK_LEGACY_REMOVE
236 #endif // vtkPBGLDistributedGraphHelper_h
helper for the vtkGraph class that allows the graph to be distributed across multiple memory spaces...
Forward declaration required for Boost serialization.
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
An array holding vtkVariants.
int vtkIdType
Definition: vtkType.h:287
A atomic type representing the union of many types.
Definition: vtkVariant.h:75
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPBGLDistributedGraphHelperInternals * Internals
The Parallel BGL-specific internal information for this distributed graph.
boost::graph_traits< vtkGraph *>::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
end namespace boost::graph::distributed