Commit aca39e8a authored by laura.gassner's avatar laura.gassner

adjustment of acoustic toy-example, scaling of the elastic explosive source...

adjustment of acoustic toy-example, scaling of the elastic explosive source and acoustic free surface condition.
parent 298e5436
5 5
350.00 0.00 10.00 0.00 4.00 1.00e+10 350.00 0.00 20.00 0.00 4.00 1.00e+10
550.00 0.00 10.00 0.00 4.00 1.00e+10 550.00 0.00 20.00 0.00 4.00 1.00e+10
750.00 0.00 10.00 0.00 4.00 1.00e+10 750.00 0.00 20.00 0.00 4.00 1.00e+10
950.00 0.00 10.00 0.00 4.00 1.00e+10 950.00 0.00 20.00 0.00 4.00 1.00e+10
1150.00 0.00 10.00 0.00 4.00 1.00e+10 1150.00 0.00 20.00 0.00 4.00 1.00e+10
...@@ -52,8 +52,8 @@ float ** srcpos_loc, float ** signals, int nsrc, int sw){ ...@@ -52,8 +52,8 @@ float ** srcpos_loc, float ** signals, int nsrc, int sw){
// amp = signals[l][nt]; //unscaled explosive source // amp = signals[l][nt]; //unscaled explosive source
if(!ACOUSTIC){ if(!ACOUSTIC){
sxx[j][i]+=amp; sxx[j][i]+=0.5*amp;
syy[j][i]+=amp; syy[j][i]+=0.5*amp;
}else }else
sp[j][i]+=amp; sp[j][i]+=amp;
}} }}
...@@ -67,8 +67,8 @@ float ** srcpos_loc, float ** signals, int nsrc, int sw){ ...@@ -67,8 +67,8 @@ float ** srcpos_loc, float ** signals, int nsrc, int sw){
amp = signals[l][nt]; amp = signals[l][nt];
if(!ACOUSTIC){ if(!ACOUSTIC){
sxx[j][i]+=amp; sxx[j][i]+=0.5*amp;
syy[j][i]+=amp; syy[j][i]+=0.5*amp;
}else }else
sp[j][i]+=amp; sp[j][i]+=amp;
} }
......
...@@ -384,10 +384,6 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -384,10 +384,6 @@ void read_par_json(FILE *fp, char *fileinp){
if (get_int_from_objectlist("ACOUSTIC",number_readobjects,&ACOUSTIC,varname_list, value_list)){ if (get_int_from_objectlist("ACOUSTIC",number_readobjects,&ACOUSTIC,varname_list, value_list)){
ACOUSTIC=0; ACOUSTIC=0;
fprintf(fp,"Variable ACOUSTIC is set to default value %d.\n",ACOUSTIC);} fprintf(fp,"Variable ACOUSTIC is set to default value %d.\n",ACOUSTIC);}
else if(ACOUSTIC==1){
FDORDER=2;
fprintf(fp,"For acoustic modelling only FDORDER=%d possible.\n",FDORDER);
} else if(ACOUSTIC>1) err("Only ACOUSTIC=0 ((visco-)elastic Modelling and Inversion) or ACOUSTIC=1 (acoustic Modelling and Inversion) possible");
/*================================= /*=================================
...@@ -482,8 +478,10 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -482,8 +478,10 @@ void read_par_json(FILE *fp, char *fileinp){
if (SWS_TAPER_FILE==1){ if (SWS_TAPER_FILE==1){
if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list)) if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list))
err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!"); err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!");
if (get_string_from_objectlist("TAPER_FILE_NAME_U",number_readobjects,TAPER_FILE_NAME_U,varname_list, value_list)) if(!ACOUSTIC){
err("Variable TAPER_FILE_NAME_U could not be retrieved from the json input file!"); if (get_string_from_objectlist("TAPER_FILE_NAME_U",number_readobjects,TAPER_FILE_NAME_U,varname_list, value_list))
err("Variable TAPER_FILE_NAME_U could not be retrieved from the json input file!");
}
if (get_string_from_objectlist("TAPER_FILE_NAME_RHO",number_readobjects,TAPER_FILE_NAME_RHO,varname_list, value_list)) if (get_string_from_objectlist("TAPER_FILE_NAME_RHO",number_readobjects,TAPER_FILE_NAME_RHO,varname_list, value_list))
err("Variable TAPER_FILE_NAME_RHO could not be retrieved from the json input file!");} err("Variable TAPER_FILE_NAME_RHO could not be retrieved from the json input file!");}
if (get_int_from_objectlist("SWS_TAPER_FILE_PER_SHOT",number_readobjects,&SWS_TAPER_FILE_PER_SHOT,varname_list, value_list)){ if (get_int_from_objectlist("SWS_TAPER_FILE_PER_SHOT",number_readobjects,&SWS_TAPER_FILE_PER_SHOT,varname_list, value_list)){
...@@ -646,25 +644,24 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -646,25 +644,24 @@ void read_par_json(FILE *fp, char *fileinp){
} }
} }
if(INV_STF){
/* Trace killing STF */
if (get_int_from_objectlist("TRKILL_STF",number_readobjects,&TRKILL_STF,varname_list, value_list)){
/* Trace killing STF */ TRKILL_STF=0;
if (get_int_from_objectlist("TRKILL_STF",number_readobjects,&TRKILL_STF,varname_list, value_list)){ fprintf(fp,"Variable TRKILL_STF is set to default value %d.\n",TRKILL_STF);}
TRKILL_STF=0; else {
fprintf(fp,"Variable TRKILL_STF is set to default value %d.\n",TRKILL_STF);} if (TRKILL_STF==1) {
else { if (get_string_from_objectlist("TRKILL_FILE_STF",number_readobjects,TRKILL_FILE_STF,varname_list, value_list))
if (TRKILL_STF==1) { err("Variable TRKILL_FILE_STF could not be retrieved from the json input file!");
if (get_string_from_objectlist("TRKILL_FILE_STF",number_readobjects,TRKILL_FILE_STF,varname_list, value_list)) }
err("Variable TRKILL_FILE_STF could not be retrieved from the json input file!");
} }
/* Taper STF */
if (get_int_from_objectlist("TAPER_STF",number_readobjects,&TAPER_STF,varname_list, value_list)){
TAPER_STF=0;
fprintf(fp,"Variable TAPER_STF is set to default value %d.\n",TAPER_STF);}
} }
/* Taper STF */
if (get_int_from_objectlist("TAPER_STF",number_readobjects,&TAPER_STF,varname_list, value_list)){
TAPER_STF=0;
fprintf(fp,"Variable TAPER_STF is set to default value %d.\n",TAPER_STF);}
/* Frequency filtering during inversion */ /* Frequency filtering during inversion */
if (get_int_from_objectlist("TIME_FILT",number_readobjects,&TIME_FILT,varname_list, value_list)){ if (get_int_from_objectlist("TIME_FILT",number_readobjects,&TIME_FILT,varname_list, value_list)){
TIME_FILT=0; TIME_FILT=0;
......
...@@ -36,7 +36,7 @@ void surface_acoustic_PML(int ndepth, float ** sp){ ...@@ -36,7 +36,7 @@ void surface_acoustic_PML(int ndepth, float ** sp){
j=ndepth; /* The free surface is located exactly in y=1/2*dh !! */ j=ndepth; /* The free surface is located exactly in y=1/2*dh !! */
for (i=1;i<=NX;i++){ for (i=1;i<=NX;i++){
// sp[j][i] = 0; sp[j][i] = 0;
for (m=1; m<=fdoh; m++) { for (m=1; m<=fdoh; m++) {
sp[j-m][i] = -sp[j+m][i]; sp[j-m][i] = -sp[j+m][i];
} }
......
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