[cig-commits] r22196 - short/3D/PyLith/trunk/libsrc/pylith/topology
brad at geodynamics.org
brad at geodynamics.org
Sun Jun 9 12:47:09 PDT 2013
Author: brad
Date: 2013-06-09 12:47:09 -0700 (Sun, 09 Jun 2013)
New Revision: 22196
Modified:
short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc
Log:
Remove overly agressive asserts.
Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc 2013-06-09 15:56:29 UTC (rev 22195)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/CoordsVisitor.icc 2013-06-09 19:47:09 UTC (rev 22196)
@@ -53,7 +53,7 @@
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);assert(_localArray);
+ err = VecGetArray(_localVec, &_localArray);PYLITH_CHECK_ERROR(err);
} // initialize
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc 2013-06-09 15:56:29 UTC (rev 22195)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/VisitorSubMesh.icc 2013-06-09 19:47:09 UTC (rev 22196)
@@ -57,7 +57,7 @@
PetscErrorCode err;
PetscSection section = _field.petscSection();assert(section);
- const PetscIS subpointIS = submeshIS.indexSet();assert(subpointIS);
+ const PetscIS subpointIS = submeshIS.indexSet();
err = PetscSectionCreateSubmeshSection(section, subpointIS, &_section);PYLITH_CHECK_ERROR(err);assert(_section);
} // initialize
@@ -257,13 +257,17 @@
inline
pylith::topology::SubMeshIS::SubMeshIS(const Mesh& submesh) :
_submesh(submesh),
- _indexSet(NULL)
+ _indexSet(NULL),
+ _size(0),
+ _points(0)
{ // constructor
PetscDM dmMesh = submesh.dmMesh();assert(dmMesh);
PetscErrorCode err;
err = DMPlexCreateSubpointIS(dmMesh, &_indexSet);PYLITH_CHECK_ERROR(err);
- err = ISGetSize(_indexSet, &_size);PYLITH_CHECK_ERROR(err);assert(_size >= 0);
- err = ISGetIndices(_indexSet, &_points);PYLITH_CHECK_ERROR(err);
+ if (_indexSet) {
+ err = ISGetSize(_indexSet, &_size);PYLITH_CHECK_ERROR(err);assert(_size >= 0);
+ err = ISGetIndices(_indexSet, &_points);PYLITH_CHECK_ERROR(err);
+ } // if
} // constructor
// ----------------------------------------------------------------------
More information about the CIG-COMMITS
mailing list