-
Notifications
You must be signed in to change notification settings - Fork 56
/
neighbors_to_metis_graph.html
229 lines (192 loc) · 6.32 KB
/
neighbors_to_metis_graph.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<html>
<head>
<title>
NEIGHBORS_TO_METIS_GRAPH - Reformat Tet Mesh Neighbor File
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
NEIGHBORS_TO_METIS_GRAPH <br> Reformat Tet Mesh Neighbor File
</h1>
<hr>
<p>
<b>NEIGHBORS_TO_METIS_GRAPH</b>
is a MATLAB program which
reads a file describing
the graph-theoretic adjacency structure of the
elements in a mesh of triangles or tetrahedrons and writes out a similar file
that is suitable for input to the mesh partitioning
program <a href = "../../c_src/metis/metis.html">METIS</a>.
</p>
<p>
Since we know we are dealing with a triangle or tet mesh, each "node" of
the adjacency graph has 3 or 4 potential edges. If a potential
edge is not used (in other words, if a face is a boundary face),
then by convention we write out a "-1" for the neighbor value.
Otherwise, the adjacency information lists the index of the
element that is a neighbor on that face of the
element
</p>
<p>
Converting to a METIS GRAPH format is trivial. We include
an initial line that lists the number of "nodes" (elements)
and "edges" (interfaces between pairs of elements), followed by,
for each node (element), a list of the adjacent nodes (a list
of the adjacent elements, omitting the "-1" values). A cross-eyed
schoolboy sitting on a tack would be able to carry out this task!
</p>
<h3 align = "center">
Usage:
</h3>
<p>
<blockquote>
<b>neighbors_to_metis_graph</b> ( <i>'neighbor_file'</i> )
</blockquote>
where
<ul>
<li>
<i>'neighbor_file'</i> contains the list of neighbor elements to each element;
</li>
</ul>
reads the data in <i>'neighbor_file'</i>, rearranges it to
suit <b>METIS</b>, and writes out the modified data to
<i>'metis_graph_file'</i>.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>NEIGHBORS_TO_METIS_GRAPH</b> is available in
<a href = "../../cpp_src/neighbors_to_metis_graph/neighbors_to_metis_graph.html">a C++ version</a> and
<a href = "../../f_src/neighbors_to_metis_graph/neighbors_to_metis_graph.html">a FORTRAN90 version</a> and
<a href = "../../m_src/neighbors_to_metis_graph/neighbors_to_metis_graph.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Programs:
</h3>
<p>
<a href = "../../c_src/graphchk/graphchk.html">
GRAPHCHK</a>,
a C program which
uses the METIS library to check
that a METIS graph file has the proper format;
</p>
<p>
<a href = "../../c_src/kmetis/kmetis.html">
KMETIS</a>,
a C program which
uses the <a href = "metis/metis.html">METIS</a> library to partition
the nodes of a graph in a balanced way, useful for parallel
processing;
</p>
<p>
<a href = "../../c_src/metis/metis.html">
METIS</a>,
a C library which
partitions the nodes of a graph or the elements of a mesh, for division among
a number of parallel processes, or to reorder the variables in a sparse
matrix to minimize fillin;
</p>
<p>
<a href = "../../data/metis_graph/metis_graph.html">
METIS_GRAPH</a>,
a data directory which
contains examples of METIS GRAPH files,
the format for graphs to be read by METIS,
which can partition a graph;
</p>
<p>
<a href = "../../c_src/oemetis/oemetis.html">
OEMETIS</a>,
a C program which
uses the <a href = "metis/metis.html">METIS</a> library to reorder
the variables in a sparse matrix.
</p>
<p>
<a href = "../../c_src/onmetis/onmetis.html">
ONMETIS</a>,
a C program which
uses the METIS library to reorder
the variables in a sparse matrix.
</p>
<p>
<a href = "../../c_src/pmetis/pmetis.html">
PMETIS</a>,
a C program which
uses the METIS library to partition
the nodes of a graph in a balanced way, useful for parallel processing;
</p>
<p>
<a href = "../../m_src/tet_mesh_tet_neighbors/tet_mesh_tet_neighbors.html">
TET_MESH_TET_NEIGHBORS</a>,
a MATLAB program which
reads information about a tet mesh and writes out a list of the
tetrahedrons that are adjacent to a given tetrahedron;
</p>
<p>
<a href = "../../m_src/triangulation_triangle_neighbors/triangulation_triangle_neighbors.html">
TRIANGULATION_TRIANGLE_NEIGHBORS</a>,
a MATLAB program which
reads data defining a triangulation, determines the neighboring
triangles of each triangle, and writes that information to a file.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
George Karypis, Vipin Kumar,<br>
METIS, a Software Package for Partitioning Unstructured Graphs
and Computing Fill-Reduced Orderings of Sparse Matrices;
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "neighbors_to_metis_graph.m">neighbors_to_metis_graph.m</a>
the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "cube_tetra.neighbors">cube_tetra.neighbors</a>,
a sample tet mesh neighbor file that can be used as input
to the program.
</li>
<li>
<a href = "cube_tetra.metis_graph">cube_tetra.metis_graph</a>,
the modified tet mesh neighbor file created by the program,
suitable for input to <b>METIS</b>.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last revised on 15 October 2008.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>