The mesh coordinates and the coordinates of the dofs are not the same,
To get the coordinates of the degrees of freedom, you need to use
x= W1.tabulate_dof_coordinates()
print(x[max_index])
The mesh coordinates and the coordinates of the dofs are not the same,
To get the coordinates of the degrees of freedom, you need to use
x= W1.tabulate_dof_coordinates()
print(x[max_index])