‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Le 17 juin 2018 7:12 PM, Zuheyr Alsalihi <[email protected]> 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._______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh