Dear all,
Recently, I have applied the HDG method to fluid problems. However, I cannot sure the following methods to set two or more different boundary conditions is correct. Please help revise.
V = L2(mesh, order=k)
M = FacetFESpace(mesh, order=k, dirichlet="left|bottom|right|top")
fes = FESpace([V,M])
gfu = GridFunction(fes)
a = BilinearForm(fes, condense=True)
l = LinearForm(fes)
...
a.Assemble()
gfu.components[1].Set(2, definedon=mesh.Boundaries("left"))
gfu.components[1].Set(1, definedon=mesh.Boundaries("bottom"))
gfu.components[1].Set(-1, definedon=mesh.Boundaries("right"))
# add Dirichlet BC
l.vec.data = -a.mat * gfu.vec
Best,
Di Yang