[cig-commits] r16858 - short/3D/PyLith/trunk/libsrc/faults
brad at geodynamics.org
brad at geodynamics.org
Tue Jun 1 15:48:23 PDT 2010
Author: brad
Date: 2010-06-01 15:48:23 -0700 (Tue, 01 Jun 2010)
New Revision: 16858
Modified:
short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc
Log:
Fixed some bugs related to computing fault preconditioner in parallel.
Modified: short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc 2010-06-01 21:57:47 UTC (rev 16857)
+++ short/3D/PyLith/trunk/libsrc/faults/FaultCohesiveLagrange.cc 2010-06-01 22:48:23 UTC (rev 16858)
@@ -669,6 +669,10 @@
const int v_negative = _cohesiveVertices[iVertex].negative;
const int v_positive = _cohesiveVertices[iVertex].positive;
+ // Compute contribution only if Lagrange constraint is local.
+ if (!globalOrder->isLocal(v_lagrange))
+ continue;
+
#if defined(DETAILED_EVENT_LOGGING)
_logger->eventBegin(restrictEvent);
#endif
@@ -678,15 +682,23 @@
orientationVertex.size());
// Set global order indices
- indicesN = indicesRel + globalOrder->getIndex(v_negative);
- indicesP = indicesRel + globalOrder->getIndex(v_positive);
+ if (globalOrder->isLocal(v_negative))
+ indicesN = indicesRel + globalOrder->getIndex(v_negative);
+ else
+ indicesN = -1;
+ if (globalOrder->isLocal(v_positive))
+ indicesP = indicesRel + globalOrder->getIndex(v_positive);
+ else
+ indicesP = -1;
PetscErrorCode err = 0;
+ jacobianVertexN = 1.0;
err = MatGetValues(jacobianMatrix,
indicesN.size(), &indicesN[0],
indicesN.size(), &indicesN[0],
&jacobianVertexN[0]); CHECK_PETSC_ERROR(err);
+ jacobianVertexP = 1.0;
err = MatGetValues(jacobianMatrix,
indicesP.size(), &indicesP[0],
indicesP.size(), &indicesP[0],
More information about the CIG-COMMITS
mailing list