Problem with dof_to_vertex_map

dof_to_vertex_map()

Is just a utility function for simple P1 function spaces. Consider accessing the information you need directly from the DofMap

from dolfin import *

mesh = UnitSquareMesh(1, 1)

for p in range(1, 4):
	V = FunctionSpace(mesh, "CG", p)
	dm = V.dofmap()

	info("Polynomial order: %d" % p)
	info("DoF range owned by this process: %s" % str(dm.ownership_range()))
	info("DoFs block size: %s" % str(dm.block_size()))
	info("Vertex dofs: %s" % str(dm.entity_dofs(mesh, 0)))
	info("Facet dofs: %s" % str(dm.entity_dofs(mesh, 1)))
	info("Cell dofs: %s" % str(dm.entity_dofs(mesh, 2)))
	info("All DoFs (Vertex, Facet, and Cell) associated with cell 0: %s" % str(dm.cell_dofs(0)))
	info("Local (process) to global DoF map: %s" % str(dm.tabulate_local_to_global_dofs()))
	info("******")
1 Like