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 vtkTypeMacro(vtkPBGLDistributedGraphHelper,vtkDistributedGraphHelper);
00057
00059 static vtkPBGLDistributedGraphHelper* New();
00060
00067 void Synchronize();
00068
00070 vtkDistributedGraphHelper *Clone();
00071
00072
00074
00075 boost::graph::distributed::mpi_process_group GetProcessGroup();
00076
00078
00081 vtkPBGLDistributedGraphHelperInternals *Internals;
00082
00083 void PrintSelf(ostream& os, vtkIndent indent);
00084
00085 protected:
00086 vtkPBGLDistributedGraphHelper();
00087 ~vtkPBGLDistributedGraphHelper();
00088
00089
00090 enum Tags
00091 {
00092
00093 FIND_VERTEX_TAG,
00094
00095
00096 FIND_EDGE_SOURCE_TARGET_TAG,
00097
00098
00099 ADD_VERTEX_NO_REPLY_TAG,
00100 ADD_VERTEX_WITH_REPLY_TAG,
00101
00102
00103 ADD_VERTEX_PROPS_NO_REPLY_TAG,
00104 ADD_VERTEX_PROPS_WITH_REPLY_TAG,
00105
00106
00107 ADD_DIRECTED_BACK_EDGE_TAG,
00108 ADD_UNDIRECTED_BACK_EDGE_TAG,
00109
00110
00111 ADD_DIRECTED_EDGE_NO_REPLY_TAG,
00112 ADD_UNDIRECTED_EDGE_NO_REPLY_TAG,
00113
00114
00115 ADD_DIRECTED_EDGE_WITH_REPLY_TAG,
00116 ADD_UNDIRECTED_EDGE_WITH_REPLY_TAG,
00117
00118
00119 ADD_DIRECTED_EDGE_NI_NO_REPLY_TAG,
00120 ADD_UNDIRECTED_EDGE_NI_NO_REPLY_TAG,
00121
00122
00123 ADD_DIRECTED_EDGE_NI_WITH_REPLY_TAG,
00124 ADD_UNDIRECTED_EDGE_NI_WITH_REPLY_TAG,
00125
00126
00127 ADD_DIRECTED_EDGE_IN_NO_REPLY_TAG,
00128 ADD_UNDIRECTED_EDGE_IN_NO_REPLY_TAG,
00129
00130
00131 ADD_DIRECTED_EDGE_NN_NO_REPLY_TAG,
00132 ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
00133
00134 };
00135
00137
00142 void AddVertexInternal(vtkVariantArray *propertyArr,
00143 vtkIdType *vertex);
00145
00148 void AddVertexInternal(const vtkVariant& pedigreeId, vtkIdType *vertex);
00149
00151
00155 void AddEdgeInternal(vtkIdType u, vtkIdType v, bool directed,
00156 vtkVariantArray *propertyArr,
00157 vtkEdgeType *edge);
00159
00161
00167 void AddEdgeInternal(const vtkVariant& uPedigreeId, vtkIdType v,
00168 bool directed, vtkVariantArray *propertyArr,
00169 vtkEdgeType *edge);
00171
00173
00179 void AddEdgeInternal(vtkIdType u, const vtkVariant& vPedigreeId,
00180 bool directed, vtkVariantArray *propertyArr,
00181 vtkEdgeType *edge);
00183
00185
00192 void AddEdgeInternal(const vtkVariant& uPedigreeId,
00193 const vtkVariant& vPedigreeId,
00194 bool directed, vtkVariantArray *propertyArr,
00195 vtkEdgeType *edge);
00196
00197
00198
00199
00200 vtkIdType FindVertex(const vtkVariant& pedigreeId);
00202
00204
00207 void FindEdgeSourceAndTarget(vtkIdType id,
00208 vtkIdType *source, vtkIdType *target);
00210
00212
00214 void AttachToGraph(vtkGraph *graph);
00215
00217
00218 private:
00219 vtkPBGLDistributedGraphHelper(const vtkPBGLDistributedGraphHelper&);
00220 void operator=(const vtkPBGLDistributedGraphHelper&);
00221
00222
00223 friend class vtkPBGLDistributedGraphHelperInternals;
00224
00225 };
00226
00227 #endif // __vtkPBGLDistributedGraphHelper_h