If you are using a scalar space, simply look at:

the $i$th entry in `dof_coordinates`

corresponds to the coordinate of the $i$th degree of freedom, which is the $i$th entry of `u.vector().get_local()`

If you are using a scalar space, simply look at:

the $i$th entry in `dof_coordinates`

corresponds to the coordinate of the $i$th degree of freedom, which is the $i$th entry of `u.vector().get_local()`