multiphenics / multiphenicsx

multiphenicsx - easy prototyping of multiphysics problems in FEniCSx
https://multiphenics.github.io/
GNU Lesser General Public License v3.0
45 stars 9 forks source link

Non-zero integration over restricted domains #22

Closed AlirezaSharif closed 8 months ago

AlirezaSharif commented 8 months ago

Hi, I was trying the interface problem in tutorial-03 and added thess lines of code:

check1 = np.sqrt(mesh.comm.allreduce(dolfinx.fem.assemble_scalar(dolfinx.fem.form(ufl.inner(u1, u1) * dx(2))), op=mpi4py.MPI.SUM))
check2 = np.sqrt(mesh.comm.allreduce(dolfinx.fem.assemble_scalar(dolfinx.fem.form(ufl.inner(u2, u2) * dx(1))), op=mpi4py.MPI.SUM))
print("check if it is zero for u1.dx2: ", check1, " and u2.dx1: ", check2)

However, the output values are not zero. I am not sure how multiphenicsx assigns the field values outside the restricted area but should it not be zero? The version that I am using is 0.2.dev1.

francesco-ballarin commented 8 months ago

Not sure why you are expecting those numbers to be zero. There is an interface between subdomain 1 and 2, and thus both u1 and u2 will be nonzero there.