Commit 9cad13733896913c2918ed58ee8f7815593f7448
1 parent
6c0f7fa151
Exists in
master
MAJ
Showing 5 changed files with 7 additions and 7 deletions Side-by-side Diff
lab1/pi_mpi.c
View file @
9cad137
lab1/pi_ser.c
View file @
9cad137
lab3/mpi_heat2D.c
View file @
9cad137
lab3/plot.py
View file @
9cad137
lab3/ser_heat2D.c
View file @
9cad137
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | u[Central] = (1/4) * ( u[North] + u[South] + u[East] + u[West] ) |
| 24 | 24 | |
| 25 | 25 | ****************************************************************************/ |
| 26 | -#include <stdio.h> | |
| 26 | +#include <stdio.h> | |
| 27 | 27 | #include <stdlib.h> |
| 28 | 28 | #include <math.h> |
| 29 | 29 | |
| ... | ... | @@ -102,7 +102,7 @@ |
| 102 | 102 | |
| 103 | 103 | if(iter%ITER_PRINT==0) |
| 104 | 104 | |
| 105 | - printf("Iteration %d, diff = %f\n ", iter,diff); | |
| 105 | + printf("Iteration %d, diff = %e\n ", iter,diff); | |
| 106 | 106 | |
| 107 | 107 | iter++; |
| 108 | 108 | } |
| ... | ... | @@ -185,7 +185,7 @@ |
| 185 | 185 | |
| 186 | 186 | //boundary top |
| 187 | 187 | for (iy = 0; iy < ny; iy++){ |
| 188 | - u[iy]=0.0; | |
| 188 | + u[iy]=100.0; | |
| 189 | 189 | |
| 190 | 190 | } |
| 191 | 191 |