### How can I check if a point belongs to a subdomain or not?

107
views
0
3 months ago by
Hi,
So I have the following code:
from dolfin import *

#Meshing done by GMSH

mesh =Mesh('3layered_annulus.xml')
mesh_coordinates = mesh.coordinates()

V = VectorFunctionSpace(mesh, 'P', 1)
N = V.dim()
d = mesh.geometry().dim()

Volume = MeshFunction('size_t' , mesh , '3layered_annulus_physical_region.xml' )
bnd_mesh = MeshFunction('size_t', mesh , '3layered_annulus_facet_region.xml')

ds = Measure('ds', subdomain_data=bnd_mesh)
dx = Measure('dx', subdomain_data=Volume)

​
I have done the meshing and marking in GMSH. My region is a three layered annular cylinder with the inner layer marked by '1' the middle by '2' and the outer by '3'. I am sure about my marking because when I plot "Volume" I can clearly see it. Now suppose I have a mesh node p=(1,1,1), how can I check which layer it belongs to?