Hello Everyone,
I am importing the indexed facet region of mesh in Fenics and want to apply Dirichlet conditions as shown in the code below.
from fenics import *
from mshr import *
mesh = Mesh("mesh.xml")
boundaries_GB = MeshFunction("size_t", mesh, "mesh_facet_region.xml")
V_GB = FunctionSpace(mesh, 'CG', 1)
bc_GB = [DirichletBC(V_GB, Constant(1.0), boundaries_GB,14),
DirichletBC(V_GB, Constant(1.0), boundaries_GB,15),
DirichletBC(V_GB, Constant(1.0), boundaries_GB,157)]
This code is working for me but I have to apply this boundary condition on many facets.
So, my question is that is there any smart way to apply that instead of writing all the lines in the array i.e. something like using a range or condition.
Thank you,
Manish