Extract element list from genereted mesh by matlab

6 ビュー (過去 30 日間)
Luca Raffaelli
Luca Raffaelli 2019 年 10 月 31 日
編集済み: Luca Raffaelli 2019 年 12 月 12 日
Hi,
I had generated the mesh in photo, i need to extract and put in a vector the name of each elements that are displayed, how can i do?
The mesh was generated with this command:
generateMesh(model,'GeometricOrder','linear')
thak you :)Elements_name.jpg
  3 件のコメント
Guillaume
Guillaume 2019 年 11 月 5 日
Luca Raffaelli's comment originally posted as an answer moved here:
I need to generet a vector (1,N) in wich will be insert the numbers of each edge of the rectangualer elements, I need this becuse this vector will be used in a boundary condition fo a navier-stokes problem.
thank you
Ganesh Regoti
Ganesh Regoti 2019 年 12 月 12 日
Hi,
May I know how you are adding the geometry to the model?
The edge names are assigned in the same order as of the points in geometry. So if you have geometry information, you can create the edge-name vectors directly from it.

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

採用された回答

Luca Raffaelli
Luca Raffaelli 2019 年 12 月 12 日
編集済み: Luca Raffaelli 2019 年 12 月 12 日
SOLUTION FOUND!
when i generate the mesh each node in the p matrix have an id (his position in vector), so if I have the id of 2 nodes i can find the combination of both 2 in the t matrix.
Beside that, if somelse just want to have all the IDs of the edges of the structure inside the box, it's sufficient to just identify the 4 point of the outside box and after that their IDs. One this is done, from all the IDs of the t matrix is only need to remove those four and you have an array with listed all the IDs of the edge inside the box.
To perform all this operation the PDE toolbox is needed!

その他の回答 (0 件)

カテゴリ

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