Commit 86ced852 authored by Simone Butzer's avatar Simone Butzer

Minor changes readhess

parent 70308326
......@@ -643,7 +643,7 @@ CPML_coeff(K_x,alpha_prime_x,a_x,b_x,K_x_half,alpha_prime_x_half,a_x_half,b_x_ha
if(HESS&&READ_HESS==0) hloop=ntr_hess;
if(HESS&&READ_HESS==1) readhess(NX,NY,NZ,hess1,hess2,hess3,finv[0], iteration+100);
if(HESS&&READ_HESS==1) readhess(NX,NY,NZ,hess1,hess2,hess3,finv[0], iteration+1-it_group);
MPI_Barrier(MPI_COMM_WORLD);
if(METHOD==1 && EXTOBS==1){
for (ishot=1;ishot<=nshots;ishot++){
......@@ -977,7 +977,7 @@ CPML_coeff(K_x,alpha_prime_x,a_x,b_x,K_x_half,alpha_prime_x_half,a_x_half,b_x_ha
if(METHOD){
/*output Hessian*/
if(HESS&&iteration==1) outgrad(NX,NY,NZ,hess1,hess2,hess3,finv[0],iteration+100, HESS_FILE);
if(HESS&&iteration==1) outgrad(NX,NY,NZ,hess1,hess2,hess3,finv[0],iteration, HESS_FILE);
/*output "raw" gradient*/
outgrad(NX,NY,NZ,grad1,grad2,grad3,finv[0],iteration, GRAD_FILE);
......
......@@ -45,15 +45,15 @@ void readhess(int nx, int ny, int nz, float *** hess1, float *** hess2, float
fprintf(FP,"\n...reading hess information from hess-files...\n");
/*sprintf(filename,"hess/hess.vp");*/
sprintf(filename,"%s.vp_%4.2fHz_it%d.%i.%i.%i",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
sprintf(filename,"%s.vp_%4.2fHz_it%d",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
fp_vp=fopen(filename,"r");
if (fp_vp==NULL) err(" Could not open hess_vp ! ");
sprintf(filename,"%s.vs_%4.2fHz_it%d.%i.%i.%i",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
sprintf(filename,"%s.vs_%4.2fHz_it%d",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
fp_vs=fopen(filename,"r");
if (fp_vs==NULL) err(" Could not open hess_vs! ");
sprintf(filename,"%s.rho_%4.2fHz_it%d.%i.%i.%i",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
sprintf(filename,"%s.rho_%4.2fHz_it%d",HESS_FILE,finv,iteration,POS[1],POS[2],POS[3]);
fp_rho=fopen(filename,"r");
if (fp_rho==NULL) err(" Could not open hess_rho ! ");
......
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