Hello,
I have two questions. It would be very helpful if anyone can answer any of them. Thank you.
- I have a mesh with two materials (“inner” and “outer” ) and I have an L2 GridFunction defined on the inner material. I’d like to define an L2 Facet GridFunction on the outer material and then set the values on the interface (“interior boundary”) based on the L2 GridFunction.
I tried the following code but it doesn’t work. The dofs of the L2 Facet GridFunction are still all zeros. I wonder what’s the right way to do this.
fes0 = L2(mesh, order = 1, definedon = mesh.Materials("inner"))
gf0 = GridFunction(fes0)
# define gf0 in some way, for example gf0.Set(x**2+y**2)
fes1 = FacetFESpace(mesh, order = 1, definedon = mesh.Materials("outer"))
gf1 = GridFunction(fes1)
gf1.Set(gf0, definedon = mesh.Boundaries("interior bc"))
print( gf1.vec). # it's still all 0s
- Another question I have is how I can set order when I integrate with dx, ds. I tried the following but it gives me an error.
Integrate(u*v*dx(element_boundary=True), mesh, order=5)
Thanks.
Oliver