[cig-commits] [commit] knepley/upgrade-petsc-interface: Improve some comments and improve error message. (7b36c05)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Feb 7 09:45:00 PST 2014


Repository : ssh://geoshell/pylith

On branch  : knepley/upgrade-petsc-interface
Link       : https://github.com/geodynamics/pylith/compare/8ad58450b5c50c83528c0f201c4d56b7f30d73cc...7b36c0565c201e5a6630485ab44ea1c969a04a36

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

commit 7b36c0565c201e5a6630485ab44ea1c969a04a36
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Fri Feb 7 09:44:57 2014 -0800

    Improve some comments and improve error message.


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

7b36c0565c201e5a6630485ab44ea1c969a04a36
 libsrc/pylith/faults/FaultCohesiveLagrange.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libsrc/pylith/faults/FaultCohesiveLagrange.cc b/libsrc/pylith/faults/FaultCohesiveLagrange.cc
index 72761ee..b99d53a 100644
--- a/libsrc/pylith/faults/FaultCohesiveLagrange.cc
+++ b/libsrc/pylith/faults/FaultCohesiveLagrange.cc
@@ -1362,7 +1362,9 @@ pylith::faults::FaultCohesiveLagrange::_calcOrientation(const PylithScalar upDir
   topology::CoordsVisitor coordsVisitor(faultDMMesh);
 
   // Loop over cohesive cells, computing orientation weighted by
-  // jacobian at constraint vertices
+  // jacobian at constraint vertices. This involves looping over cells
+  // and summing across processors (complete the section) just like a
+  // normal FE integration.
 
   for(PetscInt c = cStart; c < cEnd; ++c) {
     PetscInt *closure = NULL;
@@ -1411,6 +1413,7 @@ pylith::faults::FaultCohesiveLagrange::_calcOrientation(const PylithScalar upDir
   orientationArray = orientationVisitor.localArray();
   int count = 0;
   for(PetscInt v = vStart; v < vEnd; ++v, ++count) {
+    assert(orientationSize == orientationVisitor.sectionDof(v));
     const PetscInt ooff = orientationVisitor.sectionOffset(v);
     for(PetscInt d = 0; d < orientationSize; ++d) {
       orientationVertex[d] = orientationArray[ooff+d];
@@ -1424,6 +1427,7 @@ pylith::faults::FaultCohesiveLagrange::_calcOrientation(const PylithScalar upDir
       if (mag <= 0.0) {
 	std::ostringstream msg;
 	msg << "Error calculating fault orientation at fault vertex " << v << ".\n" 
+	    << "Zero vector in parallel likely indicates inconsistent fault orientation (creation) across processors.\n"
 	    << "Orientation vector " << iDim << ": (";
 	for (int jDim = 0, index = iDim * spaceDim; jDim < spaceDim; ++jDim) {
 	  msg << " " << orientationVertex[index + jDim];



More information about the CIG-COMMITS mailing list