[cig-commits] r14919 - short/3D/PyLith/trunk/pylith/meshio
brad at geodynamics.org
brad at geodynamics.org
Thu May 7 15:10:19 PDT 2009
Author: brad
Date: 2009-05-07 15:10:19 -0700 (Thu, 07 May 2009)
New Revision: 14919
Modified:
short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
Log:
Fixed nondimensionalizing totalTime arg in OutputManager.
Modified: short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputManager.py 2009-05-07 20:04:50 UTC (rev 14918)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputManager.py 2009-05-07 22:10:19 UTC (rev 14919)
@@ -131,6 +131,7 @@
self._logger.eventBegin(logEvent)
# Nondimensionalize time step
+ self.normalizer = normalizer
timeScale = normalizer.timeScale()
self.dtN = normalizer.nondimensionalize(self.dt, timeScale)
@@ -157,7 +158,9 @@
if numTimeSteps > 0 and self.outputFreq == "skip" and self.skip > 0:
nsteps = int(numTimeSteps / (1+self.skip))
elif numTimeSteps > 0 and self.outputFreq == "time_step":
- nsteps = int(1 + totalTime / self.dtN)
+ timeScale = self.normalizer.timeScale()
+ totalTimeN = self.normalizer.nondimensionalize(totalTime, timeScale)
+ nsteps = int(1 + totalTimeN / self.dtN)
(mesh, label, labelId) = self.dataProvider.getDataMesh()
self._open(mesh, nsteps, label, labelId)
More information about the CIG-COMMITS
mailing list