segfault: FacetNormal + dx

Issue #1012 invalid
Nico Schlömer created an issue

Assembling a form with a FacetNormal on the interior of the mesh is not a well-defined operation, but never should anything produce a segfault. This does:

from dolfin import *

mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, 'CG', 1)

u = TrialFunction(V)
v = TestFunction(V)

n = FacetNormal(mesh)

L = PETScMatrix()
assemble(
    + dot(grad(u), grad(v)) * dx
    - dot(grad(u), n) * v * dx,  # Should be `ds`
    tensor=L
    )

(on dolfin 2017.2):

Calling FFC just-in-time (JIT) compiler, this may take some time.
Integral of type cell cannot contain a ReferenceNormal.
Segmentation fault (core dumped)

Probably some missing assertions here and there.

Comments (4)

  1. Jan Blechta

    I can't reproduce the segfault. I get a proper error message: ufl.log.UFLException: Integral of type cell cannot contain a ReferenceNormal..

    How did you produce this? Can you do this in Docker?

  2. Log in to comment