Thank you. How do I create a facet_tags?
rectangle = gmsh.model.occ.addRectangle(0,0,0, L, H, tag=1)
obstacle = gmsh.model.occ.addDisk(c_x, c_y, 0, r, r)
Mesh_domain = gmsh.model.occ.cut([(gdim, rectangle)], [(gdim, obstacle)])
gmsh.model.occ.synchronize()
Mesh_domain_marker = 1
volumes = gmsh.model.getEntities(dim=gdim)
gmsh.model.addPhysicalGroup(volumes[0][0], [volumes[0][1]], Mesh_domain_marker)
gmsh.model.setPhysicalName(volumes[0][0], Mesh_domain_marker, "Mesh_domain")
ufl_domain = ufl_mesh_from_gmsh(cell_id, gdim)
gmsh_cell_perm = cell_perm_gmsh(to_type(str(ufl_domain.ufl_cell())), num_nodes)
cells = cells[:, gmsh_cell_perm]
mesh = create_mesh(MPI.COMM_WORLD, cells, x[:, :gdim], ufl_domain)
tdim = mesh.topology.dim
fdim = tdim - 1
facet_type = cell_entity_type(to_type(str(ufl_domain.ufl_cell())), fdim, 0)
gmsh_facet_perm = cell_perm_gmsh(facet_type, num_facet_nodes)
marked_facets = np.asarray(marked_facets[:, gmsh_facet_perm], dtype=np.int64)
local_entities, local_values = distribute_entity_data(mesh, fdim, marked_facets, facet_values)
mesh.topology.create_connectivity(fdim, tdim)
adj = create_adjacencylist(local_entities)
ft = meshtags_from_entities(mesh, fdim, adj, np.int32(local_values))
ft.name = "Facet tags"
s_cg1 = FiniteElement("CG", mesh.ufl_cell(), 1)
V = FunctionSpace(mesh, s_cg1)
V_E= fem.VectorFunctionSpace(mesh, ("DG", 0))
fdim = mesh.topology.dim - 1
obstacle_facets = ft.indices[ft.values == obstacle_marker]
u1 = ufl.TrialFunction(V)
v1 = ufl.TestFunction(V)
k = Constant(mesh, PETSc.ScalarType(0))
f = k/epsilon_0
ds=ufl.Measure("ds", subdomain_data=???, subdomain_id=2)
a = ufl.inner(ufl.grad(u1), ufl.grad(v1)) * ufl.dx
x = SpatialCoordinate(mesh)
L = ufl.inner(f , v1) * ufl.dx + ufl.inner(E_c, v1) * ds
u1 = fem.Function(V)
problem1 = fem.petsc.LinearProblem(a, L, bcu1, petsc_options={"ksp_type": "preonly", "pc_type": "lu"})
phi = problem1.solve()