Non-matching meshes for function spaces and/or measures

Hi,

I get the following error message: “Non-matching meshes for function spaces and/or measures”.

I wish to integrate the solution only on one of the subdomains, but I get the above error message when trying to. Just for illustration what I want to do:

dx = Measure('dx')(subdomain_data=subdomains)
a = dot(grad(p),grad(v))*dx(1)
L = Constant(1.0)*v*dx(1)

Maybe in your definition of the measure the domain is missing. Try this:

dx = Measure('dx', domain=mesh, subdomain_data=subdomains)