06-Jul-2023 10:21:40 tet_mesh_test(): MATLAB/Octave version 5.2.0 Test tet_mesh(). tet_mesh_test001(): r8mat_solve() solves linear systems. The linear system: Col: 1 2 3 4 5 Row 1 : 1 2 3 14 7 2 : 4 5 6 32 16 3 : 7 8 0 23 7 The computed solutions Col: 1 2 Row 1 : 1 1 2 : 2 0 3 : 3 2 tet_mesh_test002(): tetrahedron_order4_physical_to_reference() maps a physical point to a reference point. tetrahedron_order4_reference_to_physical() maps a reference point to a physical point. ( R, S, T ) ==> ( X, Y, Z ) ==> ( R2, S2, T2 ) 0.039781 0.453754 0.338676 5.458019 1.246183 0.677352 0.039781 0.453754 0.338676 0.090732 0.000110 0.892910 6.165105 0.893130 1.785820 0.090732 0.000110 0.892910 0.394861 0.099042 0.403229 6.587811 0.601313 0.806458 0.394861 0.099042 0.403229 0.047569 0.284566 0.639669 5.782378 1.208802 1.279339 0.047569 0.284566 0.639669 0.017443 0.610999 0.102462 5.154791 1.324459 0.204924 0.017443 0.610999 0.102462 0.011941 0.298723 0.278504 5.314327 0.875949 0.557007 0.011941 0.298723 0.278504 0.215873 0.030252 0.170860 5.818481 0.231364 0.341721 0.215873 0.030252 0.170860 0.043523 0.229400 0.594335 5.724904 1.053135 1.188670 0.043523 0.229400 0.594335 0.235567 0.114723 0.396039 6.102742 0.625485 0.792079 0.235567 0.114723 0.396039 0.594366 0.000425 0.028985 6.812084 0.029835 0.057970 0.594366 0.000425 0.028985 tet_mesh_test003(): tetrahedron_order10_to_order4() makes a linear (order 4) tet mesh by using the existing nodes, and replacing each quadratic tetrahedron by 8 linear tetrahedrons. First 5 quadratic tetrahedrons: Row: 1 2 3 4 5 6 7 8 9 10 Col 1: 4 3 5 1 16 19 17 11 10 12 2: 4 2 5 1 13 19 14 11 9 12 3: 4 7 3 5 21 16 18 19 24 17 4: 4 7 8 5 21 22 27 19 24 25 5: 4 6 2 5 20 13 15 19 23 14 Quadratic mesh size is 6 Linearized mesh size will be 48 First 5 linear tetrahedrons: Row: 1 2 3 4 Col 1: 4 16 19 17 2: 3 16 11 10 3: 5 19 11 10 4: 1 17 10 12 5: 16 19 17 10 tet_mesh_test004(): tet_mesh_node_order() determines the order of each node in a tet mesh. The order of a node is the number of tetrahedrons that use the node as part of their definition. This mesh has tetrahedron order 10 The number of tetrahedrons is 6 The tet mesh Row: 1 2 3 4 5 6 7 8 9 10 Col 1: 4 3 5 1 16 19 17 11 10 12 2: 4 2 5 1 13 19 14 11 9 12 3: 4 7 3 5 21 16 18 19 24 17 4: 4 7 8 5 21 22 27 19 24 25 5: 4 6 2 5 20 13 15 19 23 14 6: 4 6 8 5 20 22 26 19 23 25 Node orders: 1: 2 2: 2 3: 2 4: 6 5: 6 6: 2 7: 2 8: 2 9: 1 10: 1 11: 2 12: 2 13: 2 14: 2 15: 1 16: 2 17: 2 18: 1 19: 6 20: 2 21: 2 22: 2 23: 2 24: 2 25: 2 26: 1 27: 1 Check that the following are equal: Number of tetrahedrons * order = 60 Sum of node orders = 60 tet_mesh_test005(): tetrahedron_barycentric() computes the barycentric coordinates of a point. Random tetrahedron: Row: 1 2 3 Col 1: 0.327411 0.960452 0.574656 2: 0.586337 0.804238 0.0939874 3: 0.241741 0.763905 0.799812 4: 0.419021 0.653128 0.0886856 C1 = 0.037125 0.600943 0.255102 0.106831 C2 = 0.037125 0.600943 0.255102 0.106831 C1 = 0.133730 0.462843 0.301421 0.102006 C2 = 0.133730 0.462843 0.301421 0.102006 C1 = 0.150539 0.156677 0.350400 0.342383 C2 = 0.150539 0.156677 0.350400 0.342383 C1 = 0.373234 0.042860 0.097765 0.486141 C2 = 0.373234 0.042860 0.097765 0.486141 C1 = 0.213475 0.296777 0.122367 0.367380 C2 = 0.213475 0.296777 0.122367 0.367380 Random tetrahedron: Row: 1 2 3 Col 1: 0.00816602 0.121106 0.0180766 2: 0.7481 0.975686 0.490227 3: 0.891449 0.0711789 0.0219963 4: 0.406286 0.846873 0.248623 C1 = 0.302707 0.292402 0.102678 0.302212 C2 = 0.302707 0.292402 0.102678 0.302212 C1 = 0.303622 0.283627 0.316516 0.096234 C2 = 0.303622 0.283627 0.316516 0.096234 C1 = 0.401146 0.349591 0.214914 0.034350 C2 = 0.401146 0.349591 0.214914 0.034350 C1 = 0.242798 0.144800 0.551280 0.061123 C2 = 0.242798 0.144800 0.551280 0.061123 C1 = 0.048212 0.217537 0.349147 0.385103 C2 = 0.048212 0.217537 0.349147 0.385103 Random tetrahedron: Row: 1 2 3 Col 1: 0.00131685 0.91417 0.672462 2: 0.417905 0.216953 0.735368 3: 0.348691 0.77264 0.723071 4: 0.700726 0.264397 0.159634 C1 = 0.398571 0.082180 0.175869 0.343380 C2 = 0.398571 0.082180 0.175869 0.343380 C1 = 0.469238 0.217129 0.050905 0.262728 C2 = 0.469238 0.217129 0.050905 0.262728 C1 = 0.259097 0.018386 0.376070 0.346448 C2 = 0.259097 0.018386 0.376070 0.346448 C1 = 0.048608 0.197808 0.271338 0.482246 C2 = 0.048608 0.197808 0.271338 0.482246 C1 = 0.362902 0.505633 0.119837 0.011627 C2 = 0.362902 0.505633 0.119837 0.011627 tet_mesh_test006(): tet_mesh_tet_neighbors() computes the 4 neighboring tetrahedrons of each tetrahedron in a tet mesh. containing a point. This mesh has tetrahedron order 4 The number of tetrahedrons is 144 First 10 Tets: Row: 1 2 3 4 Col 1: 1 2 4 10 2: 2 4 5 10 3: 2 5 10 11 4: 2 3 5 11 5: 4 5 10 13 6: 3 5 6 11 7: 5 10 11 13 8: 4 5 7 13 9: 5 6 8 14 10: 5 7 8 13 First 10 Tet Neighbors: Row: 1 2 3 4 Col 1: 2 -1 -1 -1 2: 5 3 1 -1 3: 7 -1 4 2 4: 6 3 -1 -1 5: 7 -1 8 2 6: 15 14 4 -1 7: 21 24 5 3 8: 10 -1 5 -1 9: 11 20 15 -1 10: 19 20 8 -1 tet_mesh_test007(): tet_mesh_search_naive() uses a naive algorithm to search a tetrahedral mesh for the tetrahedron containing a point. tet_mesh_search_delaunay() uses a faster algorithm which is appropriate if the tet mesh is Delaunay. This mesh has tetrahedron order 4 The number of tetrahedrons is 144 Point was chosen from tetrahedron 131 Naive search ended in tetrahedron 131 after 131 steps Delaunay search ended in tetrahedron 131 after 10 steps. Point was chosen from tetrahedron 45 Naive search ended in tetrahedron 45 after 45 steps Delaunay search ended in tetrahedron 45 after 14 steps. Point was chosen from tetrahedron 101 Naive search ended in tetrahedron 101 after 101 steps Delaunay search ended in tetrahedron 101 after 14 steps. Point was chosen from tetrahedron 27 Naive search ended in tetrahedron 27 after 27 steps Delaunay search ended in tetrahedron 27 after 15 steps. Point was chosen from tetrahedron 143 Naive search ended in tetrahedron 143 after 143 steps Delaunay search ended in tetrahedron 143 after 20 steps. tet_mesh_test(): Normal end of execution. 06-Jul-2023 10:21:42