Commit a69b0df8 authored by Florian Wittkamp's avatar Florian Wittkamp

Fixed a bug which prevented to stop at max FC.

Fixed a bug which prevented to stop at max FC when FC_END was not a multiple of FC_INCR.
Additionally L-BFGS will try step length 1 first every time a new frequency stage is choosen.
parent 80e2760b
...@@ -3067,6 +3067,7 @@ int main(int argc, char **argv){ ...@@ -3067,6 +3067,7 @@ int main(int argc, char **argv){
steplength_search=0; steplength_search=0;
wolfe_SLS_failed=1; wolfe_SLS_failed=1;
alpha_SL_old=1;
} else { } else {
FWI_run=0; FWI_run=0;
gradient_optimization=1; gradient_optimization=1;
...@@ -3815,17 +3816,18 @@ int main(int argc, char **argv){ ...@@ -3815,17 +3816,18 @@ int main(int argc, char **argv){
printf("\n Did not find a step length which decreases the misfit.\n");} printf("\n Did not find a step length which decreases the misfit.\n");}
} }
if(FC==FC_END){ FC=FC+FC_INCR;
s=1;
min_iter_help=0;
min_iter_help=iter+MIN_ITER;
if(FC>FC_END){
if(MYID==0){ if(MYID==0){
printf("\n Reached the maximum frequency of %4.2f Hz \n",FC); printf("\n Reached the maximum frequency of %4.2f Hz \n",FC);
} }
break; break;
} }
FC=FC+FC_INCR;
s=1;
min_iter_help=0;
min_iter_help=iter+MIN_ITER;
if(MYID==0) printf("Changing to corner frequency of %4.2f Hz \n",FC); if(MYID==0) printf("Changing to corner frequency of %4.2f Hz \n",FC);
/* Restart L-BFGS at next iteration */ /* Restart L-BFGS at next iteration */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment