Basic HTML version of Foils prepared October 1995

Foil 3 Example Program: a PDE solver, the solution of LaPlace's Equation

From Intro HPF September 27, 1995 CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. by Tom Haupt and Nancy McCracken


Equation for the field can be solved over a rectangular domain if boundary conditions are known. The domain is discretized into a rectangular grid with values at the boundary points.
To solve, start with an initial guess and use Jacobi or Gauss-Seidel iterative techniques to improve the solution within a small error range using the formula:
A Fortran 90 statement where W is the array of grid points:
W(2:R-1, 2:C-1) = .25 (W(2:R-1, 1:C-2) + W(2:R-1, 3:C) + W(1:R-2, 2:C-1) + W(3:R, 2:C-1)).



© on Tue Oct 7 1997