Consider a Mesh, called complete_mesh, and a CellFunction, called regions, identifying the two Submeshes. That is,
submesh_0 = SubMesh(complete_mesh, regions, 0)
submesh_1 = SubMesh(complete_mesh, regions, 1)
Now assume we have a function w defined on submesh_1. For example,
V_1 = FunctionSpace(submesh_1, "Lagrange", 2)
w = Function(V_1)
Now, I define a bilinear form and linear form on submesh_0:
V_0 = FunctionSpace(submesh_0, "Lagrange", 2)
u = TrialFunction(V_0)
v = TestFunction(V_0)
n = FacetNormal(submesh_0)
The bilinear and linear forms look something like:
a = dot(grad(u), n)vds(2)
L = dot(grad(w), n)vds(2)
where I want ds(2) to represent the common boundary between submesh_0 and submesh_1. That is, ds will have a form like:
boundaries = FacetFunction("size_t", submesh_0)
…Here goes code to mark the common interface as “2”
ds = Measure("ds")[boundaries]
Question A: How do I figure out the common boundary to form the measure ds(2) ?
Question B: How will I implement dot(grad(w), n)vds(2), given that ds(2) is a measure on submesh_0 while w is a function on submesh_1? I can’t think of a way to define an Expression which takes care of this situation.
All my code is in python. Thanks!