Cell to cell connectivity broken?

Issue #737 invalid
Miro Kuchta created an issue

Asking for cell-cell connectivity in the script below produces for given cell the list containing only the cell itself. I observed this with FEniCS installed via debian package as well as the yesterday's dev version built by hashdist. Is this is a bug or is some special initialization of connectivity needed?

from dolfin import *

mesh = UnitSquareMesh(1, 1)

# Gives
mesh.init(2, 2)
c2c = mesh.topology()(2, 2)
for c in range(mesh.num_cells()): print c, '->', c2c(c)

mesh.init(2, 1)
c2f = mesh.topology()(2, 1)
mesh.init(1, 2)
f2c = mesh.topology()(1, 2)

c2c = {cell: set(sum((f2c(facet).tolist() for facet in c2f(cell)), []))
       for cell in range(mesh.num_cells())}

# Expected
for c in range(mesh.num_cells()): print c, '->', c2c[c]

Comments (2)

  1. Log in to comment