Dear community, I notice that DOLFINx v0.9.0 and v0.10.0 give inconsistent results for the integration over the “ds“ measure. Here is the MWE:
from mpi4py import MPI
import ufl
import dolfinx
import numpy as np
print(f"DOLFINx version: {dolfinx.__version__} based on GIT commit: {dolfinx.git_commit_hash} of https://github.com/FEniCS/dolfinx/")
domain = dolfinx.mesh.create_unit_square(MPI.COMM_WORLD, 2, 2)
fdim = domain.topology.dim - 1
facets = dolfinx.mesh.locate_entities(domain, fdim, lambda x: np.isclose(x[0], 0.5))
meshtags = dolfinx.mesh.meshtags(domain, fdim, facets, np.full_like(facets, 0))
ds = ufl.Measure("ds", domain=domain, subdomain_data=meshtags)
value = dolfinx.fem.assemble_scalar(dolfinx.fem.form(1.0*ds(0)))
print(value)
Here are the outputs from DOLFINx v0.9.0:
DOLFINx version: 0.9.0 based on GIT commit: 4116cca8cf91f1a7e877d38039519349b3e08620 of https://github.com/FEniCS/dolfinx/ 0.0
which is as expected, because "ds" has no definitions over the interior facets.
Here are the outputs from DOLFINx v0.10.0:
DOLFINx version: 0.10.0.post2 based on GIT commit: 601b058a51f6a8f3cea11811048283f00855e18d of https://github.com/FEniCS/dolfinx/
1.0
which gives the inconsistent and unexpected result of 1.0.
I would like to ask if it is by design and if there are any fixes.