Interpolating at centroid of a tetrahedral mesh

18 ビュー (過去 30 日間)
Sanwar Ahmad
Sanwar Ahmad 2020 年 9 月 3 日
回答済み: Ravi Kumar 2020 年 9 月 3 日
Hi
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.

回答 (2 件)

Bruno Luong
Bruno Luong 2020 年 9 月 3 日
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.
  4 件のコメント
Sanwar Ahmad
Sanwar Ahmad 2020 年 9 月 3 日
Can you please clarify P1 FEM and P2 FEM?
I am using FEM and the basis functions are linear.
Bruno Luong
Bruno Luong 2020 年 9 月 3 日
You seem to use loosly the vocabulary. For P1 the basis functions are linear on the elements and continuoius on the entire domain. It's a triangle on 1D and "hat" like in 2D. To simplify this cumbersome description people calls it P1 elements.
The basis functions are NOT linear.

サインインしてコメントする。


Ravi Kumar
Ravi Kumar 2020 年 9 月 3 日
You can use interpolateSolution if you are using equation based interfaces to setup the problem. If you are solving a structural or thermal problem, then you can use interpolateDisplacement or interpolateTemperature, respectively.
Regards,
Ravi

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by