[cig-commits] r11275 - in long/3D/Gale/trunk: . src/StgFEM/SLE/ProvidedSystems/StokesFlow/src
walter at geodynamics.org
walter at geodynamics.org
Wed Feb 27 13:41:10 PST 2008
Author: walter
Date: 2008-02-27 13:41:10 -0800 (Wed, 27 Feb 2008)
New Revision: 11275
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c
Log:
r2012 at earth: boo | 2008-02-27 13:40:52 -0800
Allow you to specify the timestep manually
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2010
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2012
Modified: long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c 2008-02-27 21:14:37 UTC (rev 11274)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.c 2008-02-27 21:41:10 UTC (rev 11275)
@@ -60,17 +60,21 @@
Dictionary* dictionary = context->dictionary;
double factor;
- velFeVar = self->uSolnVec->feVariable;
- velMax = FieldVariable_GetMaxGlobalFieldMagnitude( velFeVar );
-
- Journal_DPrintf( self->debug, "In func %s for SLE '%s' - Maximum global magnitude for field '%s' = %g.\n",
- __func__, self->name, velFeVar->name, velMax );
-
- FeVariable_GetMinimumSeparation( velFeVar, &minSeparation, minSeparationEachDim );
+ globalDt=Dictionary_GetDouble_WithDefault(dictionary,"dt",0.0);
- factor=Dictionary_GetDouble_WithDefault(dictionary,"dtFactor",1.0);
- localDt = factor*0.5 * minSeparation / velMax;
- MPI_Allreduce( &localDt, &globalDt, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD );
-
+ if(globalDt==0.0)
+ {
+ velFeVar = self->uSolnVec->feVariable;
+ velMax = FieldVariable_GetMaxGlobalFieldMagnitude( velFeVar );
+
+ Journal_DPrintf( self->debug, "In func %s for SLE '%s' - Maximum global magnitude for field '%s' = %g.\n",
+ __func__, self->name, velFeVar->name, velMax );
+
+ FeVariable_GetMinimumSeparation( velFeVar, &minSeparation, minSeparationEachDim );
+
+ factor=Dictionary_GetDouble_WithDefault(dictionary,"dtFactor",1.0);
+ localDt = factor*0.5 * minSeparation / velMax;
+ MPI_Allreduce( &localDt, &globalDt, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD );
+ }
return globalDt;
}
More information about the cig-commits
mailing list