assemble_interior_facets does not appropriately check input

Issue #726 resolved
Jan Blechta created an issue

Running mpirun -n 3 demo_dg-poisson.py with parameters["ghost_mode"] = "none" will produce assertion error here or compute total rubbish if assertions are off. Reproduce in the fenicsproject run stable container which has assertions off.

Fix should be quite easy, but must avoid checking a state of parameters["ghost_mode"]. Mesh might be built with different value.

The assertion from sparsity pattern builder could be considered for removal. The real problem resulting in wrong output is rather in assembler, not in sparsity builder.

MWE:

from dolfin import *

mesh = UnitSquareMesh(10, 10)
facet_f = FacetFunction('size_t', mesh, 0)
CompiledSubDomain('near(x[0], 0.5)').mark(facet_f, 1)

form = Constant(1)*dS(domain=mesh, subdomain_data=facet_f, subdomain_id=1)
value = assemble(form)
assert value - 1.0 < 1e-6

Comments (11)

  1. Jan Blechta reporter

    This is really critical and should be solved in the upcoming release. @chris_richardson do you plea guilty here? 😉

  2. Log in to comment