Consider a First-order PDE in $2D$, i.e. find a function $u : \Omega \subset \mathbb{R}^2 \rightarrow \mathbb{R}$ such that $u_x = p$ and $u_y = q$ for some functions $p, q: \Omega \rightarrow \mathbb{R}$
What kind of numerical scheme might one use to solve this PDE, if we only have grid functions $p^h, q^h$ on some discretization $\Omega^h$ of $\Omega$? What kind of boundary conditions can we apply?
Although this setup seems to me like the easiest multidimensional PDE, most scripts about PDE or numerics for PDE in $2D$ start with some $5$-point star for $\Delta u = 0$, a second order PDE. I have not been able to find a simple go-to scheme to solve first order PDEs.
Here is a simple approach, for the case where $\Omega$ is a rectangle. There is only a solution if $p_y = q_x$. The value of $u$ must be specified at some specific point $(x_0,y_0)$. The value of $u$ at any other point can be computed by integrating: $u(x,y) = u(x_0,y_0) + \int_{x_0}^x u_x(s,y_0) ds + \int_{y_0}^y u_y(x,t) dt$. These integrals can be approximated numerically.