[cig-commits] r22198 - short/3D/PyLith/trunk/libsrc/pylith/topology

knepley at geodynamics.org knepley at geodynamics.org
Sun Jun 9 13:34:25 PDT 2013


Author: knepley
Date: 2013-06-09 13:34:25 -0700 (Sun, 09 Jun 2013)
New Revision: 22198

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
Log:
Fixed overaggessive check

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc	2013-06-09 20:15:32 UTC (rev 22197)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc	2013-06-09 20:34:25 UTC (rev 22198)
@@ -50,10 +50,12 @@
 pylith::topology::CoordsVisitor::initialize(void)
 { // initialize
   assert(_dm);
+  PetscInt       size;
   PetscErrorCode err;
   err = DMPlexGetCoordinateSection(_dm, &_section);PYLITH_CHECK_ERROR(err);assert(_section);
   err = DMGetCoordinatesLocal(_dm, &_localVec);PYLITH_CHECK_ERROR(err);assert(_localVec);
-  err = VecGetArray(_localVec, &_localArray);PYLITH_CHECK_ERROR(err);
+  err = VecGetLocalSize(_localVec, &size);PYLITH_CHECK_ERROR(err);
+  err = VecGetArray(_localVec, &_localArray);PYLITH_CHECK_ERROR(err);assert(!size || _localArray);
 } // initialize
 
 // ----------------------------------------------------------------------



More information about the CIG-COMMITS mailing list