[cig-commits] r16606 - in short/3D/PyLith/trunk: . unittests/libtests/feassemble
brad at geodynamics.org
brad at geodynamics.org
Fri Apr 30 17:51:04 PDT 2010
Author: brad
Date: 2010-04-30 17:51:04 -0700 (Fri, 30 Apr 2010)
New Revision: 16606
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc
short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.hh
Log:
Use lumped Jacobian values in data files.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2010-05-01 00:46:21 UTC (rev 16605)
+++ short/3D/PyLith/trunk/TODO 2010-05-01 00:51:04 UTC (rev 16606)
@@ -105,6 +105,7 @@
integrateResidualLumped()
ElasticityExplicitLgDeform
integrateResidualLumped()
+
AbsorbingDampers
integrateResidualLumped()
FaultCohesiveDyn
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc 2010-05-01 00:46:21 UTC (rev 16605)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.cc 2010-05-01 00:51:04 UTC (rev 16606)
@@ -319,8 +319,7 @@
CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
jacobian.complete();
- double_array valsE;
- _lumpJacobian(&valsE);
+ const double* valsE = _data->valsJacobianLumped;
#if 0 // DEBUGGING
// TEMPORARY
@@ -516,28 +515,5 @@
} // for
} // _initialize
-// ----------------------------------------------------------------------
-// Compute lumped Jacobian matrix.
-void
-pylith::feassemble::TestElasticityExplicit::_lumpJacobian(
- double_array* jacobian)
-{ // _lumpJacobian
- assert(0 != jacobian);
- const double* jacobianFull = _data->valsJacobian;
- const int size = _data->numVertices * _data->spaceDim;
- jacobian->resize(size);
- const int spaceDim = _data->spaceDim;
- const int numBasis = _data->numVertices;
- for (int iBasis=0; iBasis < numBasis; ++iBasis)
- for (int iDim=0; iDim < spaceDim; ++iDim) {
- const int indexRow = (iBasis*spaceDim+iDim)*numBasis*spaceDim;
- double value = 0.0;
- for (int jBasis=0; jBasis < numBasis; ++jBasis)
- value += jacobianFull[indexRow + jBasis*spaceDim+iDim];
- (*jacobian)[iBasis*spaceDim+iDim] = value;
- } // for
-} // _lumpJacobian
-
-
// End of file
Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.hh 2010-05-01 00:46:21 UTC (rev 16605)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestElasticityExplicit.hh 2010-05-01 00:51:04 UTC (rev 16606)
@@ -123,12 +123,6 @@
ElasticityExplicit* const integrator,
topology::SolutionFields* const fields);
- /** Compute lumped Jacobian matrix.
- *
- * @param jacobian Lumped jacobian as an array.
- */
- void _lumpJacobian(double_array* jacobian);
-
}; // class TestElasticityExplicit
#endif // pylith_feassemble_testelasticityexplicit_hh
More information about the CIG-COMMITS
mailing list