Hello Rohit,
you have to loop over the 2D elements. Then you can check the boundary index and you have number and coordinate of the point available.
Code:
for i,el in enumerate(mesh.Elements2D()):
print("surface el = ",i)
print("surface index = ",el.index)
for v in el.vertices:
print(pnts[v])
If you are using NGSolve, you can also do this on the NGSolve mesh, which might be handier for you.
Code:
from ngsolve import *
mesh = Mesh(mesh) # convert to NGSolve mesh
for el in mesh.Elements(VOL):
print("el = ",el.nr)
for v in el.vertices:
print(mesh[v].point)
for el in mesh.Elements(BND):
print("surface el = ",el.nr)
print("surface index = ",el.index)
for v in el.vertices:
print(mesh[v].point)
When you are solving problems with NGSolve, I would strongly recommend to name you boundaries and use these names when defining your problem. Something about boundaries in the
docu
.
Best,
Christoph