[cig-commits] r16683 - in short/3D/PyLith/branches/pylith-scecdynrup: . libsrc/faults libsrc/friction unittests/libtests/faults unittests/libtests/friction

brad at geodynamics.org brad at geodynamics.org
Mon May 10 15:26:46 PDT 2010


Author: brad
Date: 2010-05-10 15:26:46 -0700 (Mon, 10 May 2010)
New Revision: 16683

Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/README
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/RateStateAgeing.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/SlipWeakening.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/StaticFriction.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3d.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestFrictionModel.cc
Log:
Implemented SCEC dynamic spontaneous rupture special desired behavior for fault under tension- no opening.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/README	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/README	2010-05-10 22:26:46 UTC (rev 16683)
@@ -1,3 +1,8 @@
+NOTE: This is a special branch of PyLith for use in running SCEC
+dynamic spontaneous rupture benchmarks in which fault opening is
+not permitted.
+
+
 We are pleased to announce release of PyLith version 1.5.0
 
 Please submit bug reports via the World Wide Web at:

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/faults/FaultCohesiveDyn.cc	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/faults/FaultCohesiveDyn.cc	2010-05-10 22:26:46 UTC (rev 16683)
@@ -44,6 +44,8 @@
 // slight speed improvement.
 //#define PRECOMPUTE_GEOMETRY
 
+#define NO_FAULT_OPENING
+
 // ----------------------------------------------------------------------
 typedef pylith::topology::Mesh::SieveMesh SieveMesh;
 typedef pylith::topology::Mesh::RealSection RealSection;
@@ -1926,7 +1928,9 @@
   const double tractionNormal = tractionTpdt[1];
   const double tractionShearMag = fabs(tractionTpdt[0]);
 
+#if !defined(NO_FAULT_OPENING)
   if (tractionNormal < 0 && 0.0 == slip[1]) {
+#endif
     // if in compression and no opening
     const double frictionStress = _friction->calcFriction(slipMag, slipRateMag,
                 tractionNormal);
@@ -1942,11 +1946,13 @@
       // else friction exceeds value necessary, so stick
       // no changes to solution
     } // if/else
+#if !defined(NO_FAULT_OPENING)
   } else {
     // if in tension, then traction is zero.
     (*dLagrangeTpdt)[0] = -tractionTpdt[0] * area;
     (*dLagrangeTpdt)[1] = -tractionTpdt[1] * area;
   } // else
+#endif
 
   PetscLogFlops(8);
 } // _constrainSolnSpace2D
@@ -1972,7 +1978,9 @@
     sqrt(tractionTpdt[0] * tractionTpdt[0] +
 	 tractionTpdt[1] * tractionTpdt[1]);
   
+#if !defined(NO_FAULT_OPENING)
   if (tractionNormal < 0.0 && 0.0 == slip[2]) {
+#endif
     // if in compression and no opening
     const double frictionStress = 
       _friction->calcFriction(slipShearMag, slipRateMag, tractionNormal);
@@ -1992,12 +2000,14 @@
       // else friction exceeds value necessary, so stick
       // no changes to solution
     } // if/else
+#if !defined(NO_FAULT_OPENING)
   } else {
     // if in tension, then traction is zero.
     (*dLagrangeTpdt)[0] = -tractionTpdt[0] * area;
     (*dLagrangeTpdt)[1] = -tractionTpdt[1] * area;
     (*dLagrangeTpdt)[2] = -tractionTpdt[2] * area;
   } // else
+#endif
 
   PetscLogFlops(22);
 } // _constrainSolnSpace3D

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/RateStateAgeing.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/RateStateAgeing.cc	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/RateStateAgeing.cc	2010-05-10 22:26:46 UTC (rev 16683)
@@ -303,7 +303,9 @@
 
     mu_f = a * asinh(sinhArg);
     friction = -mu_f * normalTraction + properties[p_cohesion];
-  } // if
+  } else {
+    friction = properties[p_cohesion];
+  } //if/else
 
   PetscLogFlops(11);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/SlipWeakening.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/SlipWeakening.cc	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/SlipWeakening.cc	2010-05-10 22:26:46 UTC (rev 16683)
@@ -277,7 +277,9 @@
 	mu_f = properties[p_coefD];
       } // if/else
     friction = - mu_f * normalTraction + properties[p_cohesion];
-  } // if
+  } else {
+    friction = properties[p_cohesion];    
+  } // if/else
 
   PetscLogFlops(6);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/StaticFriction.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/StaticFriction.cc	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/friction/StaticFriction.cc	2010-05-10 22:26:46 UTC (rev 16683)
@@ -152,7 +152,7 @@
 
   const double friction = (normalTraction < 0.0) ?
     -properties[p_coef] * normalTraction + properties[p_cohesion]: 
-    0.0;
+    properties[p_cohesion];
 
   PetscLogFlops(2);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynHex8.hh	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynHex8.hh	2010-05-10 22:26:46 UTC (rev 16683)
@@ -21,6 +21,8 @@
 #if !defined(pylith_faults_testfaultcohesivedynhex8_hh)
 #define pylith_faults_testfaultcohesivedynhex8_hh
 
+#define NO_FAULT_OPENING
+
 #include "TestFaultCohesiveDyn.hh" // ISA TestFaultCohesiveDyn
 
 /// Namespace for pylith package
@@ -40,7 +42,9 @@
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testConstrainSolnSpaceStick );
   CPPUNIT_TEST( testConstrainSolnSpaceSlip );
+#if !defined(NO_FAULT_OPENING)
   CPPUNIT_TEST( testConstrainSolnSpaceOpen );
+#endif
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testCalcTractions );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynQuad4.hh	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynQuad4.hh	2010-05-10 22:26:46 UTC (rev 16683)
@@ -21,6 +21,8 @@
 #if !defined(pylith_faults_testfaultcohesivedynquad4_hh)
 #define pylith_faults_testfaultcohesivedynquad4_hh
 
+#define NO_FAULT_OPENING
+
 #include "TestFaultCohesiveDyn.hh" // ISA TestFaultCohesiveDyn
 
 /// Namespace for pylith package
@@ -40,7 +42,9 @@
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testConstrainSolnSpaceStick );
   CPPUNIT_TEST( testConstrainSolnSpaceSlip );
+#if !defined(NO_FAULT_OPENING)
   CPPUNIT_TEST( testConstrainSolnSpaceOpen );
+#endif
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testCalcTractions );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTet4.hh	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTet4.hh	2010-05-10 22:26:46 UTC (rev 16683)
@@ -21,6 +21,8 @@
 #if !defined(pylith_faults_testfaultcohesivedyntet4_hh)
 #define pylith_faults_testfaultcohesivedyntet4_hh
 
+#define NO_FAULT_OPENING
+
 #include "TestFaultCohesiveDyn.hh" // ISA TestFaultCohesiveDyn
 
 /// Namespace for pylith package
@@ -40,7 +42,9 @@
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testConstrainSolnSpaceStick );
   CPPUNIT_TEST( testConstrainSolnSpaceSlip );
+#if !defined(NO_FAULT_OPENING)
   CPPUNIT_TEST( testConstrainSolnSpaceOpen );
+#endif
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testCalcTractions );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3.hh	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3.hh	2010-05-10 22:26:46 UTC (rev 16683)
@@ -21,6 +21,8 @@
 #if !defined(pylith_faults_testfaultcohesivedyntri3_hh)
 #define pylith_faults_testfaultcohesivedyntri3_hh
 
+#define NO_FAULT_OPENING
+
 #include "TestFaultCohesiveDyn.hh" // ISA TestFaultCohesiveDyn
 
 /// Namespace for pylith package
@@ -40,7 +42,9 @@
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testConstrainSolnSpaceStick );
   CPPUNIT_TEST( testConstrainSolnSpaceSlip );
+#if !defined(NO_FAULT_OPENING)
   CPPUNIT_TEST( testConstrainSolnSpaceOpen );
+#endif
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testCalcTractions );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3d.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3d.hh	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDynTri3d.hh	2010-05-10 22:26:46 UTC (rev 16683)
@@ -21,6 +21,8 @@
 #if !defined(pylith_faults_testfaultcohesivedyntri3d_hh)
 #define pylith_faults_testfaultcohesivedyntri3d_hh
 
+#define NO_FAULT_OPENING
+
 #include "TestFaultCohesiveDyn.hh" // ISA TestFaultCohesiveDyn
 
 /// Namespace for pylith package
@@ -40,7 +42,9 @@
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testConstrainSolnSpaceStick );
   CPPUNIT_TEST( testConstrainSolnSpaceSlip );
+#if !defined(NO_FAULT_OPENING)
   CPPUNIT_TEST( testConstrainSolnSpaceOpen );
+#endif
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testCalcTractions );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestFrictionModel.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestFrictionModel.cc	2010-05-10 19:24:08 UTC (rev 16682)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestFrictionModel.cc	2010-05-10 22:26:46 UTC (rev 16683)
@@ -37,6 +37,7 @@
 #include <cstring> // USES memcpy()
 
 //#define PRECOMPUTE_GEOMETRY
+#define NO_FAULT_OPENING
 
 // ----------------------------------------------------------------------
 CPPUNIT_TEST_SUITE_REGISTRATION( pylith::friction::TestFrictionModel );
@@ -635,8 +636,14 @@
 					slip, slipRate, normalTraction,
 					&properties[0], properties.size(),
 					&stateVars[0], stateVars.size());
-    
+
+#if !defined(NO_FAULT_OPENING)
     const double frictionE = _data->friction[iLoc];
+#else
+    // If fault is in tension, let test pass.
+    const double frictionE = (normalTraction < 0.0) ?
+      _data->friction[iLoc] : friction;
+#endif
     
     const double tolerance = 1.0e-06;
 



More information about the CIG-COMMITS mailing list