← Back to team overview

dolfin team mailing list archive

[Bug 733834] [NEW] Computing functions on boundaries gives incorrect result in parallel

 

Public bug reported:

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)

** Affects: dolfin
     Importance: Critical
         Status: Confirmed

** Changed in: dolfin
       Status: New => Confirmed

** Changed in: dolfin
   Importance: Undecided => Critical

-- 
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
https://bugs.launchpad.net/bugs/733834

Title:
  Computing functions on boundaries gives incorrect result in parallel

Status in DOLFIN:
  Confirmed

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)



Follow ups

References