Problem Formulation

1. Variational formulation

Let $p$ and $q$ the slopes according respectively to the $x$ and the $y$ axis. For each test function $v$, the solution of the following problem give us the height $z$ from the surface we want to rebuild :

$\int_\Omega \Delta z v = \int_\Omega \nabla\cdot((p,q))v$

By the use of Green formula on the left member :

$\int_\Omega \Delta z v = -\int_\Omega \nabla z \cdot \nabla v + \int_{\partial\Omega}\frac{\partial z}{\partial n} v$

And the same on the right member :

$\int_\Omega \nabla\cdot ((p,q)) v = -\int_\Omega(p,q)\cdot\nabla v + \int_{\partial\Omega}(p,q)\cdot\vec{n}v$

We have then :

$-\int_\Omega \nabla z \cdot \nabla v + \int_{\partial\Omega}\frac{\partial z}{\partial n} v =-\int_\Omega(p,q)\cdot\nabla v + \int_{\partial\Omega}(p,q)\cdot\vec{n}v$

We can notice that :

$\int_{\partial\Omega}\frac{\partial z}{\partial n} v = \int_{\partial\Omega}(p,q)\cdot\vec{n}v$

Finally, we obtain the weak formula :

$\int_\Omega \nabla z \cdot \nabla v = \int_\Omega(p,q)\cdot\nabla v$
 The previous problem has a solution up to a constant, to ensure uniqueness we select the zero-mean solution, i.e $\int_\Omega z = 0$