[cig-commits] [commit] baagaard/feature-output-station-names, baagaard/feature-progress-monitor, baagaard/fix-faults-intersect, master: Check to make sure label for fault edge is defined. (3b15793)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 15:44:19 PST 2014
Repository : https://github.com/geodynamics/pylith
On branches: baagaard/feature-output-station-names,baagaard/feature-progress-monitor,baagaard/fix-faults-intersect,master
Link : https://github.com/geodynamics/pylith/compare/f33c75b19fd60eedb2a3405db76a1fee333bb1d7...5b6d812b1612809fea3bd331c4e5af98c25a536a
>---------------------------------------------------------------
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