[cig-commits] r19932 - short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio

brad at geodynamics.org brad at geodynamics.org
Tue Apr 10 11:44:51 PDT 2012


Author: brad
Date: 2012-04-10 11:44:51 -0700 (Tue, 10 Apr 2012)
New Revision: 19932

Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputManager.py
Log:
Merge from trunk.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputManager.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputManager.py	2012-04-10 18:42:13 UTC (rev 19931)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputManager.py	2012-04-10 18:44:51 UTC (rev 19932)
@@ -176,10 +176,14 @@
     logEvent = "%sopen" % self._loggingPrefix
     self._eventLogger.eventBegin(logEvent)    
 
-    nsteps = self._estimateNumSteps(totalTime, numTimeSteps)
+    if len(self.vertexInfoFields) > 0 or \
+          len(self.cellInfoFields) > 0 or \
+          len(self.vertexDataFields) > 0 or \
+          len(self.cellDataFields) > 0:
+      nsteps = self._estimateNumSteps(totalTime, numTimeSteps)
 
-    (mesh, label, labelId) = self.dataProvider.getDataMesh()
-    self._open(mesh, nsteps, label, labelId)
+      (mesh, label, labelId) = self.dataProvider.getDataMesh()
+      self._open(mesh, nsteps, label, labelId)
 
     self._eventLogger.eventEnd(logEvent)    
     return
@@ -192,7 +196,11 @@
     logEvent = "%sclose" % self._loggingPrefix
     self._eventLogger.eventBegin(logEvent)    
 
-    self._close()
+    if len(self.vertexInfoFields) > 0 or \
+          len(self.cellInfoFields) > 0 or \
+          len(self.vertexDataFields) > 0 or \
+          len(self.cellDataFields) > 0:
+      self._close()
 
     self._eventLogger.eventEnd(logEvent)    
     return



More information about the CIG-COMMITS mailing list