Hi Abhishek, There seems to be a few missing pieces to naturally apply edge boundary conditions in Firedrake, for instance: * EDGE_SETS_LABEL, which is to map edge markers (in your case 1001, 1002, etc) to associated edge entities in the mesh, is not automatically constructed (I think) (Firedrake does construct FACE_SETS_LABEL, which is the facet counterpart), * `bc.nodes` eventually calls `dmcommon.facet_closure_nodes` (https://github.com/firedrakeproject/firedrake/blob/master/firedrake/cython/d...) with given subdomain markers to collect all facet nodes on which we would like to enforce values on, but we would need to generalise this function for edges. So I'm afraid subclassing DirichletBC probably is the best workaround to apply edge conditions at the moment. Regards, Koki ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Venketeswaran, Abhishek (FN) <Abhishek.Venketeswaran@netl.doe.gov> Sent: Thursday, July 15, 2021 7:12 PM To: firedrake <firedrake@imperial.ac.uk> Subject: [firedrake] Problem with Dirichlet BC on edges in a 3D mesh Hi, I created a a couple of physical groups within GMSH with appropriate labels/tags. I then tried to use the same labels after importing the .msh file in firedrake. I got the following error: Please find below the relevant section in the .py file that generates the gmsh mesh and saves it in .msh file gmsh.option.setNumber("Mesh.MshFileVersion", 2) # Physical curves defined with appropriate tags starting from 1000 gmsh.model.addPhysicalGroup(1, b_o_c_arcs,1001) gmsh.model.addPhysicalGroup(1, b_i_c_arcs,1002) gmsh.model.addPhysicalGroup(1, list(t_o_c_arcs),1003) gmsh.model.addPhysicalGroup(1, list(t_i_c_arcs),1004) # Physical surfaces defined with appropriate tags starting from 2000 gmsh.model.addPhysicalGroup(2, circ_pl_surf,2001) gmsh.model.addPhysicalGroup(2, extsurfs,2002) # Physical volumes defined with appropriate tags starting from 3000 gmsh.model.addPhysicalGroup(3, voltags,3001) gmsh.model.mesh.generate(3) gmsh.write("Pipe3D.msh") Here is the snippet of the .py file executed within firedrake: mesh=Mesh('Pipe3D.msh') bc1=DirichletBC(V,zero,1003) When I execute the solve command I get this error: Error: {1003} are not a valid markers (not in {2001,2002}) I think I have a workaround that is not yet giving me errors wherein I define a class derived from DirichletBC and redefine the @utils.cached_property nodes function. However, It would be great if I could do it using the existing DirichletBC class. I would be very grateful if you could help me out here. Thanks -- Abhishek Venketeswaran NETL Research Associate - ORISE National Energy Technology Laboratory Department of Energy abhishek.venketeswaran@netl.doe.gov Work: 412-386-4833 Mobile: 716-507-7890 www.netl.doe.gov<http://www.netl.doe.gov> [cid:0311bcdf-830c-456c-a671-ff3e827d18f2]