Hello everyone. I am trying to solve some equations over a rectangular domain. The domain is simple. The bottom edge and the left and right edges have pml conditions and at the top, right and left edges have two different boundary conditions bc1 and bc2.
The code for the same is below
geo = geom2d.SplineGeometry()
lx1 = 5;
lx2 = 4.5;
ly1 = 1.5;
ly2 = 1;
oo = 0;
#p1,p2,p3,p4,p5,p6,p7,p8 = [geo.AppendPoint(x,y) for x,y in [(-lx1,-ly1),(lx1,-ly1),(lx1,oo),(lx2,oo),(lx2,-ly2),(-lx2,-ly2),(-lx2,oo),(-lx1,oo)] ]
p1,p2,p3,p4,p5,p6,p7,p8 = [geo.AppendPoint(x,y) for x,y in [(-5,-2.5),(5,-2.5),(5,0),(3.5,0),(3.5,-2),(-3.5,-2),(-3.5,0),(-5,0)] ]
origin = geo.AppendPoint(0,0)
order = 6
maxh = 0.05
geo.Append (["line", p4, origin],bc="bc1",leftdomain=1,rightdomain=0)
geo.Append (["line", origin, p7],bc="bc2",leftdomain=1,rightdomain=0)
geo.Append (["line", p1, p2],leftdomain=2,rightdomain=0)
geo.Append (["line", p2, p3],leftdomain=2,rightdomain=0)
geo.Append (["line", p3, p4],leftdomain=2,rightdomain=0)
geo.Append (["line", p4, p5],leftdomain=2,rightdomain=1)
geo.Append (["line", p5, p6],leftdomain=2,rightdomain=1)
geo.Append (["line", p6, p7],leftdomain=2,rightdomain=1)
geo.Append (["line", p7, p8],leftdomain=2,rightdomain=0)
geo.Append (["line", p8, p1],leftdomain=2,rightdomain=0)
geo.SetMaterial(1, "inner")
geo.SetMaterial(2, "pmlregion")
mesh=Mesh(geo.GenerateMesh (maxh=maxh))
#mesh.SetPML(pml.Cartesian((-lx2,-ly2),(-lx2,oo),1j),"pmlregion")
mesh.SetPML(pml.Cartesian((-3.5,-2),(-3.5,0),1j),"pmlregion")
#mesh.Curve(order)
Draw(mesh,settings={"Objects": {"Edges": False}})
This is giving me the domain that I want. However, when I was examining the mesh, I found that at some edges, the software is showing bc2 applied. This is the region where there is no boundary condition except pml. I have attached screenshots for your reference. I just wanted to know whether there is some problem with my code or something else. Thank you.