
\section{\label{poisson}The 2-dimensional Poisson equation}

     A fundamental problem in electrostatics is calculation of the
electric field produced by a given distribution of charges.  The
electrostatic potential is obtained by solving the associated Poisson
equation.  In two dimensions, the fixed
charge distribution is a function $c (x, y)$ of the coordinates.  The
electrostatic potential $u (x, y)$ is the solution of the equation
\begin{equation}
\label{continuum}
(\mbox{\boldmath $\nabla$}^2 u) (x, y) = - c (x, y).
\end{equation}

     The most simple-minded approach to solving (\ref{continuum}),
is to replace it by the finite difference approximation
\begin{equation}
\label{discrete}
\begin{array}[b]{l}
u (x + 1, y) + u (x - 1, y) + \\
u (x, y + 1) + u (x, y - 1) - 4 u (x, y) 
\end{array}
= c (x, y).
\end{equation}
The coordinates $x$, $y$ are now integers.  Rearranging (\ref{discrete}) as
\begin{equation}
\label{relaxation}
u (x, y) = \frac{1}{4} (\mbox{sum neighbouring $u$ values} + c (x, y)),
\end{equation}
immediately suggests the simplest iterative algorithm for solving this
system.  In the {\em relaxation} algorithm, starting from some initial guess
for $u$, each iteration replaces the value of $u$ at a point by the average
value of its neighbours (plus an offset determined by the local
charge).  Variants differ in whether the $u$ values inserted in the RHS
of (\ref{relaxation}) are those from the previous sweep of the grid (Jacobi
relaxation) or whether they are the most recent values, which may
include some values already updated in the current sweep
(Gauss-Siedel relaxation).  The last version has further variations
depending on the order in which the grid is traversed---a
popular scheme is ``red-black relaxation'' in which all even sites are
visited first, then all odd sites.

