[cig-commits] r9150 - short/3D/PyLith/trunk/libsrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Mon Jan 28 13:06:00 PST 2008
Author: brad
Date: 2008-01-28 13:06:00 -0800 (Mon, 28 Jan 2008)
New Revision: 9150
Modified:
short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
Log:
Removed time stamp on values in VTK files to permit automated animation of fields.
Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2008-01-28 21:03:52 UTC (rev 9149)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc 2008-01-28 21:06:00 UTC (rev 9150)
@@ -129,18 +129,11 @@
assert(0 != name);
try {
- std::ostringstream buffer;
- buffer.str("");
- char timestamp[256];
- sprintf(timestamp, _timeFormat.c_str(), t);
- buffer << name << "_t" << timestamp;
-
const ALE::Obj<Mesh::label_sequence>& vertices = mesh->depthStratum(0);
const int fiberDim = (fieldType != VECTOR_FIELD) ?
field->getFiberDimension(*vertices->begin()) : 3;
- PetscErrorCode err = SectionView_Sieve_Ascii(mesh, field,
- buffer.str().c_str(),
+ PetscErrorCode err = SectionView_Sieve_Ascii(mesh, field, name,
_viewer, fiberDim);
if (err)
throw std::runtime_error("Could not write vertex data.");
@@ -172,19 +165,13 @@
try {
PetscErrorCode err = 0;
- std::ostringstream buffer;
- buffer.str("");
- char timestamp[256];
- sprintf(timestamp, _timeFormat.c_str(), t);
- buffer << name << "_t" << timestamp;
-
err = PetscViewerPushFormat(_viewer, PETSC_VIEWER_ASCII_VTK_CELL);
// Get fiber dimension of first cell
const ALE::Obj<Mesh::label_sequence>& cells = mesh->heightStratum(0);
const int fiberDim = (fieldType != VECTOR_FIELD) ?
field->getFiberDimension(*cells->begin()) : 3;
- err = SectionView_Sieve_Ascii(mesh, field, buffer.str().c_str(),
+ err = SectionView_Sieve_Ascii(mesh, field, name,
_viewer, fiberDim);
if (err)
throw std::runtime_error("Could not write cell data.");
More information about the cig-commits
mailing list