[cig-commits] [commit] baagaard/fix-faults-intersect: Check to make sure label for fault edge is defined. (3b15793)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jun 30 11:20:39 PDT 2014


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

On branch  : baagaard/fix-faults-intersect
Link       : https://github.com/geodynamics/pylith/compare/6063f9be24720cb6e6c830bf0ec46c151f839c6b...a606bd84c356f012fc13ba29c62cb4de13d8efc0

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

commit 3b15793c183c06b66e2e61b0239e6d4f11adcf14
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Mon Jun 30 11:08:34 2014 -0700

    Check to make sure label for fault edge is defined.


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

3b15793c183c06b66e2e61b0239e6d4f11adcf14
 libsrc/pylith/faults/FaultCohesive.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libsrc/pylith/faults/FaultCohesive.cc b/libsrc/pylith/faults/FaultCohesive.cc
index 4f0540b..6432b70 100644
--- a/libsrc/pylith/faults/FaultCohesive.cc
+++ b/libsrc/pylith/faults/FaultCohesive.cc
@@ -147,7 +147,14 @@ pylith::faults::FaultCohesive::adjustTopology(topology::Mesh* const mesh,
       CohesiveTopology::createFault(&faultMesh, *mesh, groupField);
       PetscDMLabel faultBdLabel = NULL;
 
-      if (edge()) {err = DMPlexGetLabel(dmMesh, edge(), &faultBdLabel);PYLITH_CHECK_ERROR(err);}
+      if (strlen(edge()) > 0) {
+	err = DMPlexGetLabel(dmMesh, edge(), &faultBdLabel);PYLITH_CHECK_ERROR(err);
+	if (!faultBdLabel) {
+	  std::ostringstream msg;
+	  msg << "Could not find nodeset/pset '" << edge() << "' marking buried edges for fault '" << label() << "'.";
+	  throw std::runtime_error(msg.str());
+	} // if
+      } // if
       CohesiveTopology::create(mesh, faultMesh, faultBdLabel, id(), *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
     } else {
       const int faultDim = 2;



More information about the CIG-COMMITS mailing list