Debian Codegraph @

packages/intrepid/matlab/intrelab/mesh/test_triangle_mesh_reader.m

raw
1 %
2 % AUTHOR: Denis Ridzal
3 % Computational and Applied Mathematics
4 % Rice University
5 %
6
7 % get point, triangle and edge information from file
8 % '../mesh2_datagrid_airport/airport.1'
9 filename = '../mesh2_data/grid_airport/airport.1';
10
11 fprintf(1,' read mesh data from %s \n', filename)
12 [mesh] = triangle_mesh_reader( filename );
13
14 figure(1)
15 plot_mesh2(mesh);
16 axis('tight','equal')
17
18 % refine the mesh
19 % NOTE: Currently, this currently only works properly for
20 % triangles wiht 3 nodes. If triangles have 6 nodes,
21 % only mesh.t(:,1:3) is used
22
23 fprintf(1,' refine the mesh \n')
24 [mesh1,I1]=reg_mesh_refine2(mesh);
25 % plot the mesh
26 figure(2)
27 plot_mesh2(mesh1);
28 axis('tight','equal')
29
30 fprintf(1,' refine the mesh again \n')
31 [mesh2,I2]=reg_mesh_refine2(mesh1);
32 % plot the mesh
33 figure(3)
34 plot_mesh2(mesh2);
35 axis('tight','equal')