This is not a complete code that reproduces any problem.
I guess that you are asking if there is a 1-1 mapping between the mesh nodes and the degrees of freedom. For that question, see: How to apply a boundary condition to a range of DOFs? - #9 by dokken