[cig-commits] r20692 - short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults

brad at geodynamics.org brad at geodynamics.org
Wed Sep 5 16:38:52 PDT 2012


Author: brad
Date: 2012-09-05 16:38:52 -0700 (Wed, 05 Sep 2012)
New Revision: 20692

Modified:
   short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/TopologyOps.cc
Log:
Changed assert in classifying cells (adjusting topology) to std::logic_error.

Modified: short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/TopologyOps.cc
===================================================================
--- short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/TopologyOps.cc	2012-09-05 19:25:29 UTC (rev 20691)
+++ short/3D/PyLith/branches/v1.7-stable/libsrc/pylith/faults/TopologyOps.cc	2012-09-05 23:38:52 UTC (rev 20692)
@@ -116,7 +116,12 @@
     }
     assert(classifySize < vReplaceCells.size() + vNoReplaceCells.size());
     classifySize = vReplaceCells.size() + vNoReplaceCells.size();
-    assert(classifySize <= classifyTotal);
+    if (classifySize > classifyTotal) {
+      std::ostringstream msg;
+      msg << "Error classifying cells during creation of cohesive cells.\n"
+	  << "  classifySize: " << classifySize << ", classifyTotal: " << classifyTotal;
+      throw std::logic_error(msg.str());
+    } // if
   }
   replaceCells.insert(vReplaceCells.begin(), vReplaceCells.end());
   // More checking



More information about the CIG-COMMITS mailing list