Hi
I need to mesh two different domains separately and match the nodes at the boundaries of two domains.
I wrote a simple code:
from dolfin import *
import mshr
# Domain
domain1 = mshr.Rectangle(Point(2,4.5), Point(8,5.5))
domain2 = mshr.Rectangle(Point(0,0), Point(10,10))\
- mshr.Rectangle(Point(2,4.5), Point(8,5.5))
# Mesh
mesh1 = mshr.generate_mesh(domain1, 20)
mesh2 = mshr.generate_mesh(domain2, 20)
# Build multimesh
multimesh = MultiMesh()
multimesh.add(mesh1)
multimesh.add(mesh2)
multimesh.build()
plot(mesh1)
plot(mesh2)
interactive()
Now I can plot the meshes for different domains :
Domain.1:
Domain.2:
But:
1- How can I match (make coincident) the nodes of the domain.1 and domain.2 at the boundaries of the domain.1 and domain.2?
2- How can I plot the mesh for the domain.1 and domain.2 in one figure?
After all I expect to get something like this:
Does anybody know how I can do it in FEniCS?
Thanks