[cig-commits] [commit] knepley/upgrade-petsc-interface: Skip fault halo cells in checking material ids (not assigned label). (3661713)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Mar 5 17:03:23 PST 2014


Repository : ssh://geoshell/pylith

On branch  : knepley/upgrade-petsc-interface
Link       : https://github.com/geodynamics/pylith/compare/37e2098396275cfd63fcf1498024739b6fac6398...687c383d3af9cc4c33c72ebdfe5dc3c70ec327a8

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

commit 3661713158d9b1151141d24d4049693f5d746353
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Wed Mar 5 10:13:57 2014 -0800

    Skip fault halo cells in checking material ids (not assigned label).
    
    :KLUDGE: Update this when fault halo is becomes part of fault.


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

3661713158d9b1151141d24d4049693f5d746353
 libsrc/pylith/topology/MeshOps.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libsrc/pylith/topology/MeshOps.cc b/libsrc/pylith/topology/MeshOps.cc
index 4d55c57..dc2eca0 100644
--- a/libsrc/pylith/topology/MeshOps.cc
+++ b/libsrc/pylith/topology/MeshOps.cc
@@ -137,6 +137,12 @@ pylith::topology::MeshOps::checkMaterialIds(const Mesh& mesh,
     PetscInt matId;
 
     err = DMLabelGetValue(materialsLabel, c, &matId);PYLITH_CHECK_ERROR(err);
+    if (matId < 0) {
+      // :KLUDGE: Skip cells that are probably hybrid cells in halo
+      // around fault that we currently ignore when looping over
+      // materials (including cohesive cells).
+      continue;
+    } // if
     const int *result = std::find(matBegin, matEnd, matId);
     if (result == matEnd) {
       std::ostringstream msg;



More information about the CIG-COMMITS mailing list