Commit ba6e2772 authored by Tilman Steinweg's avatar Tilman Steinweg

TSNAP2 will be set to TIME if TSNAP>TIME. ( Time is recalculated to TIME=NT*DT...

TSNAP2 will be set to TIME if TSNAP>TIME. ( Time is recalculated to TIME=NT*DT in sofi3D.c and thus can differ to TIME given in .json. So even if TIME and TSNAP2 are equal in .json they can differ in the checkfd functions)
parent 1850942e
...@@ -432,9 +432,11 @@ void checkfd_acoustic(FILE *fp, float *** prho, float *** ppi, float **srcpos, i ...@@ -432,9 +432,11 @@ void checkfd_acoustic(FILE *fp, float *** prho, float *** ppi, float **srcpos, i
if (SNAP){ if (SNAP){
fprintf(fp," Checking the snapshot parameters. \n"); fprintf(fp," Checking the snapshot parameters. \n");
if ((TSNAP2>TIME) && (MYID==0)){ if (TSNAP2>TIME) {
sprintf(errormessage,"TSNAP2 = %e (last snapshot) > Time of wave propagation %e. Choose smaller TSNAP2.",TSNAP2, TIME); sprintf(errormessage,"\nTSNAP2 = %e (last snapshot) > Time of wave propagation %e. TSNAP2 was changed to be equal to TIME.\n",TSNAP2, TIME);
err(errormessage); /* if TSNAP2>simulation TIME, snapmerge will generate "additional" snapshots out of nowhere, thus, snapshot files size blow up */ TSNAP2=TIME;
if (MYID==0)
warning(errormessage); /* if TSNAP2>simulation TIME, snapmerge will generate "additional" snapshots out of nowhere, thus, snapshot files size blow up */
} }
snapoutx=NX/(float)IDX; snapoutx=NX/(float)IDX;
......
...@@ -549,9 +549,11 @@ void checkfd(FILE *fp, float *** prho, float *** ppi, float *** pu, ...@@ -549,9 +549,11 @@ void checkfd(FILE *fp, float *** prho, float *** ppi, float *** pu,
if (SNAP){ if (SNAP){
fprintf(fp," Checking the snapshot parameters. \n"); fprintf(fp," Checking the snapshot parameters. \n");
if ((TSNAP2>TIME) && (MYID==0)){ if (TSNAP2>TIME) {
sprintf(errormessage,"TSNAP2 = %e (last snapshot) > Time of wave propagation %e. Choose smaller TSNAP2.",TSNAP2, TIME); sprintf(errormessage,"\nTSNAP2 = %e (last snapshot) > Time of wave propagation %e. TSNAP2 was changed to be equal to TIME.\n",TSNAP2, TIME);
err(errormessage); /* if TSNAP2>simulation TIME, snapmerge will generate "additional" snapshots out of nowhere, thus, snapshot files size blow up */ TSNAP2=TIME;
if (MYID==0)
warning(errormessage); /* if TSNAP2>simulation TIME, snapmerge will generate "additional" snapshots out of nowhere, thus, snapshot files size blow up */
} }
snapoutx=NX/(float)IDX; snapoutx=NX/(float)IDX;
......
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