18-Feb-2019 12:33:19 quad_mesh_test MATLAB version Test quad_mesh. QUAD_MESH_TEST01 ADJ_SIZE counts the node adjacencies. Number of adjacency entries is 186 Adjacency pointers: 1 1 4 2 5 10 3 11 16 4 17 22 5 23 26 6 27 32 7 33 41 8 42 50 9 51 59 10 60 67 11 68 71 12 72 77 13 78 85 14 86 93 15 94 102 16 103 111 17 112 117 18 118 123 19 124 131 20 132 139 21 140 148 22 149 156 23 157 160 24 161 164 25 165 170 26 171 176 27 177 182 28 183 186 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_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". EXAMPLE1_Q4_MESH_TEST 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 EXAMPLE1_Q4_MESH_PLOT EXAMPLE1_Q4_MESH sets up example #1 Q4 mesh. PLOT_Q4_MESH plots it. Number of nodes = 28 Number of elements = 17 Number of holes = 1 EXAMPLE2_Q4_MESH_TEST 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 EXAMPLE2_Q4_MESH_PLOT EXAMPLE2_Q4_MESH sets up example #2 Q4 mesh. PLOT_Q4_MESH plots it. Number of nodes = 37 Number of elements = 32 Number of holes = 0 EXAMPLE3_Q4_MESH_TEST EXAMPLE3_Q4_MESH sets up example #3 Q4 mesh. Number of nodes = 45 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 2.000000 0.000000 4 3.000000 0.000000 5 4.000000 0.000000 6 5.000000 0.000000 7 6.000000 0.000000 8 7.000000 0.000000 9 8.000000 0.000000 10 0.000000 1.000000 11 1.000000 1.000000 12 2.000000 1.000000 13 3.000000 1.000000 14 4.000000 1.000000 15 5.000000 1.000000 16 6.000000 1.000000 17 7.000000 1.000000 18 8.000000 1.000000 19 0.000000 2.000000 20 1.000000 2.000000 21 2.000000 2.000000 22 3.000000 2.000000 23 4.000000 2.000000 24 5.000000 2.000000 25 6.000000 2.000000 26 7.000000 2.000000 27 8.000000 2.000000 28 0.000000 3.000000 29 1.000000 3.000000 30 2.000000 3.000000 31 3.000000 3.000000 32 4.000000 3.000000 33 5.000000 3.000000 34 6.000000 3.000000 35 7.000000 3.000000 36 8.000000 3.000000 37 0.000000 4.000000 38 1.000000 4.000000 39 2.000000 4.000000 40 3.000000 4.000000 41 4.000000 4.000000 42 5.000000 4.000000 43 6.000000 4.000000 44 7.000000 4.000000 45 8.000000 4.000000 Elements: Row: 1 2 3 4 Col 1 1 2 11 10 2 2 3 12 11 3 3 4 13 12 4 4 5 14 13 5 5 6 15 14 6 6 7 16 15 7 7 8 17 16 8 8 9 18 17 9 10 11 20 19 10 11 12 21 20 11 12 13 22 21 12 13 14 23 22 13 14 15 24 23 14 15 16 25 24 15 16 17 26 25 16 17 18 27 26 17 19 20 29 28 18 20 21 30 29 19 21 22 31 30 20 22 23 32 31 21 23 24 33 32 22 24 25 34 33 23 25 26 35 34 24 26 27 36 35 25 28 29 38 37 26 29 30 39 38 27 30 31 40 39 28 31 32 41 40 29 32 33 42 41 30 33 34 43 42 31 34 35 44 43 32 35 36 45 44 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 EXAMPLE3_Q4_MESH_PLOT EXAMPLE3_Q4_MESH sets up example #3 Q4 mesh. PLOT_Q4_MESH plots it. Number of nodes = 45 Number of elements = 32 Number of holes = 0 EXAMPLE4_Q4_MESH_TEST EXAMPLE4_Q4_MESH sets up example #4 Q4 mesh. Number of nodes = 45 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 2.000000 0.000000 4 3.000000 0.000000 5 4.000000 0.000000 6 5.000000 0.000000 7 5.340000 0.000000 8 6.340000 0.000000 9 7.340000 0.000000 10 0.000000 1.000000 11 1.000000 1.000000 12 2.000000 1.000000 13 3.000000 1.000000 14 4.000000 1.000000 15 5.000000 1.000000 16 5.340000 1.000000 17 6.340000 1.000000 18 7.340000 1.000000 19 0.000000 1.340000 20 1.000000 1.340000 21 2.000000 1.340000 22 3.000000 1.340000 23 4.000000 1.340000 24 5.000000 1.340000 25 5.340000 1.340000 26 6.340000 1.340000 27 7.340000 1.340000 28 0.000000 2.340000 29 1.000000 2.340000 30 2.000000 2.340000 31 3.000000 2.340000 32 4.000000 2.340000 33 5.000000 2.340000 34 5.340000 2.340000 35 6.340000 2.340000 36 7.340000 2.340000 37 0.000000 3.340000 38 1.000000 3.340000 39 2.000000 3.340000 40 3.000000 3.340000 41 4.000000 3.340000 42 5.000000 3.340000 43 5.340000 3.340000 44 6.340000 3.340000 45 7.340000 3.340000 Elements: Row: 1 2 3 4 Col 1 1 2 11 10 2 2 3 12 11 3 3 4 13 12 4 4 5 14 13 5 5 6 15 14 6 6 7 16 15 7 7 8 17 16 8 8 9 18 17 9 10 11 20 19 10 11 12 21 20 11 12 13 22 21 12 13 14 23 22 13 14 15 24 23 14 15 16 25 24 15 16 17 26 25 16 17 18 27 26 17 19 20 29 28 18 20 21 30 29 19 21 22 31 30 20 22 23 32 31 21 23 24 33 32 22 24 25 34 33 23 25 26 35 34 24 26 27 36 35 25 28 29 38 37 26 29 30 39 38 27 30 31 40 39 28 31 32 41 40 29 32 33 42 41 30 33 34 43 42 31 34 35 44 43 32 35 36 45 44 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 EXAMPLE4_Q4_MESH_PLOT EXAMPLE4_Q4_MESH sets up example #4 Q4 mesh. PLOT_Q4_MESH plots it. Number of nodes = 45 Number of elements = 32 Number of holes = 0 quad_mesh_test Normal end of execution. 18-Feb-2019 12:33:22