Merge branch 'master' of github.com:JamesEMcClure/LBPM-WIA
This commit is contained in:
commit
37ae5caeac
@ -288,7 +288,7 @@ int main(int argc, char **argv)
|
|||||||
while (sw_new > SW && Rcrit_new > 0.99){
|
while (sw_new > SW && Rcrit_new > 0.99){
|
||||||
|
|
||||||
Rcrit_old = Rcrit_new;
|
Rcrit_old = Rcrit_new;
|
||||||
Rcrit_new -= deltaR;// decrease critical radius
|
Rcrit_new -= deltaR*Rcrit_old;// decrease critical radius
|
||||||
sw_old = sw_new;
|
sw_old = sw_new;
|
||||||
sw_diff_old = sw_diff_new;
|
sw_diff_old = sw_diff_new;
|
||||||
|
|
||||||
|
@ -61,6 +61,8 @@ int main(int argc, char **argv)
|
|||||||
//printf("Critical radius %f (voxels)\n",Rcrit);
|
//printf("Critical radius %f (voxels)\n",Rcrit);
|
||||||
printf("Target saturation %f \n",SW);
|
printf("Target saturation %f \n",SW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//.......................................................................
|
//.......................................................................
|
||||||
@ -347,12 +349,16 @@ int main(int argc, char **argv)
|
|||||||
int imin,jmin,kmin,imax,jmax,kmax;
|
int imin,jmin,kmin,imax,jmax,kmax;
|
||||||
|
|
||||||
Rcrit_new = maxdistGlobal;
|
Rcrit_new = maxdistGlobal;
|
||||||
|
if (argc>2){
|
||||||
|
Rcrit_new = strtod(argv[2],NULL);
|
||||||
|
if (rank==0) printf("Max. distance =%f, Initial critical radius = %f \n",maxdistGlobal,Rcrit_new);
|
||||||
|
}
|
||||||
while (sw_new > SW)
|
while (sw_new > SW)
|
||||||
{
|
{
|
||||||
sw_diff_old = sw_diff_new;
|
sw_diff_old = sw_diff_new;
|
||||||
sw_old = sw_new;
|
sw_old = sw_new;
|
||||||
Rcrit_old = Rcrit_new;
|
Rcrit_old = Rcrit_new;
|
||||||
Rcrit_new -= deltaR;
|
Rcrit_new -= deltaR*Rcrit_old;
|
||||||
int Window=round(Rcrit_new);
|
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
|
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
|
// and sw<Sw will be immediately broken
|
||||||
@ -483,11 +489,10 @@ int main(int argc, char **argv)
|
|||||||
sw_new = countGlobal/totalGlobal;
|
sw_new = countGlobal/totalGlobal;
|
||||||
sw_diff_new = abs(sw_new-SW);
|
sw_diff_new = abs(sw_new-SW);
|
||||||
// for test only
|
// for test only
|
||||||
// if (rank==0){
|
if (rank==0){
|
||||||
// printf("Final saturation=%f\n",sw_new);
|
printf("Final saturation=%f\n",sw_new);
|
||||||
// printf("Final critical radius=%f\n",Rcrit_new);
|
printf("Final critical radius=%f\n",Rcrit_new);
|
||||||
//
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sw_diff_new<sw_diff_old){
|
if (sw_diff_new<sw_diff_old){
|
||||||
|
Loading…
Reference in New Issue
Block a user