Extract element list from genereted mesh by matlab

3 views (last 30 days)
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 Comments
Guillaume
Guillaume on 5 Nov 2019
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 on 12 Dec 2019
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.

Sign in to comment.

Accepted Answer

Luca Raffaelli
Luca Raffaelli on 12 Dec 2019
Edited: Luca Raffaelli on 12 Dec 2019
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!

More Answers (0)

Community Treasure Hunt

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

Start Hunting!