[cig-commits] r11170 - in short/3D/PyLith/trunk: . unittests/pytests/materials

brad at geodynamics.org brad at geodynamics.org
Fri Feb 15 14:46:26 PST 2008


Author: brad
Date: 2008-02-15 14:46:25 -0800 (Fri, 15 Feb 2008)
New Revision: 11170

Added:
   short/3D/PyLith/trunk/unittests/pytests/materials/TestGenMaxwellIsotropic3D.py
Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py
   short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
Log:
Added Python tests for GenMaxwellIsotropic3D.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2008-02-15 22:11:44 UTC (rev 11169)
+++ short/3D/PyLith/trunk/TODO	2008-02-15 22:46:25 UTC (rev 11170)
@@ -5,14 +5,11 @@
 Release 1.1
 
   2. Reimplement SolutionIO [BRAD & MATT]
-     c. Implement output of Neumann information.
      e. Implement output of solution subset (ground surface).
         i. OutputSubdomain
      f. VertexFilterChangeCS
         i. OutputFilter for writing vertex coordinates in another 
            coordinate system.
-     a. Implement output of fault data.
-       Need to finish implementing output of traction_change.
      g. DataWriterHDF5
 
      Use Cases
@@ -76,16 +73,10 @@
          Solution field (time history)
 
   3. Optimization [BRAD]
-     a. Fault? (all parameters in one section over fault mesh)?
+     a. Fault?
      b. Absorbing BC?
      c. Neumann BC?
 
-  4. Dirichlet BC [BRAD]
-
-      DirichletBoundary
-
-  5. Generalized Maxwell viscoelastic model [CHARLES]
-
 General
 
   1. Need to add explanation of output and output parameters to

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am	2008-02-15 22:11:44 UTC (rev 11169)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am	2008-02-15 22:46:25 UTC (rev 11170)
@@ -27,6 +27,7 @@
 	TestElasticPlaneStress.py \
 	TestElasticStrain1D.py \
 	TestElasticStress1D.py \
+	TestGenMaxwellIsotropic3D.py \
 	TestHomogeneous.py \
 	TestMaterial.py \
 	TestMaxwellIsotropic3D.py

Added: short/3D/PyLith/trunk/unittests/pytests/materials/TestGenMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestGenMaxwellIsotropic3D.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestGenMaxwellIsotropic3D.py	2008-02-15 22:46:25 UTC (rev 11170)
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+## @file unittests/pytests/materials/TestGenMaxwellIsotropic3D.py
+
+## @brief Unit testing of GenMaxwellIsotropic3D object.
+
+import unittest
+
+from pylith.materials.GenMaxwellIsotropic3D import GenMaxwellIsotropic3D
+
+# ----------------------------------------------------------------------
+class TestGenMaxwellIsotropic3D(unittest.TestCase):
+  """
+  Unit testing of GenMaxwellIsotropic3D object.
+  """
+
+  def test_constructor(self):
+    """
+    Test constructor.
+    """
+    from pylith.materials.GenMaxwellIsotropic3D import GenMaxwellIsotropic3D
+    material = GenMaxwellIsotropic3D()
+    material._createCppHandle()
+    self.assertNotEqual(None, material.cppHandle)
+    return
+
+
+  def test_dimension(self):
+    """
+    Test dimension().
+    """
+    material = GenMaxwellIsotropic3D()
+    material._createCppHandle()
+    self.assertEqual(3, material.dimension)
+    return
+
+
+  def test_useElasticBehavior(self):
+    """
+    Test useElasticBehavior().
+    """
+    material = GenMaxwellIsotropic3D()
+    material._createCppHandle()
+    material.useElasticBehavior(False)
+    return
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py	2008-02-15 22:11:44 UTC (rev 11169)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestMaxwellIsotropic3D.py	2008-02-15 22:46:25 UTC (rev 11170)
@@ -45,9 +45,9 @@
     return
 
 
-  def test_useMaxwellBehavior(self):
+  def test_useElasticBehavior(self):
     """
-    Test useMaxwellBehavior().
+    Test useElasticBehavior().
     """
     material = MaxwellIsotropic3D()
     material._createCppHandle()

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py	2008-02-15 22:11:44 UTC (rev 11169)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py	2008-02-15 22:46:25 UTC (rev 11170)
@@ -77,6 +77,9 @@
     from TestMaxwellIsotropic3D import TestMaxwellIsotropic3D
     suite.addTest(unittest.makeSuite(TestMaxwellIsotropic3D))
 
+    from TestGenMaxwellIsotropic3D import TestGenMaxwellIsotropic3D
+    suite.addTest(unittest.makeSuite(TestGenMaxwellIsotropic3D))
+
     from TestHomogeneous import TestHomogeneous
     suite.addTest(unittest.makeSuite(TestHomogeneous))
 



More information about the cig-commits mailing list