00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00040 #ifndef __vtkPBGLDistributedGraphHelper_h
00041 #define __vtkPBGLDistributedGraphHelper_h
00042
00043 #include "vtkDistributedGraphHelper.h"
00044
00045 class vtkPBGLDistributedGraphHelperInternals;
00046
00047
00048 namespace boost { namespace graph { namespace distributed {
00049 class mpi_process_group;
00050 } } }
00051
00052
00053 class VTK_PARALLEL_EXPORT vtkPBGLDistributedGraphHelper : public vtkDistributedGraphHelper
00054 {
00055 public:
00056 vtkTypeRevisionMacro (vtkPBGLDistributedGraphHelper,
00057 vtkDistributedGraphHelper);
00058
00060 static vtkPBGLDistributedGraphHelper* New();
00061
00068 void Synchronize();
00069
00071 vtkDistributedGraphHelper *Clone();
00072
00073
00075
00076 boost::graph::distributed::mpi_process_group GetProcessGroup();
00077
00079
00082 vtkPBGLDistributedGraphHelperInternals *Internals;
00083
00084 protected:
00085 vtkPBGLDistributedGraphHelper();
00086 ~vtkPBGLDistributedGraphHelper();
00087
00088
00089 enum Tags
00090 {
00091
00092 FIND_VERTEX_TAG,
00093
00094 FIND_EDGE_SOURCE_TARGET_TAG,
00095
00096 ADD_VERTEX_NO_REPLY_TAG,
00097 ADD_VERTEX_WITH_REPLY_TAG,
00098
00099 ADD_VERTEX_PROPS_NO_REPLY_TAG,
00100 ADD_VERTEX_PROPS_WITH_REPLY_TAG,
00101
00102 ADD_DIRECTED_BACK_EDGE_TAG,
00103 ADD_UNDIRECTED_BACK_EDGE_TAG,
00104
00105 ADD_DIRECTED_EDGE_NO_REPLY_TAG,
00106 ADD_UNDIRECTED_EDGE_NO_REPLY_TAG,
00107
00108 ADD_DIRECTED_EDGE_WITH_REPLY_TAG,
00109 ADD_UNDIRECTED_EDGE_WITH_REPLY_TAG,
00110
00111 ADD_DIRECTED_EDGE_NI_NO_REPLY_TAG,
00112 ADD_UNDIRECTED_EDGE_NI_NO_REPLY_TAG,
00113
00114 ADD_DIRECTED_EDGE_NI_WITH_REPLY_TAG,
00115 ADD_UNDIRECTED_EDGE_NI_WITH_REPLY_TAG,
00116
00117 ADD_DIRECTED_EDGE_IN_NO_REPLY_TAG,
00118 ADD_UNDIRECTED_EDGE_IN_NO_REPLY_TAG,
00119
00120 ADD_DIRECTED_EDGE_NN_NO_REPLY_TAG,
00121 ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
00122 };
00123
00125
00130 void AddVertexInternal(vtkVariantArray *propertyArr,
00131 vtkIdType *vertex);
00133
00136 void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
00137
00139
00143 void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
00144 vtkVariantArray *propertyArr,
00145 vtkEdgeType *edge);
00147
00149
00155 void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
00156 bool directed, vtkVariantArray *propertyArr,
00157 vtkEdgeType *edge);
00159
00161
00167 void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
00168 bool directed, vtkVariantArray *propertyArr,
00169 vtkEdgeType *edge);
00171
00173
00180 void AddEdgeInternal(const vtkVariant& uPedigreeId,
00181 const vtkVariant& vPedigreeId,
00182 bool directed, vtkVariantArray *propertyArr,
00183 vtkEdgeType *edge);
00184
00185
00186
00187
00188 vtkIdType FindVertex(const vtkVariant& pedigreeId);
00190
00192
00195 void FindEdgeSourceAndTarget(vtkIdType id,
00196 vtkIdType *source, vtkIdType *target);
00198
00200
00202 void AttachToGraph(vtkGraph *graph);
00203
00205
00206 private:
00207 vtkPBGLDistributedGraphHelper(const vtkPBGLDistributedGraphHelper&);
00208 void operator=(const vtkPBGLDistributedGraphHelper&);
00209
00210
00211 friend class vtkPBGLDistributedGraphHelperInternals;
00212
00213 };
00214
00215 #endif // __vtkPBGLDistributedGraphHelper_h