Hi, I've met a problem with 3D geometry. I followed the example in documentation and run into an error. My code is following:
from dolfin import *
from mshr import *
diam = 5.0
mainBox = Box(Point(0,0,0),Point(diam,diam,diam))
mainStrip = Box(Point(0.55,0.8,0),Point(4.45,0.5,0.0635))
def strip(i):
b = Box(Point(0.85+i*0.4,4.5,0),Point(0.95+i*0.4,0.8,0.0635))
return b
geo = mainBox - mainStrip - strip(0) - strip(1) - strip(2) - strip(3) - strip(4) - strip(5) - strip(6) - strip(7) - strip(8)
info("\nCompact output of 3D geometry:")
info(geo)
info("\nVerbose output of 3D geometry:")
info(geo, True)
plot(geo, "3D geometry (surface)")
# Generate and plot mesh
mesh3d = Mesh(geo, 32)
info(mesh3d)
plot(mesh3d, "3D mesh")
interactive()
This produces the following error
Not an UFL type: <class 'mshr.CSGDifference'>
which is triggered inside the plot function. If I remove the plot function, similar error is triggered inside Mesh function.
Also, if I define just
geo = mainBox
I get the error
Not an UFL type: <class 'mshr.Box'>
What am I doing wrong? I have updated everything.