The problem is that function evaluation isn’t really made for parallel computing. There are several other posts proposing workarounds, see: Problem with evaluation at a point in parallel
However, note as you are evaluating the function at the vertices, these align with a CG1 function space, and you do not need function evaluation to get the values at these nodes.
From a function u, you can get the values at the dog coordinates with u.vector().get_local()
, where the values are ordered as V.tabulate_dof_coordinates()
.