[cig-commits] r14659 - long/3D/SNAC/trunk/StGermain/Base/Context/src
echoi at geodynamics.org
echoi at geodynamics.org
Fri Apr 10 14:03:55 PDT 2009
Author: echoi
Date: 2009-04-10 14:03:54 -0700 (Fri, 10 Apr 2009)
New Revision: 14659
Modified:
long/3D/SNAC/trunk/StGermain/Base/Context/src/AbstractContext.c
Log:
1. currentTime is increased before updating physical quantities in AbstractContext_Step().
- No physical implication.
- Needed only to set the "currentTime" for the time step 1 to be
equal to "startTime+dt".
- It remains to verify that this change is compatible with a restarted run.
- In accordance with this change, Snac's first dumpint step became 1, not 0.
2. timeInfo.*.dat are *always* written at the maxTimeStep.
- timeInfo.*.dat are the StGermain-generated files containing time step and current time to be used when restarting from a checkpoint.
Modified: long/3D/SNAC/trunk/StGermain/Base/Context/src/AbstractContext.c
===================================================================
--- long/3D/SNAC/trunk/StGermain/Base/Context/src/AbstractContext.c 2009-04-10 20:54:17 UTC (rev 14658)
+++ long/3D/SNAC/trunk/StGermain/Base/Context/src/AbstractContext.c 2009-04-10 21:03:54 UTC (rev 14659)
@@ -888,10 +888,10 @@
dt = self->dtFactor * AbstractContext_Dt( self );
}
+ self->currentTime += dt;
+
AbstractContext_Step( self, dt );
- self->currentTime += dt;
-
if ( self->frequentOutputEvery ) {
if ( self->timeStep % self->frequentOutputEvery == 0 )
AbstractContext_FrequentOutput( self );
@@ -900,10 +900,14 @@
if ( self->timeStep % self->dumpEvery == 0 )
AbstractContext_Dump( self );
}
- if ( self->checkpointEvery ) {
- if ( self->timeStep % self->checkpointEvery == 0 )
- AbstractContext_Save( self );
- }
+ if( self->timeStep == self->maxTimeSteps )
+ AbstractContext_Save( self );
+ else {
+ if ( self->checkpointEvery ) {
+ if ( self->timeStep % self->checkpointEvery == 0 )
+ AbstractContext_Save( self );
+ }
+ }
if (self->maxTimeSteps && (self->timeStepSinceJobRestart >= self->maxTimeSteps)) break;
if (self->finalTimeStep && (self->timeStep >= self->finalTimeStep)) break;
More information about the CIG-COMMITS
mailing list