Hello. I have installed the current development version of FEniCS and try to use the Mixed dimensional Function Space feature. However, I am not so sure if it works correctly: If a run the following code, the assembled function should be bigger zero near the boundary (the submesh) on the right hand side the square and zero everywhere else. However, it equals zero on that boundary and is positive somewhere else. Am I doing something wrong or does this feature not work properly? Kind regards, Johannes
from fenics import *
import matplotlib.pyplot as plt
mesh = UnitSquareMesh(8,8)
marker = MeshFunction(“size_t”, mesh, mesh.topology().dim() - 1, 0)
for fac in facets(mesh):
marker[fac] = fac.midpoint().x() > 1 - DOLFIN_EPS
submesh = MeshView.create(marker, 1)
X = FunctionSpace(mesh,‘P’,1)
Y = FunctionSpace(submesh,‘DG’,0)
y = interpolate(Constant(‘1.0’),Y)
LocRes = TestFunction(X)
x_fct = Function(X)
dL = Measure(“dx”, domain=submesh)
assemble(LocResydL, tensor=x_fct.vector())
plt.figure(1)
plot(x_fct)
plt.figure(2)
plot(mesh)
plot(submesh)
plt.show()