28-Apr-2023 07:18:07 quad_mesh_test() MATLAB/Octave version 5.2.0 Test quad_mesh(). quad_mesh_test01(): adj_size_q4_mesh() 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.33939 26: 1.33939 27: 1.33939 28: 1.33939 29: 1.33939 30: 1.33939 31: 1.33939 32: 1.33939 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 1.433589 3.324182 15 2 0.630354 3.393000 14 3 0.623463 0.380139 1 4 0.114286 3.854800 14 5 3.051444 3.904235 17 6 0.970404 0.486135 1 7 3.396209 2.052043 12 8 1.069781 0.970293 2 9 4.343322 2.248721 13 10 4.946050 1.344815 9 11 3.627030 1.897984 8 12 0.923837 3.877714 14 13 0.444397 2.570928 10 14 4.606333 1.952717 9 15 1.005973 1.432890 6 16 4.177414 2.462907 13 17 4.716293 1.848628 9 18 0.853663 0.238561 1 19 3.975903 2.490566 12 20 1.649625 1.541489 6 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 0 2: 1 0 3: 2 0 4: 3 0 5: 4 0 6: 0 1 7: 1 1 8: 2 1 9: 3 1 10: 4 1 11: 5 1 12: 0 2 13: 1 2 14: 2 2 15: 3 2 16: 4 2 17: 5 2 18: 0 3 19: 1 3 20: 2 3 21: 3 3 22: 4 3 23: 5 3 24: 0 4 25: 1 4 26: 2 4 27: 3 4 28: 4 4 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 0 2: -1 1.22465e-16 3: -0.92388 0.382683 4: -0.707107 0.707107 5: -0.382683 0.92388 6: 6.12323e-17 1 7: 0.382683 0.92388 8: 0.707107 0.707107 9: 0.92388 0.382683 10: 1 0 11: -2 2.44929e-16 12: -1.84776 0.765367 13: -1.41421 1.41421 14: -0.765367 1.84776 15: 1.22465e-16 2 16: 0.765367 1.84776 17: 1.41421 1.41421 18: 1.84776 0.765367 19: 2 0 20: -3 3.67394e-16 21: -2.77164 1.14805 22: -2.12132 2.12132 23: -1.14805 2.77164 24: 1.83697e-16 3 25: 1.14805 2.77164 26: 2.12132 2.12132 27: 2.77164 1.14805 28: 3 0 29: -4 4.89859e-16 30: -3.69552 1.53073 31: -2.82843 2.82843 32: -1.53073 3.69552 33: 2.44929e-16 4 34: 1.53073 3.69552 35: 2.82843 2.82843 36: 3.69552 1.53073 37: 4 0 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 0 2: 1 0 3: 2 0 4: 3 0 5: 4 0 6: 5 0 7: 6 0 8: 7 0 9: 8 0 10: 0 1 11: 1 1 12: 2 1 13: 3 1 14: 4 1 15: 5 1 16: 6 1 17: 7 1 18: 8 1 19: 0 2 20: 1 2 21: 2 2 22: 3 2 23: 4 2 24: 5 2 25: 6 2 26: 7 2 27: 8 2 28: 0 3 29: 1 3 30: 2 3 31: 3 3 32: 4 3 33: 5 3 34: 6 3 35: 7 3 36: 8 3 37: 0 4 38: 1 4 39: 2 4 40: 3 4 41: 4 4 42: 5 4 43: 6 4 44: 7 4 45: 8 4 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 0 2: 1 0 3: 2 0 4: 3 0 5: 4 0 6: 5 0 7: 5.34 0 8: 6.34 0 9: 7.34 0 10: 0 1 11: 1 1 12: 2 1 13: 3 1 14: 4 1 15: 5 1 16: 5.34 1 17: 6.34 1 18: 7.34 1 19: 0 1.34 20: 1 1.34 21: 2 1.34 22: 3 1.34 23: 4 1.34 24: 5 1.34 25: 5.34 1.34 26: 6.34 1.34 27: 7.34 1.34 28: 0 2.34 29: 1 2.34 30: 2 2.34 31: 3 2.34 32: 4 2.34 33: 5 2.34 34: 5.34 2.34 35: 6.34 2.34 36: 7.34 2.34 37: 0 3.34 38: 1 3.34 39: 2 3.34 40: 3 3.34 41: 4 3.34 42: 5 3.34 43: 5.34 3.34 44: 6.34 3.34 45: 7.34 3.34 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. 28-Apr-2023 07:18:09