Hi, I am using “fenics_mixed_dimensional” branch downloaded from Docker Hub.
To test the use of mixed dimension works, I ran the following simple script:
import numpy as np
import dolfin as dl
class BottomBoundary(dl.SubDomain):
def inside(self, x, on_boundary):
return dl.near(x[1], 0) and on_boundary
nx = 1
nz = 1
mesh = dl.UnitSquareMesh(nx, nz)
bottom_bd = BottomBoundary()
marker = dl.MeshFunction("size_t", mesh, mesh.topology().dim() - 1, 0)
bottom_bd.mark(marker, 1)
submesh = dl.MeshView.create(marker, 1)
Vh0 = dl.FunctionSpace(mesh, "Lagrange", 1)
Vh1 = dl.FunctionSpace(submesh, "Lagrange", 1)
v0 = dl.Function(Vh0)
m0 = dl.Function(Vh0)
m1 = dl.Function(Vh1)
v0.vector()[:] = np.random.rand(Vh0.dim())
m0.vector()[:] = np.ones(Vh0.dim())
m1.vector()[:] = np.ones(Vh1.dim())
ds = dl.Measure("ds", domain=mesh, subdomain_data=marker)
f0 = v0 * m0 * ds(1)
ds1 = dl.Measure("dx", domain=submesh)
f1 = v0 * m1 * ds1
print(dl.assemble(f0))
print(dl.assemble_mixed(f1))
I expect the printed results should be same, but they are different.
Could you please help me out of this issue? Thank you!