[cig-commits] r11301 - short/3D/PyLith/trunk/libsrc/meshio

brad at geodynamics.org brad at geodynamics.org
Sat Mar 1 21:52:24 PST 2008


Author: brad
Date: 2008-03-01 21:52:24 -0800 (Sat, 01 Mar 2008)
New Revision: 11301

Modified:
   short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
Log:
Fixed compilation errors. Still need to update writeField for VTK viewer for subset of cells.

Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc	2008-03-02 05:25:22 UTC (rev 11300)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc	2008-03-02 05:52:24 UTC (rev 11301)
@@ -159,8 +159,10 @@
     assert(fiberDim > 0);
     const int enforceDim = (fieldType != VECTOR_FIELD) ? fiberDim : 3;
 
+    PetscErrorCode err = 0;
+
     if (!_wroteVertexHeader) {
-      PetscErrorCode err = PetscViewerASCIIPrintf(_viewer, "POINT_DATA %d\n", 
+      err = PetscViewerASCIIPrintf(_viewer, "POINT_DATA %d\n", 
 						  numbering->getGlobalSize());
       if (err)
 	throw std::runtime_error("Could not write VTK point data header.");
@@ -214,8 +216,10 @@
       field->getFiberDimension(*mesh->getLabelStratum(labelName, depth)->begin());
     const int enforceDim = (fieldType != VECTOR_FIELD) ? fiberDim : 3;
 
+    PetscErrorCode err = 0;
+
     if (!_wroteCellHeader) {
-      PetscErrorCode err = PetscViewerASCIIPrintf(_viewer, "CELL_DATA %d\n", 
+      err = PetscViewerASCIIPrintf(_viewer, "CELL_DATA %d\n", 
 						  numbering->getGlobalSize());
       if (err)
 	throw std::runtime_error("Could not write VTK point data header.");
@@ -224,11 +228,12 @@
 
     if (0 == label)
       err = VTKViewer::writeField(field, name, fiberDim, numbering, _viewer, 
-			    enforceDim);
+				  enforceDim);
     else {
       const std::string labelName = 
 	(mesh->hasLabel("censored depth")) ? "censored depth" : "depth";
-      err = VTKViewer::writeField(mesh, label, labelId, labelName, 0, _viewer);      
+      err = VTKViewer::writeField(field, name, fiberDim, numbering, _viewer, 
+				  enforceDim);      
     } // if/else
     if (err)
       throw std::runtime_error("Coult not write cell field.");



More information about the cig-commits mailing list