[cig-commits] r19493 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio

brad at geodynamics.org brad at geodynamics.org
Fri Jan 27 08:04:59 PST 2012


Author: brad
Date: 2012-01-27 08:04:59 -0800 (Fri, 27 Jan 2012)
New Revision: 19493

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc
Log:
Fixed determination of cell depth in output (use old test case for depth) but enforce consistency across processors.

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-01-27 11:16:36 UTC (rev 19492)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-01-27 16:04:59 UTC (rev 19493)
@@ -146,7 +146,7 @@
     CHECK_PETSC_ERROR(err);
 
     // Account for censored cells
-    int cellDepth = sieveMesh->depth();
+    int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
     err = MPI_Allreduce(&cellDepth, &cellDepth, 1, MPI_INT, MPI_MAX, 
 			sieveMesh->comm());CHECK_PETSC_ERROR(err);
     const int depth = (0 == label) ? cellDepth : labelId;
@@ -379,7 +379,7 @@
     const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = 
       field.mesh().sieveMesh();
     assert(!sieveMesh.isNull());
-    int cellDepth = sieveMesh->depth();
+    int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
     err = MPI_Allreduce(&cellDepth, &cellDepth, 1, MPI_INT, MPI_MAX, 
 			sieveMesh->comm());CHECK_PETSC_ERROR(err);
     const int depth = (0 == label) ? cellDepth : labelId;

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-01-27 11:16:36 UTC (rev 19492)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-01-27 16:04:59 UTC (rev 19493)
@@ -159,7 +159,7 @@
     // Write cells
 
     // Account for censored cells
-    int cellDepth = sieveMesh->depth();
+    int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
     err = MPI_Allreduce(&cellDepth, &cellDepth, 1, MPI_INT, MPI_MAX, 
 			sieveMesh->comm());CHECK_PETSC_ERROR(err);
     const int depth = (0 == label) ? cellDepth : labelId;
@@ -440,7 +440,7 @@
     const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = 
       field.mesh().sieveMesh();
     assert(!sieveMesh.isNull());
-    int cellDepth = sieveMesh->depth();
+    int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
     err = MPI_Allreduce(&cellDepth, &cellDepth, 1, MPI_INT, MPI_MAX, 
 			sieveMesh->comm());CHECK_PETSC_ERROR(err);
     const int depth = (0 == label) ? cellDepth : labelId;

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc	2012-01-27 11:16:36 UTC (rev 19492)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/meshio/DataWriterVTK.cc	2012-01-27 16:04:59 UTC (rev 19493)
@@ -255,7 +255,7 @@
     //   Cannot just use mesh->depth() because boundaries report the wrong thing
     const ALE::Obj<SieveMesh>& sieveMesh = field.mesh().sieveMesh();
     assert(!sieveMesh.isNull());
-    int cellDepth = sieveMesh->depth();
+    int cellDepth = (sieveMesh->depth() == -1) ? -1 : 1;
     err = MPI_Allreduce(&cellDepth, &cellDepth, 1, MPI_INT, MPI_MAX, 
 			sieveMesh->comm());CHECK_PETSC_ERROR(err);
     const int depth = (!label) ? cellDepth : labelId;



More information about the CIG-COMMITS mailing list