This module illustrates the numerical solution of Laplace's equation
using iterative methods to solve the linear system resulting from a
finite difference discretization. Laplace's equation (also called the
potential equation) in two space dimensions is the partial differential
equation
The user begins by selecting from the menu provided a set of boundary conditions, whose values are displayed below the menu. Next the user specifies the number of interior grid points n to be used in each dimension of a two-dimensional grid discretizing the unit square. Finally, the user chooses an iterative method to solve the resulting system of n2 finite difference equations, with one equation and one unknown for each interior grid point. The menu of iterative methods is roughly ordered from slowest to fastest convergence rate. For the SOR method, the user can specify the relaxation parameter ω. Any choice allowed for ω will eventually converge, but the optimal ω indicated gives the best asymptotic convergence rate for this particular finite difference system. Here the SOR method is implemented using the "red-black" ordering, in which the mesh points are colored as in a checkerboard, and on each iteration the solution components corresponding to the red points are updated before those corresponding to the black points.
The initial guess for the solution is taken to be zero at each
interior grid point. At any stage of the iterative solution process,
the current approximate solution is represented in three dimensions as
a surface over the unit square, including both the approximate solution
values at interior points and the prescribed boundary values at
boundary points. An iteration is performed each time the user clicks
Iterate, and the resulting new approximate solution surface is
updated in the graph. The residual displayed provides a means of
monitoring convergence to the solution of the linear system. At
convergence, the accuracy of the discrete approximation to the
continuous solution of Laplace's equation depends on the number of grid
points, with the error being proportional to
Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 11.3.1, especially Example 11.5, and Section 11.5.
Developers: Evan VanderZee and Michael Heath