# Problem with dof\_to\_vertex\_map

**URL:** <https://fenicsproject.discourse.group/t/problem-with-dof-to-vertex-map/1143>\
**Category:** mesh\
**Created:** [July 16, 2019, 4:58pm UTC](https://fenicsproject.discourse.group/t/problem-with-dof-to-vertex-map/1143 "2019-07-16T16:58:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nate](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/nate/32/17_2.png) [@nate](https://fenicsproject.discourse.group/u/nate)\
**Post date:** [July 16, 2019, 6:42pm UTC](https://fenicsproject.discourse.group/t/problem-with-dof-to-vertex-map/1143/3 "2019-07-16T18:42:21Z")

</div>

```auto
dof_to_vertex_map()

```

Is just a utility function for simple `P1` function spaces. Consider accessing the information you need directly from the [`DofMap`](https://bitbucket.org/fenics-project/dolfin/src/master/dolfin/fem/DofMap.h)

```auto
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(" ******")

```

---

_[View the full topic](https://fenicsproject.discourse.group/t/problem-with-dof-to-vertex-map/1143)._
