Commit 158387de authored by Tilman Steinweg's avatar Tilman Steinweg

fixed small bug in checkfd

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 eddb6dd4
......@@ -10,7 +10,9 @@ guide_sofi2D.pdf
*jout
*.log*
*.su
*.bin*
*.dat
*.json
### C ###
# Object files
......
......@@ -400,10 +400,12 @@ void checkfd ( FILE *fp, float ** prho, float ** ppi, float ** pu,
if ( SNAP ) {
fprintf ( fp," Checking the snapshot parameters. \n" );
if ( ( TSNAP2>TIME ) && ( MYID==0 ) ) {
sprintf ( errormessage,"TSNAP2 = %e (last snapshot) > Time of wave propagation %e. Choose smaller TSNAP2.",TSNAP2, TIME );
err ( errormessage ); /* if TSNAP2>simulation TIME, snapmerge will generate "additional" snapshots out of nowhere, thus, snapshot files size blow up */
}
if (TSNAP2>TIME) {
sprintf(errormessage,"\nTSNAP2 = %e (last snapshot) > Time of wave propagation %e. TSNAP2 was changed to be equal to TIME.\n",TSNAP2, TIME);
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;
snapouty=NY/ ( float ) IDY;
......
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