[cig-commits] r8640 - short/3D/PyLith/trunk/libsrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Wed Dec 12 20:07:44 PST 2007
Author: brad
Date: 2007-12-12 20:07:43 -0800 (Wed, 12 Dec 2007)
New Revision: 8640
Modified:
short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc
Log:
Removed decimal point from time stamp to allow VTK readers to recognize time histories in suites of VTK files.
Modified: short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc 2007-12-12 20:41:06 UTC (rev 8639)
+++ short/3D/PyLith/trunk/libsrc/meshio/SolutionIOVTK.cc 2007-12-13 04:07:43 UTC (rev 8640)
@@ -115,8 +115,13 @@
std::ostringstream buffer;
const int indexExt = _filename.find(".vtk");
- char timestamp[256];
- sprintf(timestamp, _timeFormat.c_str(), t);
+ char sbuffer[256];
+ sprintf(sbuffer, _timeFormat.c_str(), t);
+ std::string timestamp(sbuffer);
+
+ const int pos = timestamp.find(".");
+ if (pos != timestamp.length())
+ timestamp.erase(pos, 1);
buffer
<< std::string(_filename, 0, indexExt) << "_t" << timestamp << ".vtk";
More information about the cig-commits
mailing list