[cig-commits] [commit] baagaard/fix-faults-intersect: Improve error message. (4ec7b47)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 15:47:36 PST 2014


Repository : https://github.com/geodynamics/pylith

On branch  : baagaard/fix-faults-intersect
Link       : https://github.com/geodynamics/pylith/compare/f33c75b19fd60eedb2a3405db76a1fee333bb1d7...5b6d812b1612809fea3bd331c4e5af98c25a536a

>---------------------------------------------------------------

commit 4ec7b47b0d76f2707c435eeed5bc4c7e1cc20f4d
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Fri Oct 31 12:02:10 2014 -0700

    Improve error message.


>---------------------------------------------------------------

4ec7b47b0d76f2707c435eeed5bc4c7e1cc20f4d
 libsrc/pylith/faults/FaultCohesive.cc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libsrc/pylith/faults/FaultCohesive.cc b/libsrc/pylith/faults/FaultCohesive.cc
index 01bb0db..ee96b33 100644
--- a/libsrc/pylith/faults/FaultCohesive.cc
+++ b/libsrc/pylith/faults/FaultCohesive.cc
@@ -167,8 +167,23 @@ pylith::faults::FaultCohesive::adjustTopology(topology::Mesh* const mesh,
     topology::MeshOps::checkTopology(faultMesh);
 
   } catch (const std::exception& err) {
+    PetscInt cMax, fMax, eMax, vMax;
+    PetscInt vStart, vEnd, cStart, cEnd, eStart, eEnd, fStart, fEnd;
+    PetscErrorCode ierr = 0;
+    PetscDM dmMesh = mesh->dmMesh();assert(dmMesh);
+    ierr = DMPlexGetDepthStratum(dmMesh, 0, &vStart, &vEnd);PYLITH_CHECK_ERROR(ierr);
+    ierr = DMPlexGetDepthStratum(dmMesh, 1, &eStart, &eEnd);PYLITH_CHECK_ERROR(ierr);
+    ierr = DMPlexGetDepthStratum(dmMesh, 2, &fStart, &fEnd);PYLITH_CHECK_ERROR(ierr);
+    ierr = DMPlexGetDepthStratum(dmMesh, 3, &cStart, &cEnd);PYLITH_CHECK_ERROR(ierr);
+    ierr = DMPlexGetHybridBounds(dmMesh, &cMax, &fMax, &eMax, &vMax);PYLITH_CHECK_ERROR(ierr);
+
     std::ostringstream msg;
     msg << "Error occurred while adjusting topology to create cohesive cells for fault '" << label() << "'.\n"
+	<< "Mesh information:\n"
+	<< "VERTICES vStart: " << vStart << ", vEnd: " << vEnd << ", vMax: " << vMax << "\n"
+	<< "EDGES eStart: " << eStart << ", eEnd: " << eEnd << ", eMax: " << eMax << "\n"
+	<< "FACES fStart: " << fStart << ", fEnd: " << fEnd << ", fMax: " << fMax << "\n"
+	<< "CELLS cStart: " << cStart << ", cEnd: " << cEnd << ", cMax: " << cMax << "\n\n"
 	<< err.what();
     throw std::runtime_error(msg.str());
   }



More information about the CIG-COMMITS mailing list