[cig-commits] r19266 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults
brad at geodynamics.org
brad at geodynamics.org
Mon Dec 5 13:12:13 PST 2011
Author: brad
Date: 2011-12-05 13:12:13 -0800 (Mon, 05 Dec 2011)
New Revision: 19266
Modified:
short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc
Log:
Fixed bug in constraining fault solution. Don't change solution after sensitivity solve at points where Lagrange multipliers weren't changed by friction.
Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc 2011-12-05 09:16:02 UTC (rev 19265)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/faults/FaultCohesiveDyn.cc 2011-12-05 21:12:13 UTC (rev 19266)
@@ -717,7 +717,8 @@
} // for
#if 0 // debugging
- std::cout << "slipVertex: ";
+ std::cout << "v_fault: " << v_fault;
+ std::cout << ", slipVertex: ";
for (int iDim=0; iDim < spaceDim; ++iDim)
std::cout << " " << slipVertex[iDim];
std::cout << ", slipRateVertex: ";
@@ -808,6 +809,14 @@
dLagrangeTpdtSection->restrictPoint(v_fault, &dLagrangeTpdtVertex[0],
dLagrangeTpdtVertex.size());
+ // If no change in the Lagrange multiplier computed from friction
+ // criterion, there are no updates, so continue.
+ double dLagrangeTpdtMag = 0.0;
+ for (int i=0; i < spaceDim; ++i)
+ dLagrangeTpdtMag += dLagrangeTpdtVertex[i]*dLagrangeTpdtVertex[i];
+ if (0.0 == dLagrangeTpdtMag)
+ continue;
+
// Get change in relative displacement from sensitivity solve.
assert(spaceDim == sensDispRelSection->getFiberDimension(v_fault));
const double* sensDispRelVertex =
@@ -2248,6 +2257,7 @@
// if in compression and no opening
const double frictionStress =
_friction->calcFriction(slipShearMag, slipRateMag, tractionNormal);
+
if (tractionShearMag > frictionStress || (iterating && slipRateMag > 0.0)) {
// traction is limited by friction, so have sliding OR
// friction exceeds traction due to overshoot in slip
More information about the CIG-COMMITS
mailing list