Basic HTML version of Foils prepared
19 September 98
Foil 79 Jacobi Iteration: update and error
From
MPI Message Passing Interface Computational Science for Simulations --
Fall Semester 1998
.
by
Geoffrey C. Fox, Nancy McCracken
1
myerr = 0.0
2
DO j=1, nylocal-1
DO i = 1, nxlocal-1
unew(i,j) = (u(i-1,j)+u(i+1,j)
+u(i,j-1)+u(i,j+1)+f(i,j))/4
myerr = max(err, ABS(unew(i,j)-u(i,j)))
END DO
3
END DO
4
CALL MPI_ALLREDUCE(myerr,err,
5
1,MPI_REAL,MPI_MAX,MPI_COMM_WORLD,ierr)
6
DO j=1, nylocal-1
DO i = 1, nxlocal-1
u(i,j) = unew(i,j)
END DO
7
END DO
8
END DO
in Table To:
©
Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu
If you have any comments about this server, send e-mail to
webmaster@npac.syr.edu
.
Page produced by
wwwfoil
on Sun Apr 11 1999