I have a dolfin xml file created by "dolfin-convert"-ing an Abaqus inp file. It has the mesh as well as the subdomains defined in the same file. For example, one such subdomain has lines like this:
<mesh_value_collection name="collection1" type="uint" dim="0" size="1508">
<value cell_index="6774" local_entity="0" value="1"/>"
I want to apply DirichletBC's on certain mesh_value_collections, which i understand are accessed via mesh.mesh_domains()
. I'm confused how to create a FacetFunction to apply boundary conditions. I've tried
bcs_mesh = MeshFunction("size_t", mesh, 2, mesh.domains())
and then created a boundary condition like
bc = DirichletBC(V, Constant(0.0), bcs_mesh, 1)
where here, I want the dirichletBC applied to subdomain '1'. But I get this error:
Warning: Found no facets matching domain for boundary condition.
which clearly tells me I'm not applying boundary conditions correctly. Can someone explain this to me?
I'm having a hard time finding good documentations for BCs and MeshFunctions, etc. I consider myself pretty good at Python, but the logic of these classes are confusing to me.