[cig-commits] r18732 - in short/3D/PyLith/branches/v1.6-stable: libsrc/pylith/materials unittests/libtests/materials/data

willic3 at geodynamics.org willic3 at geodynamics.org
Mon Jul 11 15:25:37 PDT 2011


Author: willic3
Date: 2011-07-11 15:25:37 -0700 (Mon, 11 Jul 2011)
New Revision: 18732

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
   short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py
   short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc
   short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py
   short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc
Log:
Fixed stupid mistake for generalized Maxwell model where mean initial stress
was being added twice.



Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2011-07-11 22:25:37 UTC (rev 18732)
@@ -571,8 +571,7 @@
     } // for
 
     devStressTpdt = mu2 * devStressTpdt + devStressInitial[iComp];
-    stress[iComp] = diag[iComp] * (meanStressTpdt + meanStressInitial) +
-      devStressTpdt;
+    stress[iComp] = diag[iComp] * meanStressTpdt + devStressTpdt;
   } // for
 
   PetscLogFlops((9 + 3 * numMaxwellModels) * tensorSize);

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2011-07-11 22:25:37 UTC (rev 18732)
@@ -586,8 +586,7 @@
     } // for
 
     devStressTpdt = mu2 * devStressTpdt + devStressInitial[iComp];
-    stress[iComp] = diag[iComp] * (meanStressTpdt + meanStressInitial) +
-      devStressTpdt;
+    stress[iComp] = diag[iComp] * meanStressTpdt + devStressTpdt;
   } // for
 
   PetscLogFlops((9 + 2 * numMaxwellModels) * tensorSize);

Modified: short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py	2011-07-11 22:25:37 UTC (rev 18732)
@@ -295,8 +295,7 @@
                                             dqV[model] * deltaStrain
           devStressTpdt += shearRatioV[model] * viscousStrainTpdt[model, iComp]
       devStressTpdt = elasFac * devStressTpdt + devStressInitial[iComp]
-      stressTpdt[iComp] = diag[iComp] * (meanStressTpdt + meanStressInitial) + \
-                          devStressTpdt
+      stressTpdt[iComp] = diag[iComp] * meanStressTpdt + devStressTpdt
     
     return stressTpdt, viscousStrainTpdt
 

Modified: short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc	2011-07-11 22:25:37 UTC (rev 18732)
@@ -342,15 +342,15 @@
 };
 
 const double pylith::materials::GenMaxwellIsotropic3DTimeDepData::_stress[] = {
-  1.73848741e+07,
-  2.23190000e+07,
-  2.72531259e+07,
+  1.73628741e+07,
+  2.22970000e+07,
+  2.72311259e+07,
   1.99361456e+07,
   2.48702715e+07,
   2.98043974e+07,
-  2.03492020e+06,
-  2.66720000e+06,
-  3.29947980e+06,
+  1.98292020e+06,
+  2.61520000e+06,
+  3.24747980e+06,
   2.55607698e+06,
   3.18835678e+06,
   3.82063657e+06,

Modified: short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py	2011-07-11 22:25:37 UTC (rev 18732)
@@ -325,8 +325,7 @@
                                             dqV[model] * deltaStrain
           devStressTpdt += shearRatioV[model] * viscousStrainTpdt[model, iComp]
       devStressTpdt = elasFac * devStressTpdt + devStressInitial[iComp]
-      stressTpdt[iComp] = diag[iComp] * (meanStressTpdt + meanStressInitial) + \
-                          devStressTpdt
+      stressTpdt[iComp] = diag[iComp] * meanStressTpdt + devStressTpdt
     
     stressTpdtV = numpy.array([stressTpdt[0], stressTpdt[1], stressTpdt[3]],
                               dtype=numpy.float64)

Modified: short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc	2011-07-11 21:01:41 UTC (rev 18731)
+++ short/3D/PyLith/branches/v1.6-stable/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc	2011-07-11 22:25:37 UTC (rev 18732)
@@ -281,11 +281,11 @@
 };
 
 const double pylith::materials::GenMaxwellPlaneStrainTimeDepData::_stress[] = {
-  8.29099455e+06,
-  8.75027873e+06,
+  8.26999455e+06,
+  8.72927873e+06,
   6.46662036e+06,
-  4.33270011e+06,
-  4.38899464e+06,
+  4.28170011e+06,
+  4.33799464e+06,
   2.49387045e+06,
 };
 



More information about the CIG-COMMITS mailing list