[cig-commits] [commit] knepley/fix-faults-parallel: Use nonzero tolerance for detecting inability to determine face orientation with respect to up direction. (c908f59)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed May 7 11:59:16 PDT 2014


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

On branch  : knepley/fix-faults-parallel
Link       : https://github.com/geodynamics/pylith/compare/b9115fef9bddb6603ac8577e88470665f74d470c...c908f593147fcc55db17eea614319904fd7ed5f5

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

commit c908f593147fcc55db17eea614319904fd7ed5f5
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Wed May 7 11:59:13 2014 -0700

    Use nonzero tolerance for detecting inability to determine face orientation with respect to up direction.


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

c908f593147fcc55db17eea614319904fd7ed5f5
 libsrc/pylith/feassemble/CellGeometry.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libsrc/pylith/feassemble/CellGeometry.cc b/libsrc/pylith/feassemble/CellGeometry.cc
index 49c8eb2..934374c 100644
--- a/libsrc/pylith/feassemble/CellGeometry.cc
+++ b/libsrc/pylith/feassemble/CellGeometry.cc
@@ -222,7 +222,7 @@ pylith::feassemble::CellGeometry::_orient2D(scalar_array* orientation,
   PylithScalar p2 =  upDir[0]*r1 - upDir[1]*r0;
   // Make unit vector
   mag = sqrt(p0*p0 + p1*p1 + p2*p2);
-  if (0.0 == mag) {
+  if (mag < 1.0e-6) {
     std::ostringstream msg;
     msg << "Error computing orientation of cell face.\nUp direction ("
 	<< upDir[0] << ", " << upDir[1] << ", " << upDir[2] << ") "



More information about the CIG-COMMITS mailing list