Open spectraldecomp opened 3 weeks ago
You could use the point data to decide whether a vertex is inside or outside. There is no 'automatic' way of doing it atm.
It seems like point_data['gmsh:physical']
assigns labels according to the contour of the feature and not the interior of the feature.
I.e.
When what we might expect is
Is this the intended behavior?
I have a temporary solution to get nearly the latter behavior by using cell_data_dict['gmsh:physical']['triangle']
and assigning labels according to the triangle each point belongs.
Hi @spectraldecomp Actually, on second thought, yes that is the intended behaviour. The code finds the interfaces, not the points inside a region. In your second example, you could not know if the edge vertices are inside, or outside the region.
The better way to approach this is to use the mesh.cell_data
, and use that as a mask on the vertices (mesh.points
). This will give you the points inside or outside the regions as in your second figure.
I use
classes = m.point_data['gmsh:physical']
to get the class labels of each point in my mesh, but only the vertices on the boundaries/contour of each feature are labeled. Is there a way to have the points in the inner region of each boundary be labeled accordingly?