[cig-commits] r15989 - in short/3D/PyLith/branches/pylith-friction: libsrc/feassemble unittests/libtests/feassemble unittests/libtests/feassemble/data
brad at geodynamics.org
brad at geodynamics.org
Tue Nov 17 14:09:52 PST 2009
Author: brad
Date: 2009-11-17 14:09:52 -0800 (Tue, 17 Nov 2009)
New Revision: 15989
Modified:
short/3D/PyLith/branches/pylith-friction/libsrc/feassemble/IntegratorElasticityLgDeform.cc
short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc
short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/data/IntegratorElasticityLgDeform.py
Log:
Debugging.
Modified: short/3D/PyLith/branches/pylith-friction/libsrc/feassemble/IntegratorElasticityLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/pylith-friction/libsrc/feassemble/IntegratorElasticityLgDeform.cc 2009-11-16 23:10:25 UTC (rev 15988)
+++ short/3D/PyLith/branches/pylith-friction/libsrc/feassemble/IntegratorElasticityLgDeform.cc 2009-11-17 22:09:52 UTC (rev 15989)
@@ -338,6 +338,9 @@
l11 += basisDeriv[iQuad*numBasis+kBasis ] * disp[kBasis ];
for (int iBasis=0; iBasis < numBasis; ++iBasis) {
const double N1 = wt * (1.0 + l11) * basisDeriv[iQuad*numBasis+iBasis ];
+ std::cout << "N1: " << N1
+ << ", s11: " << s11
+ << std::endl;
_cellVector[iBasis*spaceDim ] -= N1*s11;
} // for
} // for
@@ -517,6 +520,13 @@
const double valIJnl = valInl * basisDeriv[iQ+jBasis];
const int iBlock = iBasis*spaceDim * (numBasis*spaceDim);
const int jBlock = jBasis*spaceDim;
+ std::cout << "iBasis: " << iBasis
+ << ", jBasis: " << jBasis
+ << ", l11: " << l11
+ << ", valIJ: " << valIJ
+ << ", s11: " << s11
+ << ", valInl" << valIJnl
+ << std::endl;
_cellMatrix[iBlock+jBlock] += valIJ + valIJnl;
} // for
} // for
Modified: short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc 2009-11-16 23:10:25 UTC (rev 15988)
+++ short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/TestElasticityImplicitLgDeform.cc 2009-11-17 22:09:52 UTC (rev 15989)
@@ -166,6 +166,13 @@
const double* valsE = _data->valsResidual;
const int sizeE = _data->spaceDim * _data->numVertices;
+#if 1 // DEBUGGING
+ residual.view("RESIDUAL");
+ std::cout << "RESIDUAL EXPECTED\n";
+ for (int i=0; i < sizeE; ++i)
+ std::cout << " " << valsE[i] << "\n";
+#endif
+
const ALE::Obj<RealSection>& residualSection = residual.section();
CPPUNIT_ASSERT(!residualSection.isNull());
const double* vals = residualSection->restrictSpace();
@@ -196,10 +203,8 @@
topology::Jacobian jacobian(fields);
const double t = 1.0;
- //mesh->getSieve()->setDebug(10);
integrator.integrateJacobian(&jacobian, t, &fields);
CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
- //mesh->getSieve()->setDebug(0);
jacobian.assemble("final_assembly");
const double* valsE = _data->valsJacobian;
Modified: short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/data/IntegratorElasticityLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/data/IntegratorElasticityLgDeform.py 2009-11-16 23:10:25 UTC (rev 15988)
+++ short/3D/PyLith/branches/pylith-friction/unittests/libtests/feassemble/data/IntegratorElasticityLgDeform.py 2009-11-17 22:09:52 UTC (rev 15989)
@@ -73,7 +73,13 @@
BNL = self._calculateBasisDerivMatNonlinear(basisDeriv, iQuad)
strain = numpy.dot(BL0+BL1, fieldTpdt)
S = self._calculateStress(strain, D)
+ print "BL0",BL0
+ print "BL1",BL1
+ print "D",D
+ print "BNL",BNL
+ print "S",S
cellK[:] += wt * numpy.dot(numpy.dot(BNL.transpose(), S), BNL)
+ print "K",cellK
feutils.assembleMat(K, cellK, cell, self.spaceDim)
return K
More information about the CIG-COMMITS
mailing list