myerr = 0.0
|
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
|
END DO
|
CALL MPI_ALLREDUCE(myerr,err,
|
1,MPI_REAL,MPI_MAX,MPI_COMM_WORLD,ierr)
|
DO j=1, nylocal-1
-
DO i = 1, nxlocal-1
-
END DO
|
END DO
|
END DO
|