How to get all to the node ids which belong to specific boundary for eg.
how to get the nodes on boundary “left”. I tried to use BoundaryCF method but didn’t worked
from netgen.occ import *
from numpy import *
from ngsolve import *
d = 0.005
h = 0.002
xp = [-d/2, -d/2, 0, d/2, d/2, 0]
yp = [ h/2,-h/2, -h/2, -h/2, h/2, h/2]
face = MoveTo(xp[0], yp[0]).LineTo(xp[1], yp[1]).LineTo(xp[2], yp[2]).LineTo(xp[5], yp[5]).Close().Face()
face.faces.name = “air”
face.edges[0].name = “left”
mesh = Mesh(OCCGeometry(face,dim=2).GenerateMesh(maxh=0.005)).Curve(3)
Draw(mesh)
%%
cf=mesh.BoundaryCF({ “left” : 1e6 }, default=1)
for i, v in enumerate(mesh.vertices):
x=v.point[0]
y=v.point[1]
print(x,y)
print(cf(mesh(x,y)))