HI guys,
I just tried to draw multimesh by using under simple code.
from dolfin import *
from mshr import *
from vedo.dolfin import plot as vplot
# First mesh setting
rect1 = Rectangle( Point(0,0), Point(1,1) )
circ1 = Circle( Point(0.25,0.25), 0.03, 30)
circ2 = Circle( Point(0.75,0.25), 0.03, 30)
circ3 = Circle( Point(0.25,0.75), 0.03, 30)
circ4 = Circle( Point(0.75,0.75), 0.03, 30)
domain1 = rect1 - circ1 - circ2 - circ3 -circ4
mesh1 = generate_mesh(domain1,20)
# Second mesh setting
rect2 = Rectangle( Point(0,0), Point(1,1) )
ccirc1 = Circle( Point(0.35,0.35), 0.03, 30)
ccirc2 = Circle( Point(0.65,0.35), 0.03, 30)
ccirc3 = Circle( Point(0.35,0.65), 0.03, 30)
ccirc4 = Circle( Point(0.65,0.65), 0.03, 30)
domain2 = rect2 - ccirc1 - ccirc2 - ccirc3 - ccirc4
mesh2 = generate_mesh(domain2,20)
# MultiMesh part
multimesh=MultiMesh()
multimesh.add(mesh1)
multimesh.add(mesh2)
multimesh.build()
n = multimesh.num_parts()
for i in range(n):
vplot(multimesh.part(i), at=i, N=n, wireframe=1, lw=2, c=i)
And this is the following image.
Here are my questions.
- What is the meaning of two colors, yellow and orange? And how do they relate to each other?
- Once I find out the numerical solutions of left picture, how does it relate with right image’s numerical solutions?
- Can anybody give me a simple example code of finding numerical solutions using multimesh?