Extracting mesh regions for gmsh mesh

Hi,
Your boundary markers are already loaded into the facet function mf.
The line mf = df.cpp.mesh.MeshFunctionSizet(mesh, mvc) create the meshfunction that can be used in for instance a measure or Dirichlet-condition:
ds_admittance = df.Measure(subdomain=mesh, subdomain_data=mf, subdomain_id=3), or
bc = DirichletBC(FunctionSpace(mesh, "CG", 1), Constant(1), mf, 3)

1 Like