This is a simplification of the question I posted here. I thought it deserved its own post since I'm feeling more sure that this is some sort of bug. The printout of the small code attached is:
1 0 8
1 3 7
1 5 11
0 1 5
0 2 8
0 4 12.
Shouldn't the global indices of the shared dofs of processor 0 match those of processor 1?
from dolfin import *
import numpy as np
comm = mpi_comm_world()
mpirank = MPI.rank(comm)
mesh = UnitSquareMesh(2, 2)
Vr = FunctionSpace(mesh, "CG", 1)
Vi = FunctionSpace(mesh, "CG", 1)
V = Vr * Vi
meshtopo = mesh.topology()
dofmap = V.dofmap()
v2d = dofmap.dofs(mesh, 0)
v2dg = np.array([dofmap.local_to_global_index(i) for i in v2d])
shared_entities = meshtopo.shared_entities(0)
for k, n in shared_entities.items():
print mpirank, k, v2dg[k]