[cig-commits] r6925 -
short/3D/PyLith/trunk/unittests/pytests/feassemble
brad at geodynamics.org
brad at geodynamics.org
Fri May 18 11:54:30 PDT 2007
Author: brad
Date: 2007-05-18 11:54:27 -0700 (Fri, 18 May 2007)
New Revision: 6925
Added:
short/3D/PyLith/trunk/unittests/pytests/feassemble/TestImplicitElasticity.py
Modified:
short/3D/PyLith/trunk/unittests/pytests/feassemble/testfeassemble.py
Log:
Started implementing unit tests for ImplicitElasticity.
Added: short/3D/PyLith/trunk/unittests/pytests/feassemble/TestImplicitElasticity.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestImplicitElasticity.py 2007-05-18 18:37:57 UTC (rev 6924)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestImplicitElasticity.py 2007-05-18 18:54:27 UTC (rev 6925)
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+## @file unittests/pytests/feassemble/TestImplicitElasticity.py
+
+## @brief Unit testing of Python ImplicitElasticity object.
+
+import unittest
+from pylith.feassemble.ImplicitElasticity import ImplicitElasticity
+
+# ----------------------------------------------------------------------
+class TestImplicitElasticity(unittest.TestCase):
+ """
+ Unit testing of Python ImplicitElasticity object.
+ """
+
+ def test_initQuadrature(self):
+ """
+ Test initQuadrature().
+ """
+ from pylith.feassemble.quadrature.Quadrature2D import Quadrature2D
+ q = Quadrature2D()
+ minJacobian = 4.0e-02;
+ q.minJacobian = minJacobian
+ from pylith.feassemble.FIATSimplex import FIATSimplex
+ q.cell = FIATSimplex()
+ q.cell.shape = "triangle"
+ q.cell.order = 1
+ q.cell.degree = 1
+
+ integrator = ImplicitElasticity()
+ integrator.initQuadrature(q)
+ self.assertEqual(minJacobian, integrator.quadrature.minJacobian)
+ return
+
+
+# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/feassemble/testfeassemble.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/testfeassemble.py 2007-05-18 18:37:57 UTC (rev 6924)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/testfeassemble.py 2007-05-18 18:54:27 UTC (rev 6925)
@@ -62,6 +62,9 @@
from TestExplicitElasticity import TestExplicitElasticity
suite.addTest(unittest.makeSuite(TestExplicitElasticity))
+ from TestImplicitElasticity import TestImplicitElasticity
+ suite.addTest(unittest.makeSuite(TestImplicitElasticity))
+
return suite
More information about the cig-commits
mailing list