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

knepley at geodynamics.org knepley at geodynamics.org
Wed Mar 26 17:27:30 PDT 2008


Author: knepley
Date: 2008-03-26 17:27:30 -0700 (Wed, 26 Mar 2008)
New Revision: 11602

Modified:
   short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
Log:
Fixed bug with mesh depth determination when creating Numberings


Modified: short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc	2008-03-26 23:15:30 UTC (rev 11601)
+++ short/3D/PyLith/trunk/libsrc/meshio/DataWriterVTK.cc	2008-03-27 00:27:30 UTC (rev 11602)
@@ -222,7 +222,9 @@
 	      << std::endl;
 
     // Correctly handle boundary and fault meshes
-    const int depth = (0 == label) ? mesh->depth() : labelId;
+    //   Cannot just use mesh->depth() because boundaries report the wrong thing
+    const int cellDepth = (mesh->depth() == -1) ? -1 : 1;
+    const int depth = (0 == label) ? cellDepth : labelId;
     const std::string labelName = (0 == label) ?
       ((mesh->hasLabel("censored depth")) ? "censored depth" : "depth") : label;
     const ALE::Obj<Mesh::numbering_type>& numbering = 

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2008-03-26 23:15:30 UTC (rev 11601)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2008-03-27 00:27:30 UTC (rev 11602)
@@ -362,7 +362,7 @@
   if ((*_mesh)->height(firstPoint) == 0) {
     *type = CELL;
     numbering = (*_mesh)->getFactory()->getNumbering(*_mesh, 
-						     (*_mesh)->depth());
+                                                    (*_mesh)->depth());
   } else {
     *type = VERTEX;
     numbering = (*_mesh)->getFactory()->getNumbering(*_mesh, 0);



More information about the cig-commits mailing list