Mapping from mesh.coordinates() to u.vector()

You can use the vertex_to_dof_map function, as used here: Bitbucket

1 Like