[cig-commits] r19731 - in short/3D/PyLith/branches/pylith-scecdynrup: libsrc/pylith/materials unittests/libtests/materials unittests/libtests/materials/data unittests/libtests/meshio unittests/libtests/meshio/data

brad at geodynamics.org brad at geodynamics.org
Tue Mar 6 11:55:03 PST 2012


Author: brad
Date: 2012-03-06 11:55:02 -0800 (Tue, 06 Mar 2012)
New Revision: 19731

Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPointsCases.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk
Log:
Merge from trunk.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -904,9 +904,13 @@
       (6.0 * alphaYield * alphaFlow * ae + am);
     const PylithScalar meanStrainFac = 3.0 * alphaYield/am;
     const PylithScalar dFac = 1.0/(sqrt(2.0) * ae);
-    const PylithScalar plasticMult = 
-      std::min(sqrt(2.0)*d,
-	       plasticFac * (meanStrainFac * meanStrainPPTpdt + dFac * d - beta));
+    const PylithScalar testMult = plasticFac *
+      (meanStrainFac * meanStrainPPTpdt + dFac * d - beta);
+    const PylithScalar plasticMult = std::min(sqrt(2.0)*d, testMult);
+	       
+    bool tensileYield = false;
+    if (plasticMult == sqrt(2.0) * d)
+      tensileYield = true;
 
     // Define some constants, vectors, and matrices.
     const PylithScalar third = 1.0/3.0;
@@ -925,6 +929,7 @@
       strainPPTpdt[4] + ae * devStressInitial[4],
       strainPPTpdt[5] + ae * devStressInitial[5]
     };
+    const PylithScalar dFac2 = (d > 0.0) ? 1.0/(sqrt(2.0) * d) : 0.0;
     PylithScalar dDeltaEdEpsilon = 0.0;
 
     // Compute elasticity matrix.
@@ -935,15 +940,25 @@
 						   2.0 * vec1[3]/d,
 						   2.0 * vec1[4]/d,
 						   2.0 * vec1[5]/d};
-      const PylithScalar dLambdadEpsilon[tensorSize] = {
-	plasticFac * (alphaYield/am + dFac * dDdEpsilon[0]),
-	plasticFac * (alphaYield/am + dFac * dDdEpsilon[1]),
-	plasticFac * (alphaYield/am + dFac * dDdEpsilon[2]),
-	plasticFac * (                dFac * dDdEpsilon[3]),
-	plasticFac * (                dFac * dDdEpsilon[4]),
-	plasticFac * (                dFac * dDdEpsilon[5])
-      };
-      const PylithScalar dFac2 = 1.0/(sqrt(2.0) * d);
+      PylithScalar dLambdadEpsilon[tensorSize];
+      if (tensileYield) {
+	dLambdadEpsilon[0] = sqrt(2.0) * dDdEpsilon[0];
+	dLambdadEpsilon[1] = sqrt(2.0) * dDdEpsilon[1];
+	dLambdadEpsilon[2] = sqrt(2.0) * dDdEpsilon[2];
+	dLambdadEpsilon[3] = sqrt(2.0) * dDdEpsilon[3];
+	dLambdadEpsilon[4] = sqrt(2.0) * dDdEpsilon[4];
+	dLambdadEpsilon[5] = sqrt(2.0) * dDdEpsilon[5];
+      } else {
+	dLambdadEpsilon[0] = plasticFac *
+	  (alphaYield/am + dFac * dDdEpsilon[0]);
+	dLambdadEpsilon[1] = plasticFac *
+	  (alphaYield/am + dFac * dDdEpsilon[1]);
+	dLambdadEpsilon[2] = plasticFac *
+	  (alphaYield/am + dFac * dDdEpsilon[2]);
+	dLambdadEpsilon[3] = plasticFac * dFac * dDdEpsilon[3];
+	dLambdadEpsilon[4] = plasticFac * dFac * dDdEpsilon[4];
+	dLambdadEpsilon[5] = plasticFac * dFac * dDdEpsilon[5];
+      } // else
       for (int iComp=0; iComp < tensorSize; ++iComp) {
 	for (int jComp=0; jComp < tensorSize; ++jComp) {
 	  int iCount = jComp + tensorSize * iComp;
@@ -958,14 +973,12 @@
 	} // for
       } // for
     } else {
-      const PylithScalar dLambdadEpsilon[tensorSize] = {
-	plasticFac * (alphaYield/am),
-	plasticFac * (alphaYield/am),
-	plasticFac * (alphaYield/am),
-	0.0,
-	0.0,
-	0.0,
-      };
+      const PylithScalar dLambdadEpsilon[tensorSize] = {0.0,
+							0.0,	
+							0.0,	
+							0.0,
+							0.0,
+							0.0};
       for (int iComp=0; iComp < tensorSize; ++iComp) {
 	for (int jComp=0; jComp < tensorSize; ++jComp) {
 	  int iCount = jComp + tensorSize * iComp;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -926,10 +926,14 @@
       (6.0 * alphaYield * alphaFlow * ae + am);
     const PylithScalar meanStrainFac = 3.0 * alphaYield/am;
     const PylithScalar dFac = 1.0/(sqrt(2.0) * ae);
-    const PylithScalar plasticMult = 
-      std::min(sqrt(2.0)*d,
-	       plasticFac * (meanStrainFac * meanStrainPPTpdt + dFac * d - beta));
+    const PylithScalar testMult = plasticFac *
+      (meanStrainFac * meanStrainPPTpdt + dFac * d - beta);
+    const PylithScalar plasticMult = std::min(sqrt(2.0)*d, testMult);
 
+    bool tensileYield = false;
+    if (plasticMult == sqrt(2.0) * d)
+      tensileYield = true;
+
     // Define some constants, vectors, and matrices.
     const PylithScalar third = 1.0/3.0;
     const PylithScalar dEdEpsilon[3][3] = {
@@ -950,29 +954,42 @@
       const PylithScalar dDdEpsilon[3] = {vec1[0]/d,
 					  vec1[1]/d,
 					  2.0 * vec1[2]/d};
-      const PylithScalar dLambdadEpsilon[3] = {
-	plasticFac * (alphaYield/am + dFac * dDdEpsilon[0]),
-	plasticFac * (alphaYield/am + dFac * dDdEpsilon[1]),
-	plasticFac * (                dFac * dDdEpsilon[2])};
+
+      PylithScalar dLambdadEpsilon[tensorSize];
+      if (tensileYield) {
+	dLambdadEpsilon[0] = sqrt(2.0) * dDdEpsilon[0];
+	dLambdadEpsilon[1] = sqrt(2.0) * dDdEpsilon[1];
+	dLambdadEpsilon[2] = sqrt(2.0) * dDdEpsilon[2];
+      } else {
+	dLambdadEpsilon[0] = plasticFac *
+	  (alphaYield/am + dFac * dDdEpsilon[0]);
+	dLambdadEpsilon[1] = plasticFac *
+	  (alphaYield/am + dFac * dDdEpsilon[1]);
+	dLambdadEpsilon[2] = plasticFac * dFac * dDdEpsilon[2];
+      } // else
       for (int iComp=0; iComp < tensorSize; ++iComp) {
 	for (int jComp=0; jComp < tensorSize; ++jComp) {
 	  int iCount = jComp + tensorSize * iComp;
-	  dDeltaEdEpsilon = dFac2 * (vec1[iComp] * (dLambdadEpsilon[jComp] - plasticMult * dDdEpsilon[jComp]/d) +
+	  dDeltaEdEpsilon = dFac2 * (vec1[iComp] *
+				     (dLambdadEpsilon[jComp] -
+				      plasticMult * dDdEpsilon[jComp]/d) +
 				     plasticMult * dEdEpsilon[iComp][jComp]);
-	  elasticConsts[iCount] = (dEdEpsilon[iComp][jComp] - dDeltaEdEpsilon)/ae +
-	    diag[iComp] * (third * diag[jComp] - alphaFlow * dLambdadEpsilon[jComp])/am;
+	  elasticConsts[iCount] = (dEdEpsilon[iComp][jComp] -
+				   dDeltaEdEpsilon)/ae +
+	    diag[iComp] * (third * diag[jComp] -
+			   alphaFlow * dLambdadEpsilon[jComp])/am;
 	} // for
       } // for
     } else {
-      const PylithScalar dLambdadEpsilon[3] = {
-	plasticFac * (alphaYield/am),
-	plasticFac * (alphaYield/am),
-	0.0};
+      const PylithScalar dLambdadEpsilon[3] = {0.0,	
+					       0.0,	
+					       0.0};
       for (int iComp=0; iComp < tensorSize; ++iComp) {
 	for (int jComp=0; jComp < tensorSize; ++jComp) {
 	  int iCount = jComp + tensorSize * iComp;
 	  elasticConsts[iCount] = (dEdEpsilon[iComp][jComp])/ae +
-	    diag[iComp] * (third * diag[jComp] - alphaFlow * dLambdadEpsilon[jComp])/am;
+	    diag[iComp] * (third * diag[jComp] -
+			   alphaFlow * dLambdadEpsilon[jComp])/am;
 	} // for
       } // for
     } // if/else

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -564,12 +564,14 @@
     
     const PylithScalar tolerance = (sizeof(double) == sizeof(PylithScalar)) ? 1.0e-06 : 1.0e-05;
     for (int i=0; i < numConsts; ++i)
-      if (fabs(elasticConstsE[i]) > tolerance)
+      if (fabs(elasticConstsE[i]) > tolerance) {
 	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, elasticConsts[i]/elasticConstsE[i], 
 				     tolerance);
-      else
+      } else {
+	const double stressScale = 1.0e+9;
 	CPPUNIT_ASSERT_DOUBLES_EQUAL(elasticConstsE[i], elasticConsts[i],
-				     tolerance);
+				     tolerance*stressScale);
+      } // if/else
   } // for
 } // _testCalcElasticConsts
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py	2012-03-06 19:55:02 UTC (rev 19731)
@@ -74,7 +74,7 @@
     frictionAngleA = math.radians(30.0)
     dilatationAngleA = math.radians(20.0)
     cohesionA = 3.0e5
-    strainA = [1.1e-4, 1.2e-4, 1.3e-4, 1.4e-4, 1.5e-4, 1.6e-4]
+    strainA = [-1.1e-4, -1.2e-4, -1.3e-4, 1.4e-4, 1.5e-4, 1.6e-4]
     initialStressA = [2.1e4, 2.2e4, 2.3e4, 2.4e4, 2.5e4, 2.6e4]
     initialStrainA = [3.1e-4, 3.2e-4, 3.3e-4, 3.4e-4, 3.5e-4, 3.6e-4]
     muA = vsA*vsA*densityA

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -174,9 +174,9 @@
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DElasticData::_strain[] = {
-  1.10000000e-04,
-  1.20000000e-04,
-  1.30000000e-04,
+ -1.10000000e-04,
+ -1.20000000e-04,
+ -1.30000000e-04,
   1.40000000e-04,
   1.50000000e-04,
   1.60000000e-04,
@@ -189,9 +189,9 @@
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DElasticData::_stress[] = {
- -2.24790000e+07,
- -2.24780000e+07,
- -2.24770000e+07,
+ -4.85790000e+07,
+ -4.94780000e+07,
+ -5.03770000e+07,
  -8.97600000e+06,
  -8.97500000e+06,
  -8.97400000e+06,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py	2012-03-06 19:55:02 UTC (rev 19731)
@@ -79,7 +79,7 @@
     frictionAngleA = math.radians(30.0)
     dilatationAngleA = math.radians(20.0)
     cohesionA = 3.0e5
-    strainA = [1.1e-4, 1.2e-4, 1.3e-4, 1.4e-4, 1.5e-4, 1.6e-4]
+    strainA = [-2.1e-4, 1.2e-4, 1.3e-4, 1.1e-5, 1.1e-5, 1.1e-5]
     initialStressA = [2.1e4, 2.2e4, 2.3e4, 2.4e4, 2.5e4, 2.6e4]
     initialStrainA = [3.6e-5, 3.5e-5, 3.4e-5, 3.3e-5, 3.2e-5, 3.1e-5]
     # initialStressA = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
@@ -102,9 +102,9 @@
     # frictionAngleB = 0.0
     # dilatationAngleB = 0.0
     cohesionB = 1.0e4
-    strainB = [4.1e-4, 4.2e-4, 4.3e-4, 4.4e-4, 4.5e-4, 4.6e-4]
-    initialStressB = [5.1e4, 5.2e4, 5.3e4, 5.4e4, 5.5e4, 5.6e4]
-    initialStrainB = [6.1e-5, 6.2e-5, 6.3e-5, 6.6e-5, 6.5e-5, 6.4e-5]
+    strainB = [4.1e-4, 4.2e-4, 4.3e-4, 1.4e-4, 1.5e-4, 1.6e-4]
+    initialStressB = [5.6e4, 5.5e4, 5.4e4, 5.3e4, 5.2e4, 5.1e4]
+    initialStrainB = [6.6e-5, 6.5e-5, 6.4e-5, 6.3e-5, 6.2e-5, 6.1e-5]
     # initialStressB = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
     # initialStrainB = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
     muB = vsB*vsB*densityB
@@ -277,10 +277,12 @@
                     2.0 * ae * self._scalarProduct(devStressInitial, \
                                                    strainPPTpdt) + \
                     strainPPTpdtProd)
-      plasticMult = 2.0 * ae * am * \
-                    (3.0 * alphaYieldV * meanStrainPPTpdt/am + \
-                     d/(math.sqrt(2.0) * ae) - betaV)/ \
-                     (6.0 * alphaYieldV * alphaFlowV * ae + am)
+      dFac = math.sqrt(2.0) * d
+      testMult = 2.0 * ae * am * \
+                 (3.0 * alphaYieldV * meanStrainPPTpdt/am + \
+                  d/(math.sqrt(2.0) * ae) - betaV)/ \
+                  (6.0 * alphaYieldV * alphaFlowV * ae + am)
+      plasticMult = min(testMult, dFac)
       deltaMeanPlasticStrain = plasticMult * alphaFlowV
       meanStressTpdt = (meanStrainPPTpdt - deltaMeanPlasticStrain)/am + \
                        meanStressInitial
@@ -292,7 +294,7 @@
       for iComp in range(tensorSize):
         deltaDevPlasticStrain = plasticMult * (strainPPTpdt[iComp] + \
                                                ae * devStressInitial[iComp])/ \
-                                               (math.sqrt(2.0) * d)
+                                               dFac
         devStressTpdt = (strainPPTpdt[iComp] - deltaDevPlasticStrain)/ae + \
                         devStressInitial[iComp]
         stressTpdt[iComp] = devStressTpdt + diag[iComp] * meanStressTpdt

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -174,108 +174,108 @@
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_strain[] = {
-  1.10000000e-04,
+ -2.10000000e-04,
   1.20000000e-04,
   1.30000000e-04,
+  1.10000000e-05,
+  1.10000000e-05,
+  1.10000000e-05,
+  4.10000000e-04,
+  4.20000000e-04,
+  4.30000000e-04,
   1.40000000e-04,
   1.50000000e-04,
   1.60000000e-04,
-  4.10000000e-04,
-  4.20000000e-04,
-  4.30000000e-04,
-  4.40000000e-04,
-  4.50000000e-04,
-  4.60000000e-04,
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_stress[] = {
-  5.55066469e+05,
-  5.54377286e+05,
-  5.53688104e+05,
- -4.36889895e+03,
- -5.05808169e+03,
- -5.74726442e+03,
-  9.73972396e+05,
-  9.67659189e+05,
-  9.61345981e+05,
- -2.85301193e+05,
- -2.93159178e+05,
- -3.01017164e+05,
+ -1.63946744e+07,
+ -6.17719414e+06,
+ -5.86690637e+06,
+ -2.02684646e+06,
+ -2.02615846e+06,
+ -2.02547046e+06,
+  4.21392632e+06,
+  4.21392632e+06,
+  4.21392632e+06,
+  1.45519152e-11,
+  7.27595761e-12,
+  0.00000000e+00,
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_elasticConsts[] = {
-  2.69552119e+10,
-  2.61171422e+10,
-  2.52103070e+10,
- -1.14973070e+10,
- -1.33109780e+10,
- -1.51246488e+10,
-  2.56403618e+10,
-  2.47114216e+10,
-  2.39200125e+10,
- -1.09057219e+10,
- -1.26260719e+10,
- -1.43464216e+10,
-  2.42567462e+10,
-  2.34432321e+10,
-  2.25609525e+10,
- -1.03141367e+10,
- -1.19411658e+10,
- -1.35681945e+10,
- -8.77107957e+09,
- -8.47528712e+09,
- -8.17949468e+09,
-  3.68143839e+09,
-  4.34178877e+09,
-  4.93337366e+09,
- -1.01546951e+10,
- -9.81224227e+09,
- -9.46978915e+09,
-  4.34178907e+09,
-  4.95792951e+09,
-  5.71160063e+09,
- -1.15383109e+10,
- -1.11491971e+10,
- -1.07600836e+10,
-  4.93337427e+09,
-  5.71160093e+09,
-  6.42106241e+09,
-  2.65083753e+09,
-  3.40097380e+09,
-  3.37872031e+09,
- -2.01128150e+09,
- -2.06667779e+09,
- -2.12207396e+09,
-  3.40097345e+09,
-  2.60654697e+09,
-  3.35689774e+09,
- -1.99182658e+09,
- -2.04668706e+09,
- -2.10154743e+09,
-  3.37872049e+09,
-  3.35689820e+09,
-  2.56268622e+09,
- -1.97237171e+09,
- -2.02669634e+09,
- -2.08102085e+09,
- -1.00564075e+09,
- -9.95913200e+08,
- -9.86186147e+08,
-  1.06799416e+08,
-  9.03403590e+08,
-  9.27618763e+08,
- -1.03333886e+09,
- -1.02334327e+09,
- -1.01334814e+09,
-  9.03403910e+08,
-  1.55897025e+08,
-  9.53168172e+08,
- -1.06103672e+09,
- -1.05077369e+09,
- -1.04051051e+09,
-  9.27618908e+08,
-  9.53168172e+08,
-  2.06328375e+08,
+  6.57004938e+10,
+  2.99833221e+10,
+  2.98388535e+10,
+  1.88737456e+09,
+  1.88673474e+09,
+  1.88609213e+09,
+  2.09815549e+10,
+  3.02171782e+10,
+ -1.40253222e+09,
+  8.61894060e+09,
+  8.61601438e+09,
+  8.61308910e+09,
+  2.05637179e+10,
+ -1.67589867e+09,
+  2.86086951e+10,
+  8.82336730e+09,
+  8.82037124e+09,
+  8.81737750e+09,
+  2.72937212e+09,
+  6.09515538e+09,
+  6.19736873e+09,
+  2.96246322e+10,
+ -1.33489072e+09,
+ -1.33443763e+09,
+  2.72844546e+09,
+  6.09308621e+09,
+  6.19526533e+09,
+ -1.33489084e+09,
+  2.96255386e+10,
+ -1.33398466e+09,
+  2.72751914e+09,
+  6.09101739e+09,
+  6.19316124e+09,
+ -1.33443763e+09,
+ -1.33398443e+09,
+  2.96264446e+10,
+  4.98723239e+09,
+  4.80000023e+09,
+  4.61276807e+09,
+ -2.75144819e+09,
+ -3.12591158e+09,
+ -3.50037543e+09,
+  4.98723239e+09,
+  4.80000023e+09,
+  4.61276807e+09,
+ -2.75144819e+09,
+ -3.12591158e+09,
+ -3.50037543e+09,
+  4.98723239e+09,
+  4.80000023e+09,
+  4.61276807e+09,
+ -2.75144819e+09,
+ -3.12591158e+09,
+ -3.50037543e+09,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_initialStress[] = {
@@ -285,12 +285,12 @@
   2.40000000e+04,
   2.50000000e+04,
   2.60000000e+04,
+  5.60000000e+04,
+  5.50000000e+04,
+  5.40000000e+04,
+  5.30000000e+04,
+  5.20000000e+04,
   5.10000000e+04,
-  5.20000000e+04,
-  5.30000000e+04,
-  5.40000000e+04,
-  5.50000000e+04,
-  5.60000000e+04,
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_initialStrain[] = {
@@ -300,27 +300,27 @@
   3.30000000e-05,
   3.20000000e-05,
   3.10000000e-05,
-  6.10000000e-05,
-  6.20000000e-05,
-  6.30000000e-05,
   6.60000000e-05,
   6.50000000e-05,
   6.40000000e-05,
+  6.30000000e-05,
+  6.20000000e-05,
+  6.10000000e-05,
 };
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_stateVarsUpdated[] = {
-  6.92302201e-05,
-  8.02677575e-05,
-  9.13052948e-05,
-  1.07630420e-04,
-  1.18667957e-04,
-  1.29705495e-04,
-  2.84142902e-04,
-  2.94412556e-04,
-  3.04682210e-04,
-  4.32906457e-04,
-  4.45444302e-04,
-  4.57982146e-04,
+ -7.89512481e-06,
+  9.60719814e-05,
+  1.00198920e-04,
+  2.35743657e-05,
+  2.45812990e-05,
+  2.55882324e-05,
+  5.53592834e-05,
+  6.61856723e-05,
+  7.70120612e-05,
+  8.62013889e-05,
+  9.70277778e-05,
+  1.07854167e-04,
 };
 
 pylith::materials::DruckerPrager3DTimeDepData::DruckerPrager3DTimeDepData(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -9,7 +9,7 @@
 // This code was developed as part of the Computational Infrastructure
 // for Geodynamics (http://geodynamics.org).
 //
-// Copyright (c) 2010-2011 University of California, Davis
+// Copyright (c) 2010-2012 University of California, Davis
 //
 // See COPYING for license information.
 //

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh	2012-03-06 19:55:02 UTC (rev 19731)
@@ -9,7 +9,7 @@
 // This code was developed as part of the Computational Infrastructure
 // for Geodynamics (http://geodynamics.org).
 //
-// Copyright (c) 2010-2011 University of California, Davis
+// Copyright (c) 2010-2012 University of California, Davis
 //
 // See COPYING for license information.
 //

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py	2012-03-06 19:55:02 UTC (rev 19731)
@@ -77,12 +77,12 @@
     frictionAngleA = math.radians(30.0)
     dilatationAngleA = math.radians(20.0)
     cohesionA = 3.0e5
-    strainA = [1.1e-4, 1.2e-4, 1.4e-4]
+    strainA = [-2.1e-4, 1.2e-4, 1.1e-5]
     initialStressA = [2.1e4, 2.2e4, 2.4e4]
     initialStrainA = [3.6e-5, 3.5e-5, 3.3e-5]
     muA = vsA*vsA*densityA
     lambdaA = vpA*vpA*densityA - 2.0*muA
-    stressZZInitialA = 1.075e4
+    stressZZInitialA = 2.3e4
 
     denomFrictionA = math.sqrt(3.0) * (3.0 - math.sin(frictionAngleA))
     denomDilatationA = math.sqrt(3.0) * (3.0 - math.sin(dilatationAngleA))
@@ -97,12 +97,12 @@
     frictionAngleB = math.radians(25.0)
     dilatationAngleB = math.radians(25.0)
     cohesionB = 1.0e4
-    strainB = [4.1e-4, 4.2e-4, 4.4e-4]
-    initialStressB = [5.1e4, 5.2e4, 5.4e4]
-    initialStrainB = [6.1e-5, 6.2e-5, 6.6e-5]
+    strainB = [4.1e-4, 4.2e-4, 1.4e-4]
+    initialStressB = [5.6e4, 5.5e4, 5.3e4]
+    initialStrainB = [6.6e-5, 6.5e-5, 6.2e-5]
     muB = vsB*vsB*densityB
     lambdaB = vpB*vpB*densityB - 2.0*muB
-    stressZZInitialB = 2.575e4
+    stressZZInitialB = 5.4e4
 
     denomFrictionB = math.sqrt(3.0) * (3.0 - math.sin(frictionAngleB))
     denomDilatationB = math.sqrt(3.0) * (3.0 - math.sin(dilatationAngleB))
@@ -194,7 +194,7 @@
                                                initialStressB, initialStrainB,
                                                stateVarsB)
 
-    self.dtStableImplicit = 1.0e30
+    self.dtStableImplicit = 1.0e+99
 
     return
 
@@ -288,10 +288,12 @@
                     2.0 * ae * self._scalarProduct(devStressInitial, \
                                                    strainPPTpdt) + \
                     strainPPTpdtProd)
-      plasticMult = 2.0 * ae * am * \
-                    (3.0 * alphaYieldV * meanStrainPPTpdt/am + \
-                     d/(math.sqrt(2.0) * ae) - betaV)/ \
-                     (6.0 * alphaYieldV * alphaFlowV * ae + am)
+      dFac = math.sqrt(2.0) * d
+      testMult = 2.0 * ae * am * \
+                 (3.0 * alphaYieldV * meanStrainPPTpdt/am + \
+                  d/(math.sqrt(2.0) * ae) - betaV)/ \
+                  (6.0 * alphaYieldV * alphaFlowV * ae + am)
+      plasticMult = min(testMult, dFac)
       deltaMeanPlasticStrain = plasticMult * alphaFlowV
       meanStressTpdt = (meanStrainPPTpdt - deltaMeanPlasticStrain)/am + \
                        meanStressInitial
@@ -304,7 +306,7 @@
       for iComp in range(4):
         deltaDevPlasticStrain = plasticMult * (strainPPTpdt[iComp] + \
                                                ae * devStressInitial[iComp])/ \
-                                               (math.sqrt(2.0) * d)
+                                               dFac
         devStressTpdt = (strainPPTpdt[iComp] - deltaDevPlasticStrain)/ae + \
                         devStressInitial[iComp]
         stressTpdt4[iComp] = devStressTpdt + diag[iComp] * meanStressTpdt

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -9,7 +9,7 @@
 // This code was developed as part of the Computational Infrastructure
 // for Geodynamics (http://geodynamics.org).
 //
-// Copyright (c) 2010-2011 University of California, Davis
+// Copyright (c) 2010-2012 University of California, Davis
 //
 // See COPYING for license information.
 //
@@ -94,12 +94,12 @@
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_dbStateVars[] = {
-  1.07500000e+04,
+  2.30000000e+04,
   0.00000000e+00,
   0.00000000e+00,
   0.00000000e+00,
   0.00000000e+00,
-  2.57500000e+04,
+  5.40000000e+04,
   0.00000000e+00,
   0.00000000e+00,
   0.00000000e+00,
@@ -122,12 +122,12 @@
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_stateVars[] = {
-  1.07500000e+04,
+  2.30000000e+04,
   4.10000000e-05,
   4.20000000e-05,
   4.40000000e-05,
   4.50000000e-05,
-  2.57500000e+04,
+  5.40000000e+04,
   1.10000000e-05,
   1.20000000e-05,
   1.40000000e-05,
@@ -150,16 +150,16 @@
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_stateVarsNondim[] = {
-  4.77777778e-07,
-  4.77777778e-07,
-  4.77777778e-07,
-  4.77777778e-07,
-  4.77777778e-07,
-  1.14444444e-06,
-  1.14444444e-06,
-  1.14444444e-06,
-  1.14444444e-06,
-  1.14444444e-06,
+  1.02222222e-06,
+  1.02222222e-06,
+  1.02222222e-06,
+  1.02222222e-06,
+  1.02222222e-06,
+  2.40000000e-06,
+  2.40000000e-06,
+  2.40000000e-06,
+  2.40000000e-06,
+  2.40000000e-06,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_density[] = {
@@ -168,73 +168,73 @@
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_strain[] = {
-  1.10000000e-04,
+ -2.10000000e-04,
   1.20000000e-04,
-  1.40000000e-04,
+  1.10000000e-05,
   4.10000000e-04,
   4.20000000e-04,
-  4.40000000e-04,
+  1.40000000e-04,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_stress[] = {
- -4.95807185e+05,
- -3.82197636e+05,
-  7.08863124e+05,
-  5.51473672e+05,
-  5.45142209e+05,
- -2.85351554e+05,
+ -1.92922457e+07,
+ -4.93459240e+06,
+ -2.89163969e+06,
+  2.05547473e+06,
+  2.05547473e+06,
+  1.45519152e-11,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_elasticConsts[] = {
-  2.44487161e+10,
-  1.17789183e+10,
- -1.66473214e+10,
-  1.09997245e+10,
-  2.10335485e+10,
- -1.62468306e+10,
- -1.31854142e+10,
- -1.29851687e+10,
-  1.38346134e+10,
-  1.73722726e+09,
-  2.48498883e+09,
- -2.42123101e+09,
-  2.48498825e+09,
-  1.68402528e+09,
- -2.37432763e+09,
- -1.21061568e+09,
- -1.18716349e+09,
-  1.33926043e+09,
+  6.78169280e+10,
+  3.08737531e+10,
+ -2.64315493e+09,
+  1.98734119e+10,
+  2.43162760e+10,
+  1.57343177e+10,
+  8.93897377e+08,
+  1.00826339e+10,
+  3.98038772e+10,
+  3.37901525e+09,
+  3.25490593e+09,
+ -1.82383531e+09,
+  3.37901525e+09,
+  3.25490593e+09,
+ -1.82383531e+09,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_initialStress[] = {
   2.10000000e+04,
   2.20000000e+04,
   2.40000000e+04,
-  5.10000000e+04,
-  5.20000000e+04,
-  5.40000000e+04,
+  5.60000000e+04,
+  5.50000000e+04,
+  5.30000000e+04,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_initialStrain[] = {
   3.60000000e-05,
   3.50000000e-05,
   3.30000000e-05,
-  6.10000000e-05,
+  6.60000000e-05,
+  6.50000000e-05,
   6.20000000e-05,
-  6.60000000e-05,
 };
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_stateVarsUpdated[] = {
-  1.07500000e+04,
-  7.52490579e-05,
-  8.37466235e-05,
-  2.04754109e-05,
-  9.17808195e-05,
-  2.57500000e+04,
-  3.24452570e-04,
-  3.34725393e-04,
- -7.68586819e-05,
-  4.32915200e-04,
+  2.30000000e+04,
+  3.64658670e-05,
+  4.84291274e-05,
+  4.75397462e-05,
+  4.27919930e-05,
+  5.40000000e+04,
+  2.05251755e-04,
+  2.16078144e-04,
+ -1.39095468e-04,
+  8.72013889e-05,
 };
 
 pylith::materials::DruckerPragerPlaneStrainTimeDepData::DruckerPragerPlaneStrainTimeDepData(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh	2012-03-06 19:55:02 UTC (rev 19731)
@@ -9,7 +9,7 @@
 // This code was developed as part of the Computational Infrastructure
 // for Geodynamics (http://geodynamics.org).
 //
-// Copyright (c) 2010-2011 University of California, Davis
+// Copyright (c) 2010-2012 University of California, Davis
 //
 // See COPYING for license information.
 //

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPointsCases.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPointsCases.cc	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPointsCases.cc	2012-03-06 19:55:02 UTC (rev 19731)
@@ -64,7 +64,7 @@
 { // setUp
   TestDataWriterVTKPoints::setUp();
   _data = new DataWriterVTKDataPointsTet4;
-  _flipFault = false;
+  _flipFault = true;
   _initialize();
 } // setUp
 
@@ -76,7 +76,7 @@
 { // setUp
   TestDataWriterVTKPoints::setUp();
   _data = new DataWriterVTKDataPointsHex8;
-  _flipFault = true;
+  _flipFault = false;
   _initialize();
 } // setUp
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk	2012-03-06 19:55:02 UTC (rev 19731)
@@ -4,8 +4,8 @@
 DATASET UNSTRUCTURED_GRID
 POINTS 4 double
 -5.000000e-01 0.000000e+00 5.000000e-01
--1.000000e-07 0.000000e+00 0.000000e+00
--1.000000e-07 0.000000e+00 1.000000e+00
+-1.000000e-08 0.000000e+00 0.000000e+00
+-1.000000e-08 0.000000e+00 1.000000e+00
 1.000000e+00 1.000000e+00 -1.000000e+00
 CELLS 4 8
 1  0
@@ -17,21 +17,21 @@
 1
 1
 1
-POINT_DATA 3
+POINT_DATA 4
 VECTORS displacements double
-1.193750e+01 1.303750e+01 1.390000e+01
+5.937500e+00 7.037500e+00 7.950000e+00
 5.925000e+00 7.025000e+00 8.125000e+00
 2.950000e+00 4.050000e+00 5.150000e+00
 4.500000e+00 5.600000e+00 6.700000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
-1.077500e+00
+8.550000e+00
 7.950000e+00
 1.105000e+01
 7.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
-4.112500e+00 4.537500e+00
+4.575000e+00 5.487500e+00
 4.550000e+00 5.650000e+00
 2.400000e+00 3.500000e+00
 3.500000e+00 4.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_t10.vtk	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_t10.vtk	2012-03-06 19:55:02 UTC (rev 19731)
@@ -6,7 +6,7 @@
 -3.333333e-01 0.000000e+00 3.333333e-01
 1.000000e-08 0.000000e+00 3.333333e-01
 1.000000e-08 0.000000e+00 1.000000e-08
-1.000000e-08 -1.000000e+00 1.000000e-08
+0.000000e+00 -1.000000e+00 1.000000e-08
 CELLS 4 8
 1  0
 1  1

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk	2012-03-06 19:47:44 UTC (rev 19730)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk	2012-03-06 19:55:02 UTC (rev 19731)
@@ -4,9 +4,9 @@
 DATASET UNSTRUCTURED_GRID
 POINTS 4 double
 -3.333333e-01 0.000000e+00 3.333333e-01
-1.000000e-09 0.000000e+00 3.333333e-01
-1.000000e-09 0.000000e+00 1.000000e-12
-1.000000e-09 -1.000000e+00 1.000000e-09
+1.000000e-08 0.000000e+00 3.333333e-01
+1.000000e-08 0.000000e+00 1.000000e-08
+0.000000e+00 -1.000000e+00 1.000000e-08
 CELLS 4 8
 1  0
 1  1
@@ -19,19 +19,19 @@
 1
 POINT_DATA 4
 VECTORS displacements double
-1.495000e+01 1.580000e+01 1.690000e+01
-7.133333e+00 7.255556e+00 7.377778e+00
+1.346667e+01 1.423333e+01 1.533333e+01
+7.366667e+00 8.466667e+00 9.566667e+00
 7.200000e+00 8.300000e+00 9.400000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
+1.660000e+01 1.770000e+01 1.880000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
-7.056000e+00
+6.500000e+00
 4.300000e+00
 4.300000e+00
-3.200000e+00
+7.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
-1.030000e+01 1.145000e+01
+9.333333e+00 1.043333e+01
 5.600000e+00 6.700000e+00
 5.600000e+00 6.700000e+00
-3.400000e+00 4.500000e+00
+1.120000e+01 1.230000e+01



More information about the CIG-COMMITS mailing list