Computing functions on boundaries gives incorrect result in parallel
Bug #733834 reported by
Garth Wells
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.MeshPartiti
# 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 |
Changed in dolfin: | |
milestone: | 0.9.11 → 0.9.12 |
assignee: | nobody → Garth Wells (garth-wells) |
Changed in dolfin: | |
milestone: | 1.0-beta → 1.0-rc1 |
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 is probably the same problem:
from dolfin import *
mesh = UnitSquare(4, 4)
boundaries = FacetFunction("uint", mesh)set_all(0)
boundaries.
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.75facet_domains=boundaries)
print assemble(M, exterior_