I was wondering if the entries of dofmap.cell_dofs(cell.index()) correspond to the entries of dofmap.tabulate_coordinates(cell) for DG elements of order 1? In particular, is the following true?
from dolfin import *
mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, "DG", 1)
dofmap = V.dofmap()
for cell in cells(mesh):
verts = dofmap.tabulate_coordinates(cell)
dofs = dofmap.cell_dofs(cell.index())
for j in range(3):
print "Does vertex ", verts[j], " correspond to DOF ", dofs[j]
If not, is there some way I can obtain a relationship between DOFs and vertices for this particular function space? What I need in particular is to be able to map DOFs of a cell T onto the DOFs of the translated cell T + n.h, where n is a positive integer, and h is the (uniform) mesh size.
Thanks for any help!