Working on morphological initialization when wide scale variability is present

This commit is contained in:
James E McClure 2017-07-09 18:56:52 -04:00
parent 56a2d6294b
commit 3807039a60
2 changed files with 6 additions and 7 deletions

View File

@ -288,7 +288,7 @@ int main(int argc, char **argv)
while (sw_new > SW && Rcrit_new > 0.99){
Rcrit_old = Rcrit_new;
Rcrit_new -= deltaR;// decrease critical radius
Rcrit_new -= deltaR*Rcrit_old;// decrease critical radius
sw_old = sw_new;
sw_diff_old = sw_diff_new;

View File

@ -352,7 +352,7 @@ int main(int argc, char **argv)
sw_diff_old = sw_diff_new;
sw_old = sw_new;
Rcrit_old = Rcrit_new;
Rcrit_new -= deltaR;
Rcrit_new -= deltaR*Rcrit_old;
int Window=round(Rcrit_new);
if (Window == 0) Window = 1; // If Window = 0 at the begining, after the following process will have sw=1.0
// and sw<Sw will be immediately broken
@ -483,11 +483,10 @@ int main(int argc, char **argv)
sw_new = countGlobal/totalGlobal;
sw_diff_new = abs(sw_new-SW);
// for test only
// if (rank==0){
// printf("Final saturation=%f\n",sw_new);
// printf("Final critical radius=%f\n",Rcrit_new);
//
// }
if (rank==0){
printf("Final saturation=%f\n",sw_new);
printf("Final critical radius=%f\n",Rcrit_new);
}
}
if (sw_diff_new<sw_diff_old){