1 + 1) * (N2 + 1), MPI_DOUBLE, 0, MPI_COMM_WORLD); (rank == 0) {{(i = 0; i <= N1; i + +) (j = 0; j <= N2; j + +) [i] [j] = Y [i] [j]; (i = 1; i <= (N1 - 1) /size; i + +) {(j = 1; j
}
} (i = 0; i <= (N - 1); i + +) {+ = (- D [i])/(C [i] + Ai * alfa [i-1 ]);
beta + = (F [i] - A [i] * beta [i-1])/(C [i] + Ai * alfa [i-1]);
} (j = (N +1); j <= 1; j -) + = alfa [i] * Y [i +1] [j] + beta [i]; (size == 1) {
do {(i = 1; i
Fi = (- (Y [i +1] [j] + Y [i] [j +1]))/D + RoFresh;
}
} = m = - 999; (i = 0; i <= N1; i + +) {(j = 0; j <= N2; j + +) {= fabs (Ysh [i] [j] - Y [i] [j]);
if (pogr> max) max = pogr; = fabs (Ysh [i] [j]); (pogr> m) m = pogr;
}
} (max/m
flag = 0;
}
// Перезапис даних (i = 1; i
for (j = 1; j
} while (flag); (1);
} else {
s_t - = MPI_Wtime ();
// Посилка наступного процесору верхній рядок з основної матриці в нижню граніцу_Send (& Ysh, (N1 + 1) * (N2 + 1), MPI_DOUBLE, 1, 1, MPI_COMM_WORLD); _Recv (& ; Y, (N1 + 1) * (N2 + 1), MPI_DOUBLE, 1, 1, MPI_COMM_WORLD, & stat); _t + = MPI_Wtime ();
}
} while (1);
} ((rank> 0) && (rank
}
} _t - = MPI_Wtime (); _Send (& Ysh, (N1 + 1) * (N2 + 1), MPI_DOUBLE, rank - 1, 1, MPI_COMM_WORLD); _Send (& Ysh , (N1 + 1) * (N2 + 1), MPI_DOUBLE, rank + 1, 1, MPI_COMM_WORLD); _Recv (& Y, (N1 + 1) * (N2 + 1), MPI_DOUBLE, rank + 1, 1, MPI_COMM_WORLD, & stat); _t + = MPI_Wtime ();
} while (1);
} ((rank == size - 1) && (rank! = 0)) {{_t - = MPI_Wtime (); _Recv (& Ysh, (N1 + 1) * (N2 + 1), MPI_DOUBLE, rank - 1, 1, MPI_COMM_WORLD, & stat); _t + = MPI_Wtime ();
// for (i = (N1-1)/size * (size - 1) + 1; i
}
} = m = - 999; (i = 0; i <= N1; i + +) {(j = 0; j <= N2; j + +) {= fabs (Ysh [i] [j] - Y [i] [j]); (pogr> max) max = pogr; = fab...