It seems mshr in the 1.6 ubuntu ppa has a bug with treating subdomains. This example for instance won't work properly. This might be related to mshr issues #30, #33.
Has this already been fixed and is there a way to update the mshr package?
Simple failing test:
import dolfin
from mshr import *
domain = Rectangle(dolfin.Point(0., 0.), dolfin.Point(1., 1.))
r0 = Rectangle(dolfin.Point(0.1, 0.1), dolfin.Point(0.5, 0.5))
r1 = Rectangle(dolfin.Point(0.6, 0.1), dolfin.Point(0.9, 0.9))
domain.set_subdomain(1, r0)
domain.set_subdomain(2, r1)
mesh2d = generate_mesh(domain, 55)
dolfin.plot(mesh2d, "2D mesh")
mf = dolfin.MeshFunction("size_t", mesh2d, 2, mesh2d.domains())
dolfin.plot(mf, "subdomains", interactive=True)