[cig-commits] r15328 - short/3D/PyLith/trunk/playpen/postproc
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Jun 17 15:34:26 PDT 2009
Author: willic3
Date: 2009-06-17 15:34:24 -0700 (Wed, 17 Jun 2009)
New Revision: 15328
Modified:
short/3D/PyLith/trunk/playpen/postproc/vtkdiff.py
Log:
Used new tvtk method for creating output files (XML format).
Old method no longer seems to work correctly.
Modified: short/3D/PyLith/trunk/playpen/postproc/vtkdiff.py
===================================================================
--- short/3D/PyLith/trunk/playpen/postproc/vtkdiff.py 2009-06-17 22:12:06 UTC (rev 15327)
+++ short/3D/PyLith/trunk/playpen/postproc/vtkdiff.py 2009-06-17 22:34:24 UTC (rev 15328)
@@ -188,7 +188,8 @@
# We assume that differences correspond to midpoint of the 2 time steps.
timeStampOut = int(0.5 * (timeStamp1 + timeStamp2))
timeStampOutString = repr(timeStampOut).rjust(self.timeStampWidth, '0')
- outputFileName = self.vtkOutputRoot + "_t" + timeStampOutString + ".vtk"
+ #outputFileName = self.vtkOutputRoot + "_t" + timeStampOutString + ".vtk"
+ outputFileName = self.vtkOutputRoot + "_t" + timeStampOutString + ".vtu"
vtkOutputFile = os.path.join(self.vtkOutputDir, outputFileName)
self._diffFiles(self.vtkInputList[fileInd],
self.vtkInputList[fileInd + 1],
@@ -290,7 +291,8 @@
mesh.cell_data.add_array(arrayOut)
# Write results to VTK file
- w = tvtk.UnstructuredGridWriter(file_name=vtkFileOut, input=mesh)
+ #w = tvtk.UnstructuredGridWriter(file_name=vtkFileOut, input=mesh)
+ w = tvtk.XMLDataSetWriter(file_name=vtkFileOut, input=mesh)
w.write()
return
More information about the CIG-COMMITS
mailing list