16-May-2025 09:23:10 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.066645 0.495910 0.153410 5.353345 1.145230 0.306821 0.066645 0.495910 0.153410 0.183299 0.022308 0.324793 5.874690 0.369408 0.649585 0.183299 0.022308 0.324793 0.037749 0.533529 0.112545 5.225791 1.179604 0.225090 0.037749 0.533529 0.112545 0.198497 0.113297 0.639647 6.235139 0.866241 1.279295 0.198497 0.113297 0.639647 0.220318 0.122671 0.370564 6.031517 0.615906 0.741127 0.220318 0.122671 0.370564 0.381161 0.103639 0.309945 6.453429 0.517222 0.619890 0.381161 0.103639 0.309945 0.007173 0.344554 0.589710 5.611230 1.278819 1.179421 0.007173 0.344554 0.589710 0.010676 0.552914 0.136770 5.168798 1.242597 0.273540 0.010676 0.552914 0.136770 0.006805 0.490838 0.100480 5.120895 1.082155 0.200959 0.006805 0.490838 0.100480 0.008205 0.276405 0.049348 5.073964 0.602157 0.098696 0.008205 0.276405 0.049348 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.785562 0.319753 0.460404 2: 0.0551923 0.191985 0.183584 3: 0.791758 0.823522 0.0394686 4: 0.344444 0.0623885 0.712827 C1 = 0.250763 0.227807 0.320273 0.201157 C2 = 0.250763 0.227807 0.320273 0.201157 C1 = 0.302090 0.382624 0.178405 0.136881 C2 = 0.302090 0.382624 0.178405 0.136881 C1 = 0.195358 0.134436 0.269688 0.400519 C2 = 0.195358 0.134436 0.269688 0.400519 C1 = 0.118354 0.260916 0.303264 0.317467 C2 = 0.118354 0.260916 0.303264 0.317467 C1 = 0.018321 0.353290 0.475192 0.153197 C2 = 0.018321 0.353290 0.475192 0.153197 Random tetrahedron: Row: 1 2 3 Col 1: 0.302008 0.138311 0.655801 2: 0.202017 0.937211 0.593785 3: 0.663455 0.177042 0.978776 4: 0.242113 0.404779 0.774413 C1 = 0.407237 0.014088 0.364536 0.214138 C2 = 0.407237 0.014088 0.364536 0.214138 C1 = 0.320721 0.170960 0.289083 0.219236 C2 = 0.320721 0.170960 0.289083 0.219236 C1 = 0.239184 0.212764 0.169221 0.378831 C2 = 0.239184 0.212764 0.169221 0.378831 C1 = 0.115283 0.372678 0.301717 0.210322 C2 = 0.115283 0.372678 0.301717 0.210322 C1 = 0.297214 0.173429 0.307056 0.222301 C2 = 0.297214 0.173429 0.307056 0.222301 Random tetrahedron: Row: 1 2 3 Col 1: 0.570905 0.179679 0.0269973 2: 0.849043 0.416104 0.116461 3: 0.393171 0.369681 0.259383 4: 0.909875 0.83775 0.216178 C1 = 0.323636 0.232686 0.281007 0.162670 C2 = 0.323636 0.232686 0.281007 0.162670 C1 = 0.042842 0.358260 0.456734 0.142164 C2 = 0.042842 0.358260 0.456734 0.142164 C1 = 0.521842 0.009186 0.109122 0.359851 C2 = 0.521842 0.009186 0.109122 0.359851 C1 = 0.601457 0.326229 0.009851 0.062463 C2 = 0.601457 0.326229 0.009851 0.062463 C1 = 0.229758 0.427519 0.101872 0.240851 C2 = 0.229758 0.427519 0.101872 0.240851 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 95 Naive search ended in tetrahedron 95 after 95 steps Delaunay search ended in tetrahedron 95 after 7 steps. Point was chosen from tetrahedron 30 Naive search ended in tetrahedron 30 after 30 steps Delaunay search ended in tetrahedron 30 after 13 steps. Point was chosen from tetrahedron 77 Naive search ended in tetrahedron 77 after 77 steps Delaunay search ended in tetrahedron 77 after 10 steps. Point was chosen from tetrahedron 97 Naive search ended in tetrahedron 97 after 97 steps Delaunay search ended in tetrahedron 97 after 2 steps. Point was chosen from tetrahedron 137 Naive search ended in tetrahedron 137 after 137 steps Delaunay search ended in tetrahedron 137 after 11 steps. tet_mesh_test(): Normal end of execution. 16-May-2025 09:23:11