Hi,
I regularly use a facet_region.xml file when defining boundary conditions on a 3D mesh. E.g.
mesh = Mesh('mesh.xml')
subdomains = MeshFunction('size_t',mesh,'mesh_physical_region.xml')
boundaries = MeshFunction('size_t',mesh,'mesh_facet_region.xml')
V = FunctionSpace(mesh,'Lagrange',1)
bc = DirichletBC(V,Constant(0.0),boundaries,1)
Instead of using the facet_region file, is it possible to set a boundary throughout the entire volume of a subdomain? I naively tried
bc = DirichletBC(V,Constant(0.0),subdomains,1)
and
bc = DirichletBC(V,Constant(0.0),1)
But I got the error message "User MeshFunction is not a facet MeshFunction (dimension is wrong)" and "Found no facets matching domain for boundary condition" respectively.
Thanks