How to determine gradient field of vectors with one degree of freedom?

37 Views Asked by At

I have a three-dimensional meshgrid, where in each point of the grid, I have a vector $v$ with one degree of freedom. What I know about this vector field is: $$v:=\nabla u$$ that it is supposed to be a gradient field. I also know the values of $u$ at one boundary.

The problem is that I do have these vectors in each point but they have all a degree of freedom and I don't know if there is a way to fix or determine all vectors to form a gradient field.