[cig-commits] r15213 - short/3D/PyLith/trunk/libsrc/materials
brad at geodynamics.org
brad at geodynamics.org
Fri Jun 12 12:25:33 PDT 2009
Author: brad
Date: 2009-06-12 12:25:33 -0700 (Fri, 12 Jun 2009)
New Revision: 15213
Modified:
short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.icc
Log:
Changed tolerance in effective stress search. Use funcValue for convergence test.
Modified: short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.icc 2009-06-12 18:28:40 UTC (rev 15212)
+++ short/3D/PyLith/trunk/libsrc/materials/EffectiveStress.icc 2009-06-12 19:25:33 UTC (rev 15213)
@@ -110,7 +110,7 @@
const int maxIterations = 100;
// Desired accuracy for root. This is a bit arbitrary for now.
- const double accuracy = 1.0e-20;
+ const double accuracy = 1.0e-18;
// Organize search so that effStressFunc(xLow) is less than zero.
double funcValueLow = material->effStressFunc(x1);
@@ -143,7 +143,11 @@
while (iteration < maxIterations) {
funcXHigh = (effStress - xHigh) * funcDeriv - funcValue;
funcXLow = (effStress - xLow) * funcDeriv - funcValue;
- if (fabs(funcXLow) < accuracy || fabs(funcXHigh) < accuracy) {
+ std::cout << "low: " << funcXLow
+ << ", high: " << funcXHigh
+ << ", func: " << funcValue
+ << std::endl;
+ if (fabs(funcValue) < accuracy) {
converged = true;
break;
} // if
More information about the CIG-COMMITS
mailing list