SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. double maxLocalDeviation = 0;
  2. for (i = 1; i < mx1; i++)
  3.     for (j = 1; j < my1; j++)
  4.     {
  5.         double df = fabs(newf[i][j] - f[i][j]);
  6.         if (df > maxLocalDeviation)
  7.             maxLocalDeviation = df;
  8.     }
  9.  
  10. double globalDeviation = 0;
  11. MPI_Allreduce(&maxLocalDeviation, &globalDeviation, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
  12.  
  13. if (globalDeviation < EPS)
  14.     break;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top