[cig-commits] commit: Handle case where v=0 in UpdateDt, such as before any solves in
Mercurial
hg at geodynamics.org
Sun Apr 29 05:41:29 PDT 2012
changeset: 832:050cc521feb0
user: Walter Landry <wlandry at caltech.edu>
date: Sun Apr 29 05:39:48 2012 -0700
files: SLE/ProvidedSystems/StokesFlow/src/UpdateDt.cxx
description:
Handle case where v=0 in UpdateDt, such as before any solves in
buoyancy driven flow.
diff -r 7283c8c453ab -r 050cc521feb0 SLE/ProvidedSystems/StokesFlow/src/UpdateDt.cxx
--- a/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.cxx Sun Apr 29 05:38:43 2012 -0700
+++ b/SLE/ProvidedSystems/StokesFlow/src/UpdateDt.cxx Sun Apr 29 05:39:48 2012 -0700
@@ -73,7 +73,10 @@ double Stokes_SLE_UpdateDt( Stokes_SLE*
FeVariable_GetMinimumSeparation( velFeVar, &minSeparation, minSeparationEachDim );
factor=Dictionary_GetDouble_WithDefault(dictionary,"dtFactor",1.0);
- localDt = factor*0.5 * minSeparation / velMax;
+ if(velMax==0)
+ localDt=0;
+ else
+ localDt = factor*0.5 * minSeparation / velMax;
MPI_Allreduce( &localDt, &globalDt, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD );
}
More information about the CIG-COMMITS
mailing list