BoundaryMesh returns wrong Data

Issue #526 new
Johannes Neumann created an issue

When running this simple code with Dolfin 1.5/Ubuntu 14.04 and Dolfin 1.3/OpenSuse

mesh = UnitSquareMesh(1,1)
print BoundaryMesh( mesh, "exterior" ).entity_map( 1 ).array()

I get

[65871248 47760800        3        4]

so the fist two values are wrong/not initialized.

Comments (4)

  1. Johannes Neumann reporter

    Alright. Thanks for the information. For those interested, here is a workaround in 2D until MeshView becomes available.

    mesh.init( 0, 1 )
    edgeCount = np.zeros( mesh.num_edges(), dtype = int )
    for cell in cells( mesh ):
        edgeCount[cell.entities( 1 ) ] += 1
    boundaryEdges = np.where( edgeCount < 2 ) # belong to only one triangle
    
  2. Log in to comment