Commit df4ae41f authored by Florian Wittkamp's avatar Florian Wittkamp

L-BFGS: Small enhancements

parent 72f5d9ef
......@@ -84,9 +84,8 @@
"MISFIT_LOG_FILE" : "LOG_toy_example.dat",
"Workflow" : "comment",
"USE_WORKFLOW" : "1",
"USE_WORKFLOW" : "0",
"FILE_WORKFLOW" : "workflow.txt",
"RESTART_WORKFLOW" : "0",
"Inversion for density" : "comment",
"INV_RHO_ITER" : "400",
......@@ -110,18 +109,13 @@
"Wolfe Condition" : "comment",
"WOLFE_CONDITION" : "1",
"WOLFE_NUM_TEST" : "5",
"WOLFE_TRY_OLD_STEPLENGTH" : "0",
"WOLFE_TRY_OLD_STEPLENGTH" : "1",
"Approx. Hessian" : "comment",
"EPRECOND" : "0",
"EPSILON_WE" : "0.005",
"EPRECOND_ITER" : "0",
"Workflow" : "comment",
"USE_WORKFLOW" : "0",
"FILE_WORKFLOW" : "workflow.txt",
"Gradient calculation" : "comment",
"LNORM" : "7",
"LNORM values: L1 norm=1, L2 norm=2, Cauchy=3, SECH=4, Global correlation=5, L2 norm with time windowing=6" : "comment",
......@@ -129,7 +123,7 @@
"DTINV" : "15",
"Step length estimation" : "comment",
"EPS_SCALE" : "0.01",
"EPS_SCALE" : "0.04",
"STEPMAX" : "4",
"SCALEFAC" : "5.0",
"TESTSHOT_START , TESTSHOT_END , TESTSHOT_INCR" : "1 , 5 , 2",
......
......@@ -103,7 +103,7 @@
"Wolfe Condition" : "comment",
"WOLFE_CONDITION" : "1",
"WOLFE_NUM_TEST" : "5",
"WOLFE_TRY_OLD_STEPLENGTH" : "0",
"WOLFE_TRY_OLD_STEPLENGTH" : "1",
"Approx. Hessian" : "comment",
"EPRECOND" : "3",
......
......@@ -97,8 +97,24 @@
"nfstart_jac" : "1",
"nf_jac" : "1",
"Hessian and Gradient-Method" : "comment",
"Gradient-Method" : "comment",
"GRAD_METHOD" : "1",
"LBFGS_STEP_LENGTH" : "1",
"N_LBFGS" : "5",
"Wolfe Condition" : "comment",
"WOLFE_CONDITION" : "1",
"WOLFE_NUM_TEST" : "5",
"WOLFE_TRY_OLD_STEPLENGTH" : "1",
"Approx. Hessian" : "comment",
"EPRECOND" : "0",
"EPSILON_WE" : "0.005",
"EPRECOND_ITER" : "0",
"Workflow" : "comment",
"USE_WORKFLOW" : "0",
"FILE_WORKFLOW" : "workflow.txt",
"Gradient calculation" : "comment",
"LNORM" : "2",
......
......@@ -320,7 +320,7 @@ void lbfgs_reset(int iter, int N_LBFGS, int NPAR_LBFGS,float ** s_LBFGS1, float
if(MYID==0) printf("\n\n ------------ L-BFGS ---------------");
if(MYID==0&&iter>1) printf("\n Reset L-BFGS at iteration %d",iter);
if(MYID==0&&iter==1) printf("\n L-BFGS will be used from iteration %d on",iter);
if(MYID==0&&iter==1) printf("\n L-BFGS will be used from iteration %d on",iter+1);
for(l=1;l<=N_LBFGS;l++){
for(m=1;m<=NPAR_LBFGS*NX*NY;m++){
......
......@@ -582,11 +582,11 @@ int main(int argc, char **argv){
if(WOLFE_CONDITION){
waveconv_old= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
waveconv_u_old= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
if(!ACOUSTIC) waveconv_u_old= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
waveconv_rho_old= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
waveconv_up= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
waveconv_u_up= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
if(!ACOUSTIC) waveconv_u_up= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
waveconv_rho_up= matrix(-nd+1,NY+nd,-nd+1,NX+nd);
}
......
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