next up previous
Next: Problem 2.1 Up: CPS615: Assignment 4 Previous: Code: GAUSS

Problem 2

For this problem, I wrote a collection of routines that solves the 2-dimensional Laplace equation

for a specific domain with specific boundary. The domain is . The boundary is specified by the boundary values of the particular solution to Laplace's equation:

One particular finite differencing of Laplace's equation leads to an iterative scheme that is successively applied to the interior points of the domain:

This iterative method is called Jacobi's method. I have implimented this algorithm in the program LAPLACE.F90. The convergence criterion is that the infinity norm between and be less than 0.000003. In FORTRAN 90, that is

   do while ( MAXVAL( ABS(U - UOLD) ) > 0.000003)
      .
      .
      .
      JACOBI STEP
      .
      .
      .
   enddo

The program then returns the total number of iterations, as well as the infinity norm between the final and the analytic solution from wence came the boundary values. In FORTRAN 90, this is just

   error = MAXVAL(ABS(U - U_ANALYTIC))

The code is described in more detail below.





Mark Miller
Wed Oct 11 16:43:42 EDT 1995