[cig-commits] r19094 - short/3D/PyLith/trunk/libsrc/pylith/faults
brad at geodynamics.org
brad at geodynamics.org
Tue Oct 18 13:13:57 PDT 2011
Author: brad
Date: 2011-10-18 13:13:57 -0700 (Tue, 18 Oct 2011)
New Revision: 19094
Modified:
short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh
Log:
Merge from stable.
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2011-10-18 20:12:05 UTC (rev 19093)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc 2011-10-18 20:13:57 UTC (rev 19094)
@@ -1848,216 +1848,6 @@
} // _getJacobianSubmatrixNP
// ----------------------------------------------------------------------
-// Adjust solution in lumped formulation to match slip for 1-D.
-void
-pylith::faults::FaultCohesiveLagrange::_adjustSolnLumped1D(
- scalar_array* lagrangeTIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP)
-{ // _adjustSoln1D
- assert(0 != lagrangeTIncr);
- assert(0 != dispTIncrN);
- assert(0 != dispTIncrP);
-
- assert(jacobianN[0] > 0.0);
- assert(jacobianP[0] > 0.0);
-
- const PylithScalar Sinv = jacobianN[0] * jacobianP[0]
- / (jacobianN[0] + jacobianP[0]);
-
- // Aru = A_i^{-1} r_i - A_j^{-1} r_j + u_i - u_j
- const PylithScalar Aru = residualN[0] / jacobianN[0]
- - residualP[0] / jacobianP[0] + dispTN[0]
- - dispTP[0];
-
- // dl_k = D^{-1}( - C_{ki} Aru - d_k)
- const PylithScalar Aruslip = -Aru - slip[0];
- const PylithScalar dlp = Sinv * Aruslip;
-
- // Update displacements at negative vertex
- (*dispTIncrN)[0] = +1.0 / jacobianN[0] * dlp;
-
- // Update displacements at positive vertex
- (*dispTIncrP)[0] = -1.0 / jacobianP[0] * dlp;
-
- // Update Lagrange multiplier.
- (*lagrangeTIncr)[0] = dlp;
-
- PetscLogFlops(17);
-} // _adjustSoln1D
-
-// ----------------------------------------------------------------------
-// Adjust solution in lumped formulation to match slip for 2-D.
-void
-pylith::faults::FaultCohesiveLagrange::_adjustSolnLumped2D(
- scalar_array* lagrangeTIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP)
-{ // _adjustSoln2D
- assert(0 != lagrangeTIncr);
- assert(0 != dispTIncrN);
- assert(0 != dispTIncrP);
-
- assert(jacobianN[0] > 0.0);
- assert(jacobianN[1] > 0.0);
- assert(jacobianP[0] > 0.0);
- assert(jacobianP[1] > 0.0);
-
- const PylithScalar Cpx = orientation[0];
- const PylithScalar Cpy = orientation[1];
- const PylithScalar Cqx = orientation[2];
- const PylithScalar Cqy = orientation[3];
-
- // Check to make sure Jacobian is same at all DOF for
- // vertices i and j (means S is diagonal with equal enties).
- assert(jacobianN[0] == jacobianN[1]);
- assert(jacobianP[0] == jacobianP[1]);
-
- const PylithScalar Sinv = jacobianN[0] * jacobianP[0]
- / (jacobianN[0] + jacobianP[0]);
-
- // Aru = A_i^{-1} r_i - A_j^{-1} r_j + u_i - u_j
- const PylithScalar Arux = residualN[0] / jacobianN[0]
- - residualP[0] / jacobianP[0] + dispTN[0]
- - dispTP[0];
- const PylithScalar Aruy = residualN[1] / jacobianN[1]
- - residualP[1] / jacobianP[1] + dispTN[1]
- - dispTP[1];
-
- // dl_k = S^{-1}(-C_{ki} Aru - d_k)
- const PylithScalar Arup = Cpx * Arux + Cpy * Aruy;
- const PylithScalar Aruq = Cqx * Arux + Cqy * Aruy;
- const PylithScalar Arupslip = -Arup - slip[0];
- const PylithScalar Aruqslip = -Aruq - slip[1];
- const PylithScalar dlp = Sinv * Arupslip;
- const PylithScalar dlq = Sinv * Aruqslip;
-
- const PylithScalar dlx = Cpx * dlp + Cqx * dlq;
- const PylithScalar dly = Cpy * dlp + Cqy * dlq;
-
- // Update displacements at negative vertex.
- (*dispTIncrN)[0] = dlx / jacobianN[0];
- (*dispTIncrN)[1] = dly / jacobianN[1];
-
- // Update displacements at positive vertex.
- (*dispTIncrP)[0] = -dlx / jacobianP[0];
- (*dispTIncrP)[1] = -dly / jacobianP[0];
-
- // Update Lagrange multiplier.
- (*lagrangeTIncr)[0] = dlp;
- (*lagrangeTIncr)[1] = dlq;
-
- PetscLogFlops(41);
-} // _adjustSoln2D
-
-// ----------------------------------------------------------------------
-// Adjust solution in lumped formulation to match slip for 3-D.
-void
-pylith::faults::FaultCohesiveLagrange::_adjustSolnLumped3D(
- scalar_array* lagrangeTIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP)
-{ // _adjustSoln3D
- assert(0 != lagrangeTIncr);
- assert(0 != dispTIncrN);
- assert(0 != dispTIncrP);
-
- assert(jacobianN[0] > 0.0);
- assert(jacobianN[1] > 0.0);
- assert(jacobianN[2] > 0.0);
- assert(jacobianP[0] > 0.0);
- assert(jacobianP[1] > 0.0);
- assert(jacobianP[2] > 0.0);
-
- const PylithScalar Cpx = orientation[0];
- const PylithScalar Cpy = orientation[1];
- const PylithScalar Cpz = orientation[2];
- const PylithScalar Cqx = orientation[3];
- const PylithScalar Cqy = orientation[4];
- const PylithScalar Cqz = orientation[5];
- const PylithScalar Crx = orientation[6];
- const PylithScalar Cry = orientation[7];
- const PylithScalar Crz = orientation[8];
-
- // Check to make sure Jacobian is same at all DOF for
- // vertices i and j (means S is diagonal with equal enties).
- assert(jacobianN[0] == jacobianN[1] &&
- jacobianN[0] == jacobianN[2]);
- assert(jacobianP[0] == jacobianP[1] &&
- jacobianP[0] == jacobianP[2]);
-
- const PylithScalar Sinv = jacobianN[0] * jacobianP[0]
- / (jacobianN[0] + jacobianP[0]);
-
- // Aru = A_i^{-1} r_i - A_j^{-1} r_j + u_i - u_j
- const PylithScalar Arux = residualN[0] / jacobianN[0]
- - residualP[0] / jacobianP[0] + dispTN[0]
- - dispTP[0];
- const PylithScalar Aruy = residualN[1] / jacobianN[1]
- - residualP[1] / jacobianP[1] + dispTN[1]
- - dispTP[1];
- const PylithScalar Aruz = residualN[2] / jacobianN[2]
- - residualP[2] / jacobianP[2] + dispTN[2]
- - dispTP[2];
-
- // dl_k = D^{-1}( -C_{ki} Aru - d_k)
- const PylithScalar Arup = Cpx * Arux + Cpy * Aruy + Cpz * Aruz;
- const PylithScalar Aruq = Cqx * Arux + Cqy * Aruy + Cqz * Aruz;
- const PylithScalar Arur = Crx * Arux + Cry * Aruy + Crz * Aruz;
- const PylithScalar Arupslip = -Arup - slip[0];
- const PylithScalar Aruqslip = -Aruq - slip[1];
- const PylithScalar Arurslip = -Arur - slip[2];
- const PylithScalar dlp = Sinv * Arupslip;
- const PylithScalar dlq = Sinv * Aruqslip;
- const PylithScalar dlr = Sinv * Arurslip;
-
- const PylithScalar dlx = Cpx * dlp + Cqx * dlq + Crx * dlr;
- const PylithScalar dly = Cpy * dlp + Cqy * dlq + Cry * dlr;
- const PylithScalar dlz = Cpz * dlp + Cqz * dlq + Crz * dlr;
-
- // Update displacements at negative vertex.
- (*dispTIncrN)[0] = dlx / jacobianN[0];
- (*dispTIncrN)[1] = dly / jacobianN[1];
- (*dispTIncrN)[2] = dlz / jacobianN[2];
-
- // Update displacements at positive vertex.
- (*dispTIncrP)[0] = -dlx / jacobianP[0];
- (*dispTIncrP)[1] = -dly / jacobianP[1];
- (*dispTIncrP)[2] = -dlz / jacobianP[2];
-
- // Update Lagrange multiplier.
- (*lagrangeTIncr)[0] = dlp;
- (*lagrangeTIncr)[1] = dlq;
- (*lagrangeTIncr)[2] = dlr;
-
- PetscLogFlops(72);
-} // _adjustSoln3D
-
-// ----------------------------------------------------------------------
// Get cell field associated with integrator.
const pylith::topology::Field<pylith::topology::SubMesh>&
pylith::faults::FaultCohesiveLagrange::cellField(const char* name,
Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh 2011-10-18 20:12:05 UTC (rev 19093)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh 2011-10-18 20:13:57 UTC (rev 19094)
@@ -270,84 +270,6 @@
const topology::Jacobian& jacobian,
const topology::SolutionFields& fields);
- /** Adjust solution in lumped formulation to match slip for 1-D.
- *
- * @param lagrangeIncr Increment in Lagrange multiplier.
- * @param dispTIncrN Disp increment assoc. w/vertex on - side of fault.
- * @param dispTIncrP Disp increment assoc. w/vertex on + side of fault.
- * @param slip Slip associated with Lagrange multipler vertex.
- * @param orientation Orientation associated with Lagrange multipluer vertex.
- * @param dispTN Displacement associated with vertex on - side of fault.
- * @param dispTP Displacement associated with vertex on + side of fault.
- * @param residualN Residual associated with vertex on - side of fault.
- * @param residualP Residual associated with vertex on + side of fault.
- * @param jacobianN Jacobian associated with vertex on - side of fault.
- * @param jacobianP Jacobian associated with vertex on + side of fault.
- */
- void _adjustSolnLumped1D(scalar_array* lagrangeIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP);
-
- /** Adjust solution in lumped formulation to match slip for 2-D.
- *
- * @param lagrangeIncr Increment in Lagrange multiplier.
- * @param dispTIncrN Disp increment assoc. w/vertex on - side of fault.
- * @param dispTIncrP Disp increment assoc. w/vertex on + side of fault.
- * @param slip Slip associated with Lagrange multipler vertex.
- * @param orientation Orientation associated with Lagrange multipluer vertex.
- * @param dispTN Displacement associated with vertex on - side of fault.
- * @param dispTP Displacement associated with vertex on + side of fault.
- * @param residualN Residual associated with vertex on - side of fault.
- * @param residualP Residual associated with vertex on + side of fault.
- * @param jacobianN Jacobian associated with vertex on - side of fault.
- * @param jacobianP Jacobian associated with vertex on + side of fault.
- */
- void _adjustSolnLumped2D(scalar_array* lagrangeIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP);
-
- /** Adjust solution in lumped formulation to match slip for 3-D.
- *
- * @param lagrangeIncr Increment in Lagrange multiplier.
- * @param dispTIncrN Disp increment assoc. w/vertex on - side of fault.
- * @param dispTIncrP Disp increment assoc. w/vertex on + side of fault.
- * @param slip Slip associated with Lagrange multipler vertex.
- * @param orientation Orientation associated with Lagrange multipluer vertex.
- * @param dispTN Displacement associated with vertex on - side of fault.
- * @param dispTP Displacement associated with vertex on + side of fault.
- * @param residualN Residual associated with vertex on - side of fault.
- * @param residualP Residual associated with vertex on + side of fault.
- * @param jacobianN Jacobian associated with vertex on - side of fault.
- * @param jacobianP Jacobian associated with vertex on + side of fault.
- */
- void _adjustSolnLumped3D(scalar_array* lagrangeIncr,
- scalar_array* dispTIncrN,
- scalar_array* dispTIncrP,
- const scalar_array& slip,
- const scalar_array& orientation,
- const scalar_array& dispTN,
- const scalar_array& dispTP,
- const scalar_array& residualN,
- const scalar_array& residualP,
- const scalar_array& jacobianN,
- const scalar_array& jacobianP);
-
// PROTECTED MEMBERS //////////////////////////////////////////////////
protected :
More information about the CIG-COMMITS
mailing list