[cig-commits] r14277 - in long/3D/SNAC/trunk/Snac/plugins: hillSlope restarter
cstark at geodynamics.org
cstark at geodynamics.org
Mon Mar 9 18:57:29 PDT 2009
Author: cstark
Date: 2009-03-09 18:57:29 -0700 (Mon, 09 Mar 2009)
New Revision: 14277
Modified:
long/3D/SNAC/trunk/Snac/plugins/hillSlope/InitialConditions.c
long/3D/SNAC/trunk/Snac/plugins/hillSlope/Track.c
long/3D/SNAC/trunk/Snac/plugins/restarter/Register.c
Log:
Retreat from some changes to restarter Register.c and hillSlope Track.c.
Setting timeStep and maxTimeSteps to true, shifted restart values doesn't work.
Also made some cosmetic changes to debug printing.
Modified: long/3D/SNAC/trunk/Snac/plugins/hillSlope/InitialConditions.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/hillSlope/InitialConditions.c 2009-03-10 01:56:53 UTC (rev 14276)
+++ long/3D/SNAC/trunk/Snac/plugins/hillSlope/InitialConditions.c 2009-03-10 01:57:29 UTC (rev 14277)
@@ -65,7 +65,7 @@
#endif
-#define DEBUG
+//#define DEBUG
void _SnacHillSlope_InitialConditions( void* _context, void* data ) {
Snac_Context *context = (Snac_Context*)_context;
Modified: long/3D/SNAC/trunk/Snac/plugins/hillSlope/Track.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/hillSlope/Track.c 2009-03-10 01:56:53 UTC (rev 14276)
+++ long/3D/SNAC/trunk/Snac/plugins/hillSlope/Track.c 2009-03-10 01:57:29 UTC (rev 14277)
@@ -45,8 +45,8 @@
#endif
//#define DEBUG
-//#define DEBUG2
-//#define DEBUG3
+#define DEBUG2
+#define DEBUG3
#define DEBUG4
void SnacHillSlope_Track( void* _context ) {
@@ -257,24 +257,32 @@
* Have we reached elastic eqm?
*/
if(contextExt->consensusElasticStabilizedFlag) {
+#ifdef DEBUG4
+ fprintf(stderr,"r=%d, ts=%d/%d: Global elastic eqm has been reached\n",
+ context->rank, context->timeStep, context->maxTimeSteps);
+#endif
if(contextExt->solveElasticEqmOnlyFlag) {
/*
* If solving elastic eqm only, stop the simulation by bringing forward the max time steps to this step.
* In addition, force a dump of this model state by changing dump freq to 1.
*/
dumpEvery=1;
- maxTimeSteps=(!restart ? context->timeStep+1 : context->timeStep- context->restartStep+1);
+ maxTimeSteps=(!restart ? context->timeStep+1 : context->timeStep-context->restartStep+1);
doneTrackingFlag=TRUE;
+#ifdef DEBUG4
+ fprintf(stderr,"r=%d, ts=%d/%d: Shifting to elastoplastic simulation at step=%d\n",context->rank, context->timeStep,
+ context->maxTimeSteps, maxTimeSteps);
+#endif
} else {
/*
* Otherwise, change dump frequency to record plastic deformation
*/
dumpEvery=contextExt->plasticDeformationDumpFreq;
- }
#ifdef DEBUG4
- fprintf(stderr,"r=%d, ts=%d/%d: Stopping run at t=%d\n",context->rank, context->timeStep,
+ fprintf(stderr,"r=%d, ts=%d/%d: Terminating simulation at step=%d\n",context->rank, context->timeStep,
context->maxTimeSteps, maxTimeSteps);
#endif
+ }
}
/*
* Ensure that all threads are in agreement
Modified: long/3D/SNAC/trunk/Snac/plugins/restarter/Register.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/restarter/Register.c 2009-03-10 01:56:53 UTC (rev 14276)
+++ long/3D/SNAC/trunk/Snac/plugins/restarter/Register.c 2009-03-10 01:57:29 UTC (rev 14277)
@@ -93,9 +93,11 @@
/*
* Shift the time step range to start from the restart time step
+ * - this doesn't seem to work since the changes don't appear to propagate into StGermain
+ * far enough to cause the maxTimeSteps to stop the simulation when desired
*/
- context->timeStep += context->restartStep;
- context->maxTimeSteps += context->restartStep;
+/* context->timeStep += context->restartStep; */
+/* context->maxTimeSteps += context->restartStep; */
EntryPoint_InsertBefore(
Context_GetEntryPoint( context, AbstractContext_EP_Initialise ),
More information about the CIG-COMMITS
mailing list