Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double maxLocalDeviation = 0;
- for (i = 1; i < mx1; i++)
- for (j = 1; j < my1; j++)
- {
- double df = fabs(newf[i][j] - f[i][j]);
- if (df > maxLocalDeviation)
- maxLocalDeviation = df;
- }
- double globalDeviation = 0;
- MPI_Allreduce(&maxLocalDeviation, &globalDeviation, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
- if (globalDeviation < EPS)
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement