>> quad_mesh_test 16-Mar-2009 11:41:34 QUAD_MESH_TEST MATLAB version Tests for the routines in the QUAD_MESH library. QUAD_MESH_TEST01 ADJ_SIZE counts the node adjacencies. Number of adjacency entries is 118 Adjacency pointers: 1 1 3 2 4 7 3 8 11 4 12 15 5 16 18 6 19 22 7 23 27 8 28 32 9 33 37 10 38 42 11 43 45 12 46 49 13 50 54 14 55 59 15 60 64 16 65 69 17 70 73 18 74 77 19 78 82 20 83 87 21 88 92 22 93 97 23 98 100 24 101 103 25 104 107 26 108 111 27 112 115 28 116 118 QUAD_MESH_TEST02 AREA_Q4_MESH computes the area of each element in a Q4 mesh. Element areas: 1 0.191342 2 0.191342 3 0.191342 4 0.191342 5 0.191342 6 0.191342 7 0.191342 8 0.191342 9 0.574025 10 0.574025 11 0.574025 12 0.574025 13 0.574025 14 0.574025 15 0.574025 16 0.574025 17 0.956709 18 0.956709 19 0.956709 20 0.956709 21 0.956709 22 0.956709 23 0.956709 24 0.956709 25 1.339392 26 1.339392 27 1.339392 28 1.339392 29 1.339392 30 1.339392 31 1.339392 32 1.339392 Mesh = 24.491740 QUAD_MESH_TEST03 AREA_QUAD computes the area of a quadrilateral. Area = 4.500000 QUAD_MESH_TEST04 BOUNDARY_EDGE_COUNT_Q4_MESH counts the boundary edges by looking at the mesh and counting unpaired edges. Number of boundary edges = 22 Correct number = 22 QUAD_MESH_TEST05 BOUNDARY_EDGE_COUNT_EULER_Q4_MESH counts the boundary edges using Euler's formula. Number of boundary edges = 22 Correct number = 22 QUAD_MESH_TEST06 EXAMPLE1_Q4_MESH sets up example #1 Q4 mesh. Number of nodes = 28 Number of elements = 17 Number of holes = 1 Node coordinates: Row: 1 2 Col 1 0.000000 0.000000 2 1.000000 0.000000 3 2.000000 0.000000 4 3.000000 0.000000 5 4.000000 0.000000 6 0.000000 1.000000 7 1.000000 1.000000 8 2.000000 1.000000 9 3.000000 1.000000 10 4.000000 1.000000 11 5.000000 1.000000 12 0.000000 2.000000 13 1.000000 2.000000 14 2.000000 2.000000 15 3.000000 2.000000 16 4.000000 2.000000 17 5.000000 2.000000 18 0.000000 3.000000 19 1.000000 3.000000 20 2.000000 3.000000 21 3.000000 3.000000 22 4.000000 3.000000 23 5.000000 3.000000 24 0.000000 4.000000 25 1.000000 4.000000 26 2.000000 4.000000 27 3.000000 4.000000 28 4.000000 4.000000 Elements: Row: 1 2 3 4 Col 1 1 2 7 6 2 2 3 8 7 3 3 4 9 8 4 4 5 10 9 5 6 7 13 12 6 7 8 14 13 7 8 9 15 14 8 9 10 16 15 9 10 11 17 16 10 12 13 19 18 11 14 15 21 20 12 15 16 22 21 13 16 17 23 22 14 18 19 25 24 15 19 20 26 25 16 20 21 27 26 17 21 22 28 27 Element neighbors Row: 1 2 3 4 Col 1 -1 2 5 -1 2 -1 3 6 1 3 -1 4 7 2 4 -1 -1 8 3 5 1 6 10 -1 6 2 7 -2 5 7 3 8 11 6 8 4 9 12 7 9 -1 -1 13 8 10 5 -2 14 -1 11 7 12 16 -2 12 8 13 17 11 13 9 -1 -1 12 14 10 15 -1 -1 15 -2 16 -1 14 16 11 17 -1 15 17 12 -1 -1 16 QUAD_MESH_TEST07 EXAMPLE1_Q4_MESH sets up example #2 Q4 mesh. Number of nodes = 37 Number of elements = 32 Number of holes = 0 Node coordinates: Row: 1 2 Col 1 0.000000 0.000000 2 -1.000000 0.000000 3 -0.923880 0.382683 4 -0.707107 0.707107 5 -0.382683 0.923880 6 0.000000 1.000000 7 0.382683 0.923880 8 0.707107 0.707107 9 0.923880 0.382683 10 1.000000 0.000000 11 -2.000000 0.000000 12 -1.847759 0.765367 13 -1.414214 1.414214 14 -0.765367 1.847759 15 0.000000 2.000000 16 0.765367 1.847759 17 1.414214 1.414214 18 1.847759 0.765367 19 2.000000 0.000000 20 -3.000000 0.000000 21 -2.771639 1.148050 22 -2.121320 2.121320 23 -1.148050 2.771639 24 0.000000 3.000000 25 1.148050 2.771639 26 2.121320 2.121320 27 2.771639 1.148050 28 3.000000 0.000000 29 -4.000000 0.000000 30 -3.695518 1.530734 31 -2.828427 2.828427 32 -1.530734 3.695518 33 0.000000 4.000000 34 1.530734 3.695518 35 2.828427 2.828427 36 3.695518 1.530734 37 4.000000 0.000000 Elements: Row: 1 2 3 4 Col 1 1 1 3 2 2 1 1 4 3 3 1 1 5 4 4 1 1 6 5 5 1 1 7 6 6 1 1 8 7 7 1 1 9 8 8 1 1 10 9 9 2 3 12 11 10 3 4 13 12 11 4 5 14 13 12 5 6 15 14 13 6 7 16 15 14 7 8 17 16 15 8 9 18 17 16 9 10 19 18 17 11 12 21 20 18 12 13 22 21 19 13 14 23 22 20 14 15 24 23 21 15 16 25 24 22 16 17 26 25 23 17 18 27 26 24 18 19 28 27 25 20 21 30 29 26 21 22 31 30 27 22 23 32 31 28 23 24 33 32 29 24 25 34 33 30 25 26 35 34 31 26 27 36 35 32 27 28 37 36 Element neighbors Row: 1 2 3 4 Col 1 -1 2 9 -1 2 -1 3 10 1 3 -1 4 11 2 4 -1 5 12 3 5 -1 6 13 4 6 -1 7 14 5 7 -1 8 15 6 8 -1 -1 16 7 9 1 10 17 -1 10 2 11 18 9 11 3 12 19 10 12 4 13 20 11 13 5 14 21 12 14 6 15 22 13 15 7 16 23 14 16 8 -1 24 15 17 9 18 25 -1 18 10 19 26 17 19 11 20 27 18 20 12 21 28 19 21 13 22 29 20 22 14 23 30 21 23 15 24 31 22 24 16 -1 32 23 25 17 26 -1 -1 26 18 27 -1 25 27 19 28 -1 26 28 20 29 -1 27 29 21 30 -1 28 30 22 31 -1 29 31 23 32 -1 30 32 24 -1 -1 31 QUAD_MESH_TEST08 NEIGHBOR_ELEMENTS_Q4_MESH determines the adjacency relationships between elements. Element neighbors as reported by EXAMPLE1_Q4_MESH: Row: 1 2 3 4 Col 1 -1 2 5 -1 2 -1 3 6 1 3 -1 4 7 2 4 -1 -1 8 3 5 1 6 10 -1 6 2 7 -2 5 7 3 8 11 6 8 4 9 12 7 9 -1 -1 13 8 10 5 -2 14 -1 11 7 12 16 -2 12 8 13 17 11 13 9 -1 -1 12 14 10 15 -1 -1 15 -2 16 -1 14 16 11 17 -1 15 17 12 -1 -1 16 Element neighbors computed by NEIGHBOR_ELEMENTS_Q4_MESH: Row: 1 2 3 4 Col 1 -1 2 5 -1 2 -1 3 6 1 3 -1 4 7 2 4 -1 -1 8 3 5 1 6 10 -1 6 2 7 -1 5 7 3 8 11 6 8 4 9 12 7 9 -1 -1 13 8 10 5 -1 14 -1 11 7 12 16 -1 12 8 13 17 11 13 9 -1 -1 12 14 10 15 -1 -1 15 -1 16 -1 14 16 11 17 -1 15 17 12 -1 -1 16 QUAD_MESH_TEST09 Write Q4 Mesh Example #2 to files. Element neighbors written to "q4_mesh_ex2_element_neighbors.txt". Elements written to "q4_mesh_ex2_elements.txt". Node coordinates written to "q4_mesh_ex2_xy.txt". QUAD_MESH_TEST10 NODE_ORDER_4_MESH computes the order of the nodes in a Q4 mesh. NODE ORDER 1 1 2 2 3 2 4 2 5 1 6 2 7 4 8 4 9 4 10 3 11 1 12 2 13 3 14 3 15 4 16 4 17 2 18 2 19 3 20 3 21 4 22 3 23 1 24 1 25 2 26 2 27 2 28 1 QUAD_MESH_TEST105 SAMPLE_Q4_MESH returns uniform sample points from a Q4 mesh. X Y Element 1 3.089226 0.488422 4 2 3.507521 1.055805 8 3 0.751550 0.888312 1 4 2.107091 1.998359 7 5 2.307481 3.004187 16 6 1.649138 3.997364 15 7 0.662859 1.881452 5 8 0.831905 3.467250 14 9 1.954975 3.570996 15 10 3.369930 0.883239 4 11 0.785624 2.284026 10 12 3.656916 0.897305 4 13 1.751280 3.823214 15 14 1.136691 0.733518 2 15 2.127228 3.644808 16 16 2.866508 3.933107 16 17 0.521271 0.447549 1 18 0.390364 0.044626 1 19 2.454591 1.096793 7 20 2.233782 2.834886 11 QUAD_MESH_TEST11 SAMPLE_QUAD computes N random points in a quadrilateral. Write them to a file. Point coordinates written to "sample_quad.txt". QUAD_MESH_TEST Normal end of execution. 16-Mar-2009 11:41:39 >>