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  */
39 #ifndef vtkPBGLDistributedGraphHelper_h
40 #define vtkPBGLDistributedGraphHelper_h
41 
42 #include "vtkInfovisParallelModule.h" // For export macro
44 
45 class vtkPBGLDistributedGraphHelperInternals;
46 
47 namespace boost { namespace graph { namespace distributed {
48  class mpi_process_group;
49 } } }
50 
51 #if !defined(VTK_LEGACY_REMOVE)
52 class VTKINFOVISPARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
53 {
54  public:
56 
60  static vtkPBGLDistributedGraphHelper* New();
61 
70  void Synchronize();
71 
76 
80  boost::graph::distributed::mpi_process_group GetProcessGroup();
81 
86  vtkPBGLDistributedGraphHelperInternals *Internals;
87 
88  void PrintSelf(ostream& os, vtkIndent indent);
89 
90  protected:
93 
94  enum Tags
95  {
96  // Find a vertex by pedigree ID. This always has a reply.
98 
99  // Find the source and target by edge ID. This always has a reply.
101 
102  // Add a vertex with the given pedigree ID.
105 
106  // Add a vertex with the given property array.
109 
110  // Add a back edge; the forward edge has already been added.
113 
114  // Add an edge; don't reply.
117 
118  // Add an edge; return the edge ID.
121 
122  // Add an edge via (pedigree, id); don't reply.
125 
126  // Add an edge via (pedigree, id); return the edge ID.
129 
130  // Add an edge via (id, pedigree); don't reply.
133 
134  // Add an edge via (pedigree, pedigree); don't reply.
136  ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
137 
138  };
139 
147  void AddVertexInternal(vtkVariantArray *propertyArr,
148  vtkIdType *vertex);
149 
154  void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
155 
162  void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
163  vtkVariantArray *propertyArr,
164  vtkEdgeType *edge);
165 
174  void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
175  bool directed, vtkVariantArray *propertyArr,
176  vtkEdgeType *edge);
177 
186  void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
187  bool directed, vtkVariantArray *propertyArr,
188  vtkEdgeType *edge);
189 
199  void AddEdgeInternal(const vtkVariant& uPedigreeId,
200  const vtkVariant& vPedigreeId,
201  bool directed, vtkVariantArray *propertyArr,
202  vtkEdgeType *edge);
208  vtkIdType FindVertex(const vtkVariant& pedigreeId);
209 
215  void FindEdgeSourceAndTarget(vtkIdType id,
217 
222  void AttachToGraph(vtkGraph *graph);
223 
224  private:
226  void operator=(const vtkPBGLDistributedGraphHelper&) VTK_DELETE_FUNCTION;
227 
228  friend class vtkPBGLDistributedGraphHelperInternals;
229 
230 };
231 
232 #endif //VTK_LEGACY_REMOVE
233 #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:345
A atomic type representing the union of many types.
Definition: vtkVariant.h:69
Base class for graph data types.
Definition: vtkGraph.h:281
a simple class to control print indentation
Definition: vtkIndent.h:33
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