The “Th[k].adj(e)” function works for 2D triangles, which find the adjacent triangle of the triangle k by edge e.
Is it also works for 3D? I tested two cases, i.e., “mesh3 Th = cube(1, 1, 1)” and “mesh3 Th = cube(2, 2, 2)”. It seems that “Th[k].adj(e)” can find the adjacent tetrahedron of a specific tetrahedron with a common surface. Is that right?
Yes, it works like this. If you want to find the tetrahedra with common vertex, you could make a loop over the faces of your tetrahedron (but reject the face opposite to your vertex), get the adjacent tetrahedra (with this common face). Then you have to check next the neighbours by face of this new tetrahedron, and so on. It is a bit complicate but should end in a limited number of iterates.
1 Like
Dear Dr. Bouchut,
Thanks for your reply. Regarding that “finding the tetrahedra with a common vertex“, maybe the way using lists proposed by Prof. Hecht works better.
You are right, this algorithm is more efficient!