Computing functions on boundaries gives incorrect result in parallel

Bug #733834 reported by Garth Wells
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Critical
Garth Wells

Bug Description

The MeshFunction that stores exterior facets and which is used in parallel, is computed when a DofMap is created. This is a problem when assembling functionals on exterior facets and passing the mesh because the mesh never computes the "exterior facets" MeshFunction. The below code reproduced the error.

from dolfin import *
mesh = UnitSquare(24, 24)
f = Constant(1.0)
M = f*ds

# This is a hack to get around the bug
#if MPI.num_processes() > 1:
# cpp.MeshPartitioning.number_entities(mesh, mesh.topology().dim() - 1);

# This should print 4.0
print assemble(M, mesh=mesh)

Related branches

Changed in dolfin:
status: New → Confirmed
importance: Undecided → Critical
Changed in dolfin:
status: Confirmed → In Progress
Changed in dolfin:
milestone: none → 0.9.11
Anders Logg (logg)
Changed in dolfin:
milestone: 0.9.11 → 0.9.12
assignee: nobody → Garth Wells (garth-wells)
Revision history for this message
Marie Rognes (meg-simula) wrote :

This is probably the same problem:

from dolfin import *

mesh = UnitSquare(4, 4)

boundaries = FacetFunction("uint", mesh)
boundaries.set_all(0)
boundaries[0] = 1

V = FunctionSpace(mesh, "CG", 2)
f = Expression("x[0] + 2")
f = interpolate(f, V)

M = f*ds(1)

# This should print 0 but prints 0.75
print assemble(M, exterior_facet_domains=boundaries)

Anders Logg (logg)
Changed in dolfin:
milestone: 1.0-beta → 1.0-rc1
Revision history for this message
Anders Logg (logg) wrote :

Why don't we just call MeshPartitioning.number_entities?

Changed in dolfin:
milestone: 1.0-rc1 → 1.0-beta2
Changed in dolfin:
status: In Progress → Fix Committed
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.