forked from johannesgerer/jburkardt-m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fem2d_mesh_display.html
359 lines (314 loc) · 9.58 KB
/
fem2d_mesh_display.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
<html>
<head>
<title>
FEM2D_MESH_DISPLAY - Display a Finite Element Mesh
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
FEM2D_MESH_DISPLAY <br> Display a Finite Element Mesh
</h1>
<hr>
<p>
<b>FEM2D_MESH_DISPLAY</b>
is a MATLAB program which
plots the nodes and elements of a finite element mesh.
</p>
<p>
FEM2D_MESH_DISPLAY reads the FEM model of a mesh, that is, a file listing
the node coordinates and a file listing the indices of the nodes
that form each polygonal element. It displays the mesh, with
optional number of nodes or elements.
</p>
<h3 align = "center">
Usage:
</h3>
<p>
<blockquote>
<b>fem2d_mesh_display</b> ( <i>'prefix'</i>, <i>node_vis</i>, <i>element_vis</i> )
</blockquote>
where <i>'prefix'</i> is the common prefix for the node and element files:
<ul>
<li>
<i>'prefix'</i><b>_nodes.txt</b>, the node coordinates.
</li>
<li>
<i>'prefix'</i><b>_elements.txt</b>, the element file
</li>
</ul>
and <i>node_vis</i> is an integer defining the node visibility:
<ul>
<li>
<b>0</b>, do not show the nodes;
</li>
<li>
<b>1</b>, show the nodes;
</li>
<li>
<b>2</b>, show the nodes and label them.
</li>
</ul>
and <i>element_vis</i> is an integer defining the element visibility:
<ul>
<li>
<b>0</b>, do not show the element;
</li>
<li>
<b>1</b>, show the element;
</li>
<li>
<b>2</b>, show the element and color them.
</li>
<li>
<b>3</b>, show the element and color them, and label them.
</li>
</ul>
</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>FEM2D_MESH_DISPLAY</b> is available in
<a href = "../../cpp_src/fem2d_mesh_display_opengl/fem2d_mesh_display_opengl.html">a C++ version</a> and
<a href = "../../m_src/fem2d_mesh_display/fem2d_mesh_display.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/bezier_surface_display/bezier_surface_display.html">
BEZIER_SURFACE_DISPLAY</a>,
a MATLAB program which
displays a Bezier surface;
</p>
<p>
<a href = "../../m_src/fem_basis_t3_display/fem_basis_t3_display.html">
FEM_BASIS_T3_DISPLAY</a>,
a MATLAB program which
displays a basis function associated with a linear triangle ("T3") mesh.
</p>
<p>
<a href = "../../m_src/fem_basis_t6_display/fem_basis_t6_display.html">
FEM_BASIS_T6_DISPLAY</a>,
a MATLAB program which
reads a quadratic triangle mesh and displays any associated basis function.
</p>
<p>
<a href = "../../m_src/fem2d_scalar_display/fem2d_scalar_display.html">
FEM2D_SCALAR_DISPLAY</a>,
a MATLAB program which
reads information about nodes, elements and nodal values for a
2D finite element method (FEM) and creates a surface plot of U(X,Y),
using the MATLAB graphics system.
</p>
<p>
<a href = "../../m_src/fem2d_scalar_display_gpl/fem2d_scalar_display_gpl.html">
FEM2D_SCALAR_DISPLAY_GPL</a>,
a MATLAB program which
reads information about nodes, elements and nodal values for a
2D finite element method (FEM) and creates a GPL file describing
a surface plot of U(X,Y), which can be displayed by gnuplot.
</p>
<p>
<a href = "../../examples/fenics_to_fem/fenics_to_fem.html">
FENICS_TO_FEM</a>,
examples which
illustrate how a mesh or scalar function computed by the FENICS program
can be written to FEM files, which can then be used to create
images, or as input to meshing programs or other analysis tools.
</p>
<p>
<a href = "../../m_src/grid_display/grid_display.html">
GRID_DISPLAY</a>,
a MATLAB library which
can display a 2D or 3D grid or sparse grid.
</p>
<p>
<a href = "../../m_src/gridlines/gridlines.html">
GRIDLINES</a>,
a MATLAB library which
gives the user more control over drawing gridlines on a graph
than the builtin "grid on" command.
</p>
<p>
<a href = "../../m_src/mpas_grid_display/mpas_grid_display.html">
MPAS_GRID_DISPLAY</a>,
a directory of MATLAB programs which
can read an MPAS NETCDF grid file and display the primary polygonal
mesh or the dual triangular mesh.
</p>
<p>
<a href = "../../m_src/ply_display/ply_display.html">
PLY_DISPLAY</a>,
a MATLAB program which
displays an image of a 3D graphics file in PLY format;
</p>
<p>
<a href = "../../m_src/polygonal_surface_display/polygonal_surface_display.html">
POLYGONAL_SURFACE_DISPLAY</a>,
a MATLAB program which
displays a surface in 3D described as a set of polygons;
</p>
<p>
<a href = "../../m_src/quad_surface_display/quad_surface_display.html">
QUAD_SURFACE_DISPLAY</a>,
a MATLAB program which
plots piecewise bilinear data associated with a QUAD_SURFACE, that is,
a 3D surface defined by a quadrilateral mesh;
</p>
<p>
<a href = "../../m_src/tet_mesh_display/tet_mesh_display.html">
TET_MESH_DISPLAY</a>,
ia MATLAB program which
reads in the node and tetra files defining a tet mesh and displays a wireframe
image.
</p>
<p>
<a href = "../../m_src/tri_surface_display/tri_surface_display.html">
TRI_SURFACE_DISPLAY</a>,
a MATLAB program which
reads data defining a triangular mesh
of a 3D surface and displays it.
</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 = "../../cpp_src/triangulation_display_opengl/triangulation_display_opengl.html">
TRIANGULATION_DISPLAY_OPENGL</a>,
a C++ program which
reads files defining a triangulation and displays an image using Open GL.
</p>
<p>
<a href = "../../m_src/triangulation_plot/triangulation_plot.html">
TRIANGULATION_PLOT</a>,
a MATLAB program which
plots a triangulation as a PostScript file.
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "fem2d_mesh_display.m">fem2d_mesh_display.m</a>
the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>DRAGON</b> is a mesh of hexagons.
<ul>
<li>
<a href = "dragon_nodes.txt">
dragon_nodes.txt</a>, the node coordinates.
</li>
<li>
<a href = "dragon_elements.txt">
dragon_elements.txt</a>, the nodes that form each element.
</li>
<li>
<a href = "dragon.png">
dragon.png</a>,
a PNG image of the mesh.
</li>
</ul>
</p>
<p>
<b>ELL</b> is an L-shaped region covered by triangles.
<ul>
<li>
<a href = "ell_nodes.txt">
ell_nodes.txt</a>, the node coordinates.
</li>
<li>
<a href = "ell_elements.txt">
ell_elements.txt</a>, the nodes that form each element.
</li>
<li>
<a href = "ell.png">
ell.png</a>,
a PNG image of the mesh.
</li>
</ul>
</p>
<p>
<b>RECT</b> is a rectangular region covered by quadrilaterals.
<ul>
<li>
<a href = "rect_nodes.txt">
rect_nodes.txt</a>, the node coordinates.
</li>
<li>
<a href = "rect_elements.txt">
rect_elements.txt</a>, the nodes that form each element.
</li>
<li>
<a href = "rect.png">
rect.png</a>,
a PNG image of the mesh.
</li>
</ul>
</p>
<p>
<b>Q4</b> is a rectangular region covered by quadrilaterals, with a hole.
<ul>
<li>
<a href = "q4_nodes.txt">
q4_nodes.txt</a>, the node coordinates.
</li>
<li>
<a href = "q4_elements.txt">
q4_elements.txt</a>, the nodes that form each element.
</li>
<li>
<a href = "q4.png">
q4.png</a>,
a PNG image of the mesh.
</li>
</ul>
</p>
<p>
<b>HEX</b> is a mesh of hexagons.
<ul>
<li>
<a href = "hex_nodes.txt">
hex_nodes.txt</a>, the node coordinates.
</li>
<li>
<a href = "hex_elements.txt">
hex_elements.txt</a>, the nodes that form each element.
</li>
<li>
<a href = "hex.png">
hex.png</a>,
a PNG image of the mesh.
</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 12 October 2014.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>