Good evening,
I write here since mshr's issue tracker at BitBucket isn't enabled, I'm
sorry if it isn't the right place.
I think I've found a bug in subdomain's generator.
Here's the code:
from mshr import *
from dolfin import *
Base=16.0*1E-2 #m
Height=11.0*1E-2 #m
B_3=5.5*1E-2
H_3=1.8*1E-2
X_g3=5.5*1E-2 #m
Y_g3=1.9*1E-2 #m THIS DOESN'T WORK
#Y_g3=1.8*1E-2 #m THIS WORKS AS EXPECTED
b_3=B_3/Base
h_3=H_3/Base
x_g3=X_g3/Base
y_g3=Y_g3/Base
base=1
height=Height/Base
geom=Rectangle(dolfin.Point(0.0,0.0),dolfin.Point(base,height))
geom.set_subdomain(1,Rectangle(dolfin.Point(x_g3-b_3/2.0,y_g3-h_3/2.0),dolfin.Point(x_g3+b_3/2.0,y_g3+h_3/2.0)))
mesh=generate_mesh(geom,50,"cgal")
plot(mesh)
mf = dolfin.MeshFunction("size_t", mesh, 2, mesh.domains())
dolfin.plot(mf, "Subdomains")
interactive()
In Y_g3=1.9*1E-2 case the set_subdomain instruction does nothing.
Is there another way to create a mesh conforming with one or more
subdomains?
Thank you for the support.
Regards
Simone Carriero
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics