[Gmsh] Gmsh how to extract the node ID's on a given 3D Mesh Boundary Surface

Zuheyr Alsalihi zuheyr at gmail.com
Mon Jun 18 12:00:22 CEST 2018


Thank you I appreciated it very much.
Prof. Geuzaine indicated me a solution in the follow-up.

As i mentioned in my reply to his email below, I was confused/did not
think, that the CPS6 type surface element
with its own ID is one of the faces of  a 3D C3D10 type tetrahedra element
who has another ID.
So looping over the tagged physical group surface elements is what I need
to do!


Many thanks again and best regards,
Zuheyr

On Mon, Jun 18, 2018 at 3:22 AM G. D. McBain <gdmcbain at protonmail.com>
wrote:

> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> Le 17 juin 2018 7:12 PM, Zuheyr Alsalihi <zuheyr at gmail.com> a écrit :
>
> Is there a way to get the node ID's of  the elements that lie on a
> boundary surface in a 3d solid mesh where I mark the surface by creating a
> physical surface.
>
>
> I don't know how to do that directly in Gmsh, but for a (two-dimensional)
> example using Python to extract the nodes belonging to different Physical
> Lines, see
>
>     https://github.com/kinnala/scikit-fem/blob/master/examples/ex14.py
>
> The essential line is the dict-comprehension on line 52:
>
>     boundaries = {bc:
>                               np.unique(cells['line'][cell_data['line']['
> gmsh:physical'] ==
>
> field_data[bc][0]])
>
>                                for bc in field_data if field_data[bc][1]
> == 1}
>
> basically having loaded the mesh from Gmsh into Python with meshio, this
> filters the element-node connectivity array according to the Physical
> boundary entities, and then applies numpy.unique to each subset.
>
>

-- 
Zuheyr Alsalihi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180618/bbba0541/attachment.html>


More information about the gmsh mailing list