How to extract and use physical labels from GMSH surfaces on FEniCS (2D mesh)

Hi,
You need to load your data as described in the post above.

mvc = MeshValueCollection("size_t", mesh, 2)
with XDMFFile("mf.xdmf") as infile:
    infile.read(mvc, "name_to_read")
mf = cpp.mesh.MeshFunctionSizet(mesh, mvc)

So subdomains would be equal to mf