Interpolating at centroid of a tetrahedral mesh
18 views (last 30 days)
I have a 3D mesh with 4-noded tetrahedral elements. I defined a function/vector evaluated at the vertices of the mesh. I need to interpolate this vector at the centroid of each of the tetrahedral elements. Is there any built-in function to do that? I used pdeintrp for 2D mesh, but not sure if it works for the 3D mesh.
Thanks in advance.
Bruno Luong on 3 Sep 2020
The vector at the centroid of the tetrahedron is just the mean of the 4 vectors taken at 4 vertices.
So using MEAN with appropriate indexing and you are OK.