2

I'm not sure whether this is a mathematics or stack overflow question, but I'll try here as my doubt are because of my lack of maths knowledge.

I'm trying to implement an image editing paper that relies on poisson equation with dirichlet condition associated. In particular I've:

$\displaystyle \min_{f}\int\int_{\Omega} |\nabla f |^2$ with $f|_{\partial\Omega}=f^*|_{\partial\Omega}$ that as far as I've understood is solved by

$\Delta f = 0$ over $\Omega$ with $f|_{\partial\Omega}=f^*|_{\partial\Omega}$

Reading these slides on page 14 I got what the x vector is and kind of understant the matrix A, but I'm totally lost on the b vector. The first thing I thought was that the known b are the one given by the Dirichlet condition and so in corrispondence of $x_i$ if it's on the boundary, I've to put the value of $f^*$. Is that right ?

Still, I feel my knowledge in this mathematical field very weak so I need a sort of confirmation.

Thank you for any help.

EDIT: $f^*$ is known

cifz
  • 141

1 Answers1

0

In order to solve your Laplace equation $\Delta f = 0$ you discretize your domain - this you understood. By writing $f_{i,j} = f(x_i, y_j)$, you have

\begin{equation} -f_{i+1, j} - f_{i-1, j} - f_{i, j+1} - f_{i, j-1} + 4f_{i, j} = 0\quad (1) \end{equation}

and the values of $f_{i, j}$ are UNKNOWN everywhere on your domain, except on the boundary, that's why you separate two cases :

-Inside the domain, at every point $(i, j)$ you have 5 unknown in the equation (1)

-At the boundary of the domain, for example you know that $f_{i, 0} = f^*_{i, 0}$, thus the discrete Laplace equation (1) is for $j=1$

\begin{equation} -f_{i+1, 1} - f_{i-1, 1} - f_{i, 2} - f^*_{i, 0} + 4f_{i, j} = 0 \end{equation} where you know the value of one component and thus have only 4 unknowns! So you rather write \begin{equation} -f_{i+1, 1} - f_{i-1, 1} - f_{i, 2} + 4f_{i, 1} = f^*_{i, 0} \end{equation} with at the left what you don't know and at the right what you know.

If you do this for all $i$ and $j$ on your grid you have like $N\times N$ equations, that you rewrite $Af = b$ with $f$ the vector of all the unknown $f_{i, j}$ and with the member $b$ containing the values of $f^*$ like in the example above. (So this is what you thought).

The only difficulty is to put the good values of $f^*$ in the good place in $b$.. This is your work now!

Vintarel
  • 650