08-Oct-2025 20:42:39 tet_mesh_test(): MATLAB/Octave version 6.4.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.236392 0.167948 0.141941 5.851116 0.477836 0.283881 0.236392 0.167948 0.141941 0.374284 0.064483 0.264867 6.387720 0.393833 0.529734 0.374284 0.064483 0.264867 0.110471 0.399469 0.176011 5.507424 0.974948 0.352021 0.110471 0.399469 0.176011 0.044685 0.397485 0.294988 5.429042 1.089957 0.589976 0.044685 0.397485 0.294988 0.038975 0.540471 0.155755 5.272679 1.236697 0.311510 0.038975 0.540471 0.155755 0.499195 0.035856 0.235396 6.732980 0.307108 0.470792 0.499195 0.035856 0.235396 0.110614 0.370153 0.155346 5.487188 0.895652 0.310692 0.110614 0.370153 0.155346 0.245530 0.200662 0.369746 6.106337 0.771069 0.739493 0.245530 0.200662 0.369746 0.020027 0.441346 0.018453 5.078533 0.901145 0.036905 0.020027 0.441346 0.018453 0.132580 0.034270 0.196935 5.594675 0.265475 0.393870 0.132580 0.034270 0.196935 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.882897 0.590365 0.531973 2: 0.963887 0.739271 0.570121 3: 0.103241 0.181012 0.105436 4: 0.41596 0.205206 0.0802375 C1 = 0.139209 0.270597 0.290804 0.299389 C2 = 0.139209 0.270597 0.290804 0.299389 C1 = 0.406537 0.074114 0.259901 0.259448 C2 = 0.406537 0.074114 0.259901 0.259448 C1 = 0.375456 0.047824 0.299884 0.276836 C2 = 0.375456 0.047824 0.299884 0.276836 C1 = 0.372801 0.141894 0.294068 0.191237 C2 = 0.372801 0.141894 0.294068 0.191237 C1 = 0.006297 0.427577 0.447167 0.118959 C2 = 0.006297 0.427577 0.447167 0.118959 Random tetrahedron: Row: 1 2 3 Col 1: 0.185306 0.786292 0.174257 2: 0.712886 0.226276 0.569054 3: 0.917097 0.589234 0.305936 4: 0.430058 0.839355 0.580665 C1 = 0.217146 0.233069 0.373939 0.175846 C2 = 0.217146 0.233069 0.373939 0.175846 C1 = 0.314943 0.220088 0.309573 0.155395 C2 = 0.314943 0.220088 0.309573 0.155395 C1 = 0.260990 0.211284 0.246327 0.281400 C2 = 0.260990 0.211284 0.246327 0.281400 C1 = 0.111785 0.157830 0.518239 0.212146 C2 = 0.111785 0.157830 0.518239 0.212146 C1 = 0.146892 0.258865 0.246680 0.347564 C2 = 0.146892 0.258865 0.246680 0.347564 Random tetrahedron: Row: 1 2 3 Col 1: 0.857906 0.216951 0.540993 2: 0.223026 0.558984 0.365695 3: 0.821493 0.75121 0.866238 4: 0.754972 0.221959 0.798538 C1 = 0.397921 0.178113 0.214960 0.209006 C2 = 0.397921 0.178113 0.214960 0.209006 C1 = 0.329170 0.328636 0.342080 0.000113 C2 = 0.329170 0.328636 0.342080 0.000113 C1 = 0.153668 0.295670 0.222893 0.327769 C2 = 0.153668 0.295670 0.222893 0.327769 C1 = 0.058254 0.448903 0.275532 0.217311 C2 = 0.058254 0.448903 0.275532 0.217311 C1 = 0.109763 0.043376 0.405621 0.441241 C2 = 0.109763 0.043376 0.405621 0.441241 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 105 Naive search ended in tetrahedron 105 after 105 steps Delaunay search ended in tetrahedron 105 after 9 steps. Point was chosen from tetrahedron 36 Naive search ended in tetrahedron 36 after 36 steps Delaunay search ended in tetrahedron 36 after 14 steps. Point was chosen from tetrahedron 5 Naive search ended in tetrahedron 5 after 5 steps Delaunay search ended in tetrahedron 5 after 7 steps. Point was chosen from tetrahedron 22 Naive search ended in tetrahedron 22 after 22 steps Delaunay search ended in tetrahedron 22 after 6 steps. Point was chosen from tetrahedron 103 Naive search ended in tetrahedron 103 after 103 steps Delaunay search ended in tetrahedron 103 after 14 steps. tet_mesh_test(): Normal end of execution. 08-Oct-2025 20:42:40