VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Parallel
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
*/
40
#ifndef __vtkPBGLDistributedGraphHelper_h
41
#define __vtkPBGLDistributedGraphHelper_h
42
43
#include "
vtkDistributedGraphHelper.h
"
44
45
class
vtkPBGLDistributedGraphHelperInternals;
46
47
//BTX
48
namespace
boost {
namespace
graph {
namespace
distributed {
49
class
mpi_process_group;
50
} } }
51
//ETX
52
53
class
VTK_PARALLEL_EXPORT
vtkPBGLDistributedGraphHelper
:
public
vtkDistributedGraphHelper
54
{
55
public
:
56
vtkTypeMacro(
vtkPBGLDistributedGraphHelper
,
vtkDistributedGraphHelper
);
57
59
static
vtkPBGLDistributedGraphHelper
*
New
();
60
67
void
Synchronize
();
68
70
vtkDistributedGraphHelper
*
Clone
();
71
72
//BTX
74
75
boost::graph::distributed::mpi_process_group GetProcessGroup();
76
//ETX
78
81
vtkPBGLDistributedGraphHelperInternals *
Internals
;
82
83
void
PrintSelf
(ostream& os,
vtkIndent
indent);
84
85
protected
:
86
vtkPBGLDistributedGraphHelper
();
87
~
vtkPBGLDistributedGraphHelper
();
88
89
//BTX
90
enum
Tags
91
{
92
// Find a vertex by pedigree ID. This always has a reply.
93
FIND_VERTEX_TAG
,
94
95
// Find the source and target by edge ID. This always has a reply.
96
FIND_EDGE_SOURCE_TARGET_TAG
,
97
98
// Add a vertex with the given pedigree ID.
99
ADD_VERTEX_NO_REPLY_TAG
,
100
ADD_VERTEX_WITH_REPLY_TAG
,
101
102
// Add a vertex with the given property array.
103
ADD_VERTEX_PROPS_NO_REPLY_TAG
,
104
ADD_VERTEX_PROPS_WITH_REPLY_TAG
,
105
106
// Add a back edge; the forward edge has already been added.
107
ADD_DIRECTED_BACK_EDGE_TAG
,
108
ADD_UNDIRECTED_BACK_EDGE_TAG
,
109
110
// Add an edge; don't reply.
111
ADD_DIRECTED_EDGE_NO_REPLY_TAG
,
112
ADD_UNDIRECTED_EDGE_NO_REPLY_TAG
,
113
114
// Add an edge; return the edge ID.
115
ADD_DIRECTED_EDGE_WITH_REPLY_TAG
,
116
ADD_UNDIRECTED_EDGE_WITH_REPLY_TAG
,
117
118
// Add an edge via (pedigree, id); don't reply.
119
ADD_DIRECTED_EDGE_NI_NO_REPLY_TAG
,
120
ADD_UNDIRECTED_EDGE_NI_NO_REPLY_TAG
,
121
122
// Add an edge via (pedigree, id); return the edge ID.
123
ADD_DIRECTED_EDGE_NI_WITH_REPLY_TAG
,
124
ADD_UNDIRECTED_EDGE_NI_WITH_REPLY_TAG
,
125
126
// Add an edge via (id, pedigree); don't reply.
127
ADD_DIRECTED_EDGE_IN_NO_REPLY_TAG
,
128
ADD_UNDIRECTED_EDGE_IN_NO_REPLY_TAG
,
129
130
// Add an edge via (pedigree, pedigree); don't reply.
131
ADD_DIRECTED_EDGE_NN_NO_REPLY_TAG
,
132
ADD_UNDIRECTED_EDGE_NN_NO_REPLY_TAG
133
134
};
135
137
142
void
AddVertexInternal
(
vtkVariantArray
*propertyArr,
143
vtkIdType
*vertex);
145
148
void
AddVertexInternal
(
const
vtkVariant
& pedigreeId,
vtkIdType
*vertex);
149
151
155
void
AddEdgeInternal
(
vtkIdType
u,
vtkIdType
v,
bool
directed,
156
vtkVariantArray
*propertyArr,
157
vtkEdgeType
*edge);
159
161
167
void
AddEdgeInternal
(
const
vtkVariant
& uPedigreeId,
vtkIdType
v,
168
bool
directed,
vtkVariantArray
*propertyArr,
169
vtkEdgeType
*edge);
171
173
179
void
AddEdgeInternal
(
vtkIdType
u,
const
vtkVariant
& vPedigreeId,
180
bool
directed,
vtkVariantArray
*propertyArr,
181
vtkEdgeType
*edge);
183
185
192
void
AddEdgeInternal
(
const
vtkVariant
& uPedigreeId,
193
const
vtkVariant
& vPedigreeId,
194
bool
directed,
vtkVariantArray
*propertyArr,
195
vtkEdgeType
*edge);
196
// Description:
197
// Try to find the vertex with the given pedigree ID. Returns true and
198
// fills in the vertex ID if the vertex is found, and returns false
199
// otherwise;
200
vtkIdType
FindVertex
(
const
vtkVariant
& pedigreeId);
202
204
207
void
FindEdgeSourceAndTarget
(
vtkIdType
id
,
208
vtkIdType
*
source
,
vtkIdType
*
target
);
210
212
214
void
AttachToGraph
(
vtkGraph
*graph);
215
//ETX
217
218
private
:
219
vtkPBGLDistributedGraphHelper
(
const
vtkPBGLDistributedGraphHelper
&);
// Not implemented
220
void
operator=(
const
vtkPBGLDistributedGraphHelper
&);
// Not implemented
221
222
//BTX
223
friend
class
vtkPBGLDistributedGraphHelperInternals;
224
//ETX
225
};
226
227
#endif // __vtkPBGLDistributedGraphHelper_h
Generated on Wed May 30 2012 13:22:20 for VTK by
1.8.1