[cig-commits] [commit] knepley/fix-faults-parallel: Fix for settings constraints for fault fields in parallel. (42a165c)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed May 28 10:18:46 PDT 2014
Repository : https://github.com/geodynamics/pylith
On branch : knepley/fix-faults-parallel
Link : https://github.com/geodynamics/pylith/compare/0f8af6e7a83ed15f72a991e2a2f8b66fd29f9c12...cdddc3055566e8ef7ff029fc6fab3ccb89daa25b
>---------------------------------------------------------------
commit 42a165cd642cdd8be349abc4906dc5ecb8214dab
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Wed May 28 10:13:09 2014 -0700
Fix for settings constraints for fault fields in parallel.
Need to account for processes without vertices when setting constraints
for fault fields.
>---------------------------------------------------------------
42a165cd642cdd8be349abc4906dc5ecb8214dab
libsrc/pylith/faults/FaultCohesiveLagrange.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libsrc/pylith/faults/FaultCohesiveLagrange.cc b/libsrc/pylith/faults/FaultCohesiveLagrange.cc
index 3d6ee76..9dac44a 100644
--- a/libsrc/pylith/faults/FaultCohesiveLagrange.cc
+++ b/libsrc/pylith/faults/FaultCohesiveLagrange.cc
@@ -120,7 +120,7 @@ pylith::faults::FaultCohesiveLagrange::initialize(const topology::Mesh& mesh,
_fields->add("relative disp", "relative_disp");
topology::Field& dispRel = _fields->get("relative disp");
dispRel.newSection(topology::FieldBase::VERTICES_FIELD, spaceDim); // :TODO: Update?
- if (strlen(edge()) > 0) {
+ if (strlen(edge()) > 0 && numPoints > 0) {
PetscDMLabel label = NULL;
PetscIS vertexIS = NULL;
const PetscInt* vertices = NULL;
@@ -139,9 +139,9 @@ pylith::faults::FaultCohesiveLagrange::initialize(const topology::Mesh& mesh,
} // for
err = ISRestoreIndices(vertexIS, &vertices);PYLITH_CHECK_ERROR(err);
err = ISDestroy(&vertexIS);PYLITH_CHECK_ERROR(err);
- }
+ } // if
dispRel.allocate();
- if (strlen(edge()) > 0) {
+ if (strlen(edge()) > 0 && numPoints > 0) {
PetscDMLabel label = NULL;
PetscIS vertexIS = NULL;
const PetscInt *vertices = NULL;
More information about the CIG-COMMITS
mailing list