Dear all,
I tried to create one square mesh including a refined line (0,0.5)->(0.5,1). Note that this is one domain, and we do not want to create two domains.
Now two independent meshes were generated, but I have no idea how to merge the two meshes sharing the line (0,0.5)->(0.5,1). Please help me. Thank you.
geo1 = SplineGeometry()
p1,p2,p3,p4,p5 = [ geo1.AppendPoint(x,y) for x,y in [ (0,0.5), (0,0), (1,0), (1,1), (0.5,1)] ]
geo1.Append (["line", p1, p2])
geo1.Append (["line", p2, p3])
geo1.Append (["line", p3, p4])
geo1.Append (["line", p4, p5])
geo1.Append (["line", p5, p1], maxh=0.01)
mesh1 = Mesh(geo1.GenerateMesh(maxh=0.1))
geo2 = SplineGeometry()
p1,p2,p3 = [ geo2.AppendPoint(x,y) for x,y in [ (0,1), (0,0.5), (0.5,1)] ]
geo2.Append (["line", p1, p2])
geo2.Append (["line", p2, p3], maxh=0.02)
geo2.Append (["line", p3, p1],)
mesh2 = Mesh(geo2.GenerateMesh(maxh=0.1))
Best,
Di Yang