With the first code snippet, you can inspect facet_tags.values
and facet_tags.indices
,
or write these to file
with dolfinx.io.XDMFFile(mesh.comm, "ft.xdmf", "w") as xdmf:
xdmf.write_mesh(mesh)
xdmf.write_meshtags(facet_tags)
you can inspect the boundaries
However, in the second part of your script (the DOLFINx code), you are using
where you should use locate_dofs_topological
, as shown in
https://jorgensd.github.io/dolfinx-tutorial/chapter1/fundamentals_code.html?highlight=locate_dofs_topological#defining-the-boundary-conditions
You can for instance do:
locate_dofs_topological(Q, mesh.topology.dim-1, facet_tags.find(100))
if the inflow is at the dofs marked with 100