I am working with subdomains and I need to identify the internal boundary (interface between both subdomains) for integration. For the subdomains I am using a mesh function named “domains” and by running
plot (domains) i can successfully see that the subdomains are marked correctly. Then, I am also using a mesh function to mark the interface between them, but I’m having trouble plotting this to make sure that I am doing it correctly. Could anyone help me on what is the easiest way to visualize this internal boundary? Thank you! This is how I am defining the mesh functions:
class Omega(SubDomain): def inside(self, x, on_boundary): return phi(x) > 0 domains = MeshFunction("size_t", mesh, mesh.topology().dim()) omega = Omega() domains.set_all(0) omega.mark(domains, 1) dx = Measure('dx')(subdomain_data = domains)
and ploting domains gives me for example:
Then, for the boundary this is what I am doing:
class IntBound(SubDomain): def inside(self, x, on_boundary): return near(phi(x),.0) intBound = IntBound() int_boundary = MeshFunction("size_t", mesh, mesh.topology().dim()-1) int_boundary.set_all(0) intBound.mark(int_boundary, 1) ds_int = Measure("ds")(subdomain_data=int_boundary) #ds(1) integrates on internal boundary
But when I try plotting int_boundary I get
I am not sure if I am not marking correctly of if is a plot problem.