-
Notifications
You must be signed in to change notification settings - Fork 54
/
triangulation_refine_local.html
406 lines (363 loc) · 12.4 KB
/
triangulation_refine_local.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<html>
<head>
<title>
TRIANGULATION_REFINE_LOCAL - Refine one Element of a Triangulation
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
TRIANGULATION_REFINE_LOCAL <br> Refine one Element of a Triangulation
</h1>
<hr>
<p>
<b>TRIANGULATION_REFINE_LOCAL</b>
is a MATLAB program which
tries to locally refine a triangulation by replacing one triangular
element by four smaller ones.
</p>
<p>
The refinement process introduces three new nodes, at the midsides of
the original element. This, in turn, will create what is called "hanging nodes"
on the neighboring elements, an undesirable feature. Therefore, each hanging
node is used to divide the neighboring element into two new elements. This
removes the hanging node problem.
</p>
<p>
Information about the triangulation is updated. In particular, the coordinates
of the three new nodes are assigned indexes, and added to the node coordinate array.
Four old elements are replaced by 10 new, smaller ones. This requires modifications
to the element-node array and to the element-neighbor array.
</p>
<p>
This process of refinement does not take into account the shape of the new
elements. The refinement process could create a new triangulation which no
longer has the Delaunay property. If this is a concern, then a simple expedient
is to retriangulate the nodes.
</p>
<p>
The program presented here presumed the triangulation involves order 3 elements,
that the element-node array lists the nodes in counter-clockwise order, and that
the element neighbor array indexes the element neighbors by the element node
that is opposite to them. If any of these assumptions do not hold for the
given data, the calculation will need to be modified.
</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>TRIANGULATION_REFINE_LOCAL</b> is available in
<a href = "../../m_src/triangulation_refine_local/triangulation_refine_local.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/table_delaunay/table_delaunay.html">
TABLE_DELAUNAY</a>,
a FORTRAN90 program which
can read a file of point coordinates and construct the
Delaunay triangulation for that set of points.
</p>
<p>
<a href = "../../c_src/triangle/triangle.html">
TRIANGLE</a>,
a C program which
computes a triangulation of a geometric region.
</p>
<p>
<a href = "../../m_src/triangulation/triangulation.html">
TRIANGULATION</a>,
a MATLAB library which
carries out various operations on order 3 ("linear") or order 6
("quadratic") triangulations.
</p>
<p>
<a href = "../../m_src/triangulation_boundary_edges/triangulation_boundary_edges.html">
TRIANGULATION_BOUNDARY_EDGES</a>,
a MATLAB program which
reads data defining a triangulation, determines which edges
lie on the boundary, organizes them into connected components,
and writes this information to a file.
</p>
<p>
<a href = "../../m_src/triangulation_boundary_nodes/triangulation_boundary_nodes.html">
TRIANGULATION_BOUNDARY_NODES</a>,
a MATLAB program which
reads data defining a triangulation, determines which nodes
lie on the boundary, and writes their coordinates to a file.
</p>
<p>
<a href = "../../m_src/triangulation_corner/triangulation_corner.html">
TRIANGULATION_CORNER</a>,
a MATLAB program which
patches triangulations so that no triangle has two sides on the boundary.
</p>
<p>
<a href = "../../m_src/triangulation_delaunay_discrepancy/triangulation_delaunay_discrepancy.html">
TRIANGULATION_DELAUNAY_DISCREPANCY</a>,
a MATLAB program which
measures the amount by which a triangulation fails the local Delaunay test;
</p>
<p>
<a href = "../../m_src/triangulation_display/triangulation_display.html">
TRIANGULATION_DISPLAY</a>,
a MATLAB program which
displays the nodes and elements of a triangulation on the MATLAB graphics screen;
</p>
<p>
<a href = "../../data/triangulation_order3/triangulation_order3.html">
TRIANGULATION_ORDER3</a>,
a data directory
which contains a description and
examples of order 3 triangulations.
</p>
<p>
<a href = "../../m_src/triangulation_orient/triangulation_orient.html">
TRIANGULATION_ORIENT</a>,
a MATLAB program which
reads data defining a triangulation, makes sure that
every triangle has positive orientation, and if not, writes a
corrected triangle file.
</p>
<p>
<a href = "../../m_src/triangulation_plot/triangulation_plot.html">
TRIANGULATION_PLOT</a>,
a MATLAB program which
reads data defining a triangulation and creates a
PostScript image of the nodes and triangles.
</p>
<p>
<a href = "../../m_src/triangulation_quality/triangulation_quality.html">
TRIANGULATION_QUALITY</a>,
a MATLAB program which
reads data defining a triangulation and computes a number
of quality measures.
</p>
<p>
<a href = "../../m_src/triangulation_refine/triangulation_refine.html">
TRIANGULATION_REFINE</a>,
a MATLAB program which
refines a triangulation.
</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>
Marc deBerg, Marc Krevald, Mark Overmars,
Otfried Schwarzkopf,<br>
Computational Geometry,<br>
Springer, 2000,<br>
ISBN: 3-540-65620-0.
</li>
<li>
Joseph ORourke,<br>
Computational Geometry,<br>
Second Edition,<br>
Cambridge, 1998,<br>
ISBN: 0521649765,<br>
LC: QA448.D38.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "file_column_count.m">file_column_count.m</a>,
counts the number of columns in the first line of a file;
</li>
<li>
<a href = "file_row_count.m">file_row_count.m</a>,
counts the number of rows in a file;
</li>
<li>
<a href = "grid_read.m">grid_read.m</a>,
reads files defining the node coordinates, element-node information,
and element-neighbor information.
</li>
<li>
<a href = "i4_modp.m">i4_modp.m</a>,
returns the nonnegative remainder of integer division;
</li>
<li>
<a href = "i4_wrap.m">i4_wrap.m</a>,
forces an integer to lie between given limits;
</li>
<li>
<a href = "i4mat_data_read.m">i4mat_data_read.m</a>,
reads a table from an I4MAT file.
</li>
<li>
<a href = "i4mat_header_read.m">i4mat_header_read.m</a>,
reads a header from an I4MAT file.
</li>
<li>
<a href = "i4mat_transpose_print.m">i4mat_transpose_print.m</a>,
prints an I4MAT, transposed;
</li>
<li>
<a href = "i4mat_transpose_print_some.m">
i4mat_transpose_print_some.m</a>,
prints some of an I4MAT, transposed;
</li>
<li>
<a href = "i4mat_write.m">i4mat_write.m</a>,
writes an I4MAT file.
</li>
<li>
<a href = "i4vec_find.m">i4vec_find.m</a>,
indexes the first occurrence of a specific value in an I4VEC.
</li>
<li>
<a href = "outlier.m">outlier.m</a>,
finds the element of one vector that is not a member of another vector;
</li>
<li>
<a href = "r8mat_data_read.m">r8mat_data_read.m</a>,
reads a table from an R8MAT file.
</li>
<li>
<a href = "r8mat_header_read.m">r8mat_header_read.m</a>,
reads a table header from an R8MAT file.
</li>
<li>
<a href = "r8mat_transpose_print.m">r8mat_transpose_print.m</a>,
prints the transpose of an R8MAT;
</li>
<li>
<a href = "r8mat_transpose_print_some.m">
r8mat_transpose_print_some.m</a>,
prints some of the transpose of an R8MAT;
</li>
<li>
<a href = "r8mat_write.m">r8mat_write.m</a>,
writes an R8MAT file.
</li>
<li>
<a href = "s_len_trim.m">s_len_trim.m</a>,
returns the length of a string to the last nonblank;
</li>
<li>
<a href = "s_word_count.m">s_word_count.m</a>,
counts the number of "words" in a string;
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>,
prints the current YMDHMS date as a timestamp.
</li>
<li>
<a href = "triangulation_refine_local.m">triangulation_refine_local.m</a>,
refines a triangulation, making the changes necessary so that one element
can be replaced by four smaller ones.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "triangulation_refine_local_test.m">triangulation_refine_local_test.m</a>,
counts the number of rows in a file;
</li>
<li>
<a href = "triangulation_refine_local_test_output.txt">
triangulation_refine_local_test_output.txt</a>,
the output file.
</li>
</ul>
</p>
<p>
<b>ELL3</b> is the original triangulation:
<ul>
<li>
<a href = "ell3_nodes.txt">ell3_nodes.txt</a>
the node coordinates.
</li>
<li>
<a href = "ell3_nodes.png">ell3_nodes.png</a>
an image of the nodes.
</li>
<li>
<a href = "ell3_elements.txt">ell3_elements.txt</a>
the elements.
</li>
<li>
<a href = "ell3_elements.png">ell3_elements.png</a>
a PNG image of the elements.
</li>
<li>
<a href = "ell3_element_neighbors.txt">
ell3_element_neighbors.txt</a>,
the neighbor triangles.
</li>
<li>
<a href = "ell3_element_neighbors.png">
ell3_element_neighbors.png</a>,
a PNG image of the neighbor information.
</li>
</ul>
</p>
<p>
<b>ELL3_REFINED</b> is the triangulation after element 11 has been refined:
<ul>
<li>
<a href = "ell3_refined_nodes.txt">ell3_refined_nodes.txt</a>
the node coordinates.
</li>
<li>
<a href = "ell3_refined_nodes.png">ell3_refined_nodes.png</a>
an image of the nodes.
</li>
<li>
<a href = "ell3_refined_elements.txt">ell3_refined_elements.txt</a>
the elements.
</li>
<li>
<a href = "ell3_refined_elements.png">ell3_refined_elements.png</a>
a PNG image of the elements.
</li>
<li>
<a href = "ell3_refined_element_neighbors.txt">
ell3_refined_element_neighbors.txt</a>,
the neighbor triangles.
</li>
<li>
<a href = "ell3_refined_element_neighbors.png">
ell3_refined_element_neighbors.png</a>,
a PNG image of the neighbor information.
</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 31 August 2011.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>