[cig-commits] r15066 - short/3D/PyLith/trunk/libsrc/materials

brad at geodynamics.org brad at geodynamics.org
Tue May 26 17:47:21 PDT 2009


Author: brad
Date: 2009-05-26 17:47:21 -0700 (Tue, 26 May 2009)
New Revision: 15066

Modified:
   short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.cc
   short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.hh
   short/3D/PyLith/trunk/libsrc/materials/PowerLaw3D.cc
Log:
Merged with Charles.

Modified: short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.cc	2009-05-27 00:29:59 UTC (rev 15065)
+++ short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.cc	2009-05-27 00:47:21 UTC (rev 15066)
@@ -16,8 +16,8 @@
 
 #include "petsc.h" // USES PetscLogFlops
 
+#include <cmath> // USES fabs()
 #include <stdexcept> // USES std::runtime_error
-#include <cmath> // USES fabs
 
 // ----------------------------------------------------------------------
 // Compute effective stress, given an initial guess, a vector of parameters,
@@ -58,7 +58,6 @@
 					  effStressFuncDFunc);
 
   return effStress;
-
 } // getEffStress
 
 // ----------------------------------------------------------------------
@@ -83,12 +82,12 @@
 
   int iteration = 0;
   bool bracketed = false;
-
   while (iteration < maxIterations) {
     if ((funcValue1 * funcValue2) < 0.0) {
       bracketed = true;
       break;
-    }
+    } // if
+
     if (fabs(funcValue1) < fabs(funcValue2)) {
       x1 += bracketFactor * (x1 - x2);
       x1 = std::max(x1, 0.0);
@@ -105,9 +104,8 @@
   *px2 = x2;
 
   PetscLogFlops(5 * iteration);
-  if (bracketed == false)
+  if (!bracketed)
     throw std::runtime_error("Unable to bracket effective stress.");
-
 } // _bracketEffStress
 
 // ----------------------------------------------------------------------
@@ -197,6 +195,7 @@
   PetscLogFlops(5 + 15 * iteration);
   return effStress;
 
+  return effStress;
 } // _findEffStress
 
 

Modified: short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.hh	2009-05-27 00:29:59 UTC (rev 15065)
+++ short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.hh	2009-05-27 00:47:21 UTC (rev 15066)
@@ -128,8 +128,8 @@
    * @returns Computed effective stress.
    */
   static
-  double _findEffStress(double xx1,
-			double xx2,
+  double _findEffStress(double x1,
+			double x2,
 			const EffStressStruct& effStressParams,
 			effStressFunc_fn_type effStressFunc,
 			effStressFuncDFunc_fn_type effStressFuncDFunc);

Modified: short/3D/PyLith/trunk/libsrc/materials/PowerLaw3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/PowerLaw3D.cc	2009-05-27 00:29:59 UTC (rev 15065)
+++ short/3D/PyLith/trunk/libsrc/materials/PowerLaw3D.cc	2009-05-27 00:47:21 UTC (rev 15066)
@@ -667,9 +667,8 @@
 // Effective stress function that computes effective stress function
 // derivative only (no function value).
 double
-pylith::materials::PowerLaw3D::effStressDFunc(
-     const double effStressTpdt,
-     const EffectiveStress::EffStressStruct& effStressParams)
+pylith::materials::PowerLaw3D::effStressDFunc(const double effStressTpdt,
+					      const EffectiveStress::EffStressStruct& effStressParams)
 { // effStressDFunc
   double ae = effStressParams.ae;
   double c = effStressParams.c;



More information about the CIG-COMMITS mailing list