Hello, I have a domain composed of subdomains ‘A’ and ‘B’ which meet at an interface ‘I’. I also have a VectorL2 space ‘XA’ defined on ‘A’, and a VectorL2 space ‘XB’ defined on ‘B’. I would like to evaluate \int_I (u_b \cdot v_a) \text{ d}s, where v_a is in ‘XA’ and u_b is in ‘XB.’ However, I do not get the result that I expect, and I am wondering if there is something else to consider when combining variables from different subdomains. What is the proper way to achieve this? For more context, this is part of an HDG method, but I do not want to use the facet variables in this term. Below are the relevant parts of my code.
My domain setup:
geo = geom2d.SplineGeometry()
pts = [geo.AppendPoint(x, y) for x, y in [(0,0), (1,0), (1,0.5), (1,1), (0,1), (0,0.5)]]
geo.Append(['line', pts[0], pts[1]], leftdomain=2, rightdomain=0, bc='GammaB')
geo.Append(['line', pts[1], pts[2]], leftdomain=2, rightdomain=0, bc='GammaB')
geo.Append(['line', pts[2], pts[3]], leftdomain=1, rightdomain=0, bc='GammaA')
geo.Append(['line', pts[3], pts[4]], leftdomain=1, rightdomain=0, bc='GammaA')
geo.Append(['line', pts[4], pts[5]], leftdomain=1, rightdomain=0, bc='GammaA')
geo.Append(['line', pts[5], pts[0]], leftdomain=2, rightdomain=0, bc='GammaB')
geo.Append(['line', pts[5], pts[2]], leftdomain=1, rightdomain=2, bc='I')
geo.SetMaterial(1, 'A')
geo.SetMaterial(2, 'B')
mesh = Mesh(geo.GenerateMesh(maxh=maxh))
The relevant part of the function space and trial and test functions:
XA = VectorL2(mesh, order=k, definedon='A')
XB = VectorL2(mesh, order=k, definedon='B')
X = XA*XB
((ua, ub), (va, vb)) = X.TnT()
My attempt at adding the desired term:
chiI = GridFunction(FacetFESpace(mesh, order=0, dirichlet='I'))
chiI.Set(CF(1.0), definedon=mesh.Boundaries('I'))
a = BilinearForm(X)
a += chiI * InnerProduct(ub, va) * dx(element_boundary = True)
Thanks for your help!