mshr has experimental for support for this. Try

from mshr import *
domain =   Rectangle(dolfin.Point(0., 0.), dolfin.Point(1., 1.))
domain.set_subdomain(1, Rectangle(dolfin.Point(.25, .25),
dolfin.Point(.75, .75)))
mesh = generate_mesh(domain, 10)

(Note that I had to temporarily work around a bug in CGAL which makes
it slow, so it is not suitable for complex geometries, but should work
fine for this).

Let me know if you encounter any problems.

Regards

Benjamin Kehlet

2014-12-04 14:28 GMT+01:00  <[email protected]>:
> Good Evening,
> i’ ve a problem i can’t fix. I’ve not found a solution in the forum or in
> the documentation.
> I need to create on my rectangular domain a mesh conforming with a
> rectangular subdomain; I’ve attached an image as an example of what i need.
> I would like to know if i should create manually a mesh like this or there
> is something useful in dolfin library. In this case I’ll be grateful if
> you’d send me documentation about this.
> Thank you
> Regards
> Simone Carriero
>
> Inviata da Windows Mail
>
>
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to