[cig-commits] r8288 - short/3D/PyLith/trunk/tests/1d/line2

brad at geodynamics.org brad at geodynamics.org
Tue Nov 13 11:56:49 PST 2007


Author: brad
Date: 2007-11-13 11:56:48 -0800 (Tue, 13 Nov 2007)
New Revision: 8288

Added:
   short/3D/PyLith/trunk/tests/1d/line2/TestDislocationDyn.py
   short/3D/PyLith/trunk/tests/1d/line2/TestDislocationStatic.py
Removed:
   short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py
Modified:
   short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
   short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
   short/3D/PyLith/trunk/tests/1d/line2/dislocation_dyn.cfg
   short/3D/PyLith/trunk/tests/1d/line2/dislocation_static.cfg
   short/3D/PyLith/trunk/tests/1d/line2/testpylith.py
Log:
Setup running tests as test suite.

Modified: short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/Makefile.am	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/Makefile.am	2007-11-13 19:56:48 UTC (rev 8288)
@@ -16,24 +16,30 @@
 
 noinst_PYTHON = \
 	TestAxial.py \
-	TestDislocation.py
+	TestDislocationStatic.py \
+	TestDislocationDyn.py
 
 noinst_DATA = \
 	bar.mesh \
 	axialextension.cfg \
 	axialextension_disp.spatialdb \
 	dislocation_static.cfg \
+	dislocation_dyn.cfg \
 	dislocation_disp.spatialdb \
 	dislocation_slip.spatialdb \
 	dislocation_sliprate.spatialdb \
 	dislocation_sliptime.spatialdb \
+	dislocation_dyn_sliprate.spatialdb \
+	dislocation_dyn_sliptime.spatialdb \
 	matprops.spatialdb
 
 noinst_TMP = \
 	axialextension_t0.vtk \
 	axialextension_t1.vtk \
-	dislocation_t0.vtk \
-	dislocation_t1.vtk
+	dislocation_static_t0.vtk \
+	dislocation_static_t1.vtk \
+	dislocation_dyn_t0.vtk \
+	dislocation_dyn_t1.vtk
 
 
 TESTS_ENVIRONMENT = $(PYTHON)

Deleted: short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py	2007-11-13 19:56:48 UTC (rev 8288)
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-#                           Brad T. Aagaard
-#                        U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file tests/1d/line2/TestDislocation.py
-##
-## @brief Test suite for testing pylith with dislocation in 1-D mesh.
-
-import unittest
-import numpy
-import tables
-
-def run_pylith():
-  """
-  Run pylith.
-  """
-  if not "done" in dir(run_pylith):
-    from pylith.PyLithApp import PyLithApp
-    app = PyLithApp("dislocation_static")
-    app.run()
-    run_pylith.done = True
-  return
-
-
-class TestDislocation(unittest.TestCase):
-  """
-  Test suite for testing pylith with dislocation in 1-D mesh.
-  """
-
-  def setUp(self):
-    """
-    Setup for test.
-    """
-    run_pylith()
-    return
-
-
-  def test_disp(self):
-    """
-    Check displacement field.
-    """
-    return
-
-
-# End of file 

Added: short/3D/PyLith/trunk/tests/1d/line2/TestDislocationDyn.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestDislocationDyn.py	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestDislocationDyn.py	2007-11-13 19:56:48 UTC (rev 8288)
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/1d/line2/TestDislocationDyn.py
+##
+## @brief Test suite for testing pylith with dynamic dislocation in
+## 1-D mesh.
+
+import unittest
+#import numpy
+#import tables
+
+
+from pylith.PyLithApp import PyLithApp
+class Dislocation(PyLithApp):
+
+  def __init__(self):
+    PyLithApp.__init__(self, "dislocation_dyn")
+    return
+
+
+def run_pylith():
+  """
+  Run pylith.
+  """
+  if not "done" in dir(run_pylith):
+    app = Dislocation()
+    app.run()
+    run_pylith.done = True
+  return
+
+
+class TestDislocationDyn(unittest.TestCase):
+  """
+  Test suite for testing pylith with dynamic dislocation in 1-D mesh.
+  """
+
+  def setUp(self):
+    """
+    Setup for test.
+    """
+    run_pylith()
+    return
+
+
+  def test_disp(self):
+    """
+    Check displacement field.
+    """
+    return
+
+
+# End of file 

Copied: short/3D/PyLith/trunk/tests/1d/line2/TestDislocationStatic.py (from rev 8285, short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py)
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py	2007-11-13 01:18:16 UTC (rev 8285)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestDislocationStatic.py	2007-11-13 19:56:48 UTC (rev 8288)
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/1d/line2/TestDislocation.py
+##
+## @brief Test suite for testing pylith with static dislocation in 1-D
+## mesh.
+
+import unittest
+#import numpy
+#import tables
+
+
+from pylith.PyLithApp import PyLithApp
+class Dislocation(PyLithApp):
+
+  def __init__(self):
+    PyLithApp.__init__(self, "dislocation_static")
+    return
+
+
+def run_pylith():
+  """
+  Run pylith.
+  """
+  if not "done" in dir(run_pylith):
+    app = Dislocation()
+    app.run()
+    run_pylith.done = True
+  return
+
+
+class TestDislocationStatic(unittest.TestCase):
+  """
+  Test suite for testing pylith with static dislocation in 1-D mesh.
+  """
+
+  def setUp(self):
+    """
+    Setup for test.
+    """
+    run_pylith()
+    return
+
+
+  def test_disp(self):
+    """
+    Check displacement field.
+    """
+    return
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2007-11-13 19:56:48 UTC (rev 8288)
@@ -5,22 +5,21 @@
 # journal
 # ----------------------------------------------------------------------
 [axialextension.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature1d = 1
-fiatsimplex = 1
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#implicitelasticity = 1
+#quadrature1d = 1
+#fiatsimplex = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
 # ----------------------------------------------------------------------
 [axialextension.mesh_generator]
-debug = 1
+#debug = 1
 
 [axialextension.mesh_generator.importer]
 filename = bar.mesh

Modified: short/3D/PyLith/trunk/tests/1d/line2/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/dislocation_dyn.cfg	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/dislocation_dyn.cfg	2007-11-13 19:56:48 UTC (rev 8288)
@@ -1,36 +1,35 @@
 # -*- Python -*-
-[pylithapp]
+[dislocation_dyn]
 
 # ----------------------------------------------------------------------
 # journal
 # ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-implicitelasticity = 1
-quadrature1d = 1
-fiatsimplex = 1
-faultcohesivekin = 1
+[dislocation_dyn.journal.info]
+#timedependent = 1
+#explicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#explicitelasticity = 1
+#quadrature1d = 1
+#fiatsimplex = 1
+#faultcohesivekin = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
 # ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
+[dislocation_dyn.mesh_generator]
 #debug = 1
 
-[pylithapp.mesh_generator.importer]
+[dislocation_dyn.mesh_generator.importer]
 filename = bar.mesh
 coordsys.space_dim = 1
 
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------
-[pylithapp.timedependent]
+[dislocation_dyn.timedependent]
 total_time = 0.0175*s
 default_dt = 0.0001*s
 dimension = 1
@@ -42,10 +41,10 @@
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
+[dislocation_dyn.timedependent.materials]
 material = pylith.materials.ElasticStrain1D
 
-[pylithapp.timedependent.materials.material]
+[dislocation_dyn.timedependent.materials.material]
 label = elastic material
 id = 1
 db.iohandler.filename = matprops.spatialdb
@@ -56,7 +55,7 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.bc]
+[dislocation_dyn.timedependent.bc.bc]
 id = 10
 label = end points
 db.label = Absorbing BC
@@ -65,21 +64,20 @@
 quadrature.cell.shape = point
 quadrature.cell.quad_order = 1
 
-
 # ----------------------------------------------------------------------
 # faults
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
+[dislocation_dyn.timedependent.interfaces]
 fault = pylith.faults.FaultCohesiveKin
 
-[pylithapp.timedependent.interfaces.fault]
+[dislocation_dyn.timedependent.interfaces.fault]
 id = 20
 label = fault
 quadrature = pylith.feassemble.quadrature.Quadrature0D
 quadrature.cell.shape = point
 mat_db.iohandler.filename = matprops.spatialdb
 
-[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+[dislocation_dyn.timedependent.interfaces.fault.eq_src.slip_function]
 slip.iohandler.filename = dislocation_slip.spatialdb
 slip_rate.iohandler.filename = dislocation_dyn_sliprate.spatialdb
 slip_time.iohandler.filename = dislocation_dyn_sliptime.spatialdb
@@ -88,7 +86,7 @@
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
-[pylithapp.petsc]
+[dislocation_dyn.petsc]
 ksp_type = gmres
 pc_type = jacobi
 ksp_rtol = 1.0e-8
@@ -98,15 +96,14 @@
 #ksp_type = preonly
 #pc_jacobi_rowsum = 1
 
-log_summary = 1
-ksp_monitor = true
-ksp_view = true
-log_summary = true
+#ksp_monitor = true
+#ksp_view = true
+#log_summary = true
 
 
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output]
-filename = output/dislocation_dynvtk
+[dislocation_dyn.problem.formulation.output.output]
+filename = dislocation_dyn.vtk
 time_format = %08.6f

Modified: short/3D/PyLith/trunk/tests/1d/line2/dislocation_static.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/dislocation_static.cfg	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/dislocation_static.cfg	2007-11-13 19:56:48 UTC (rev 8288)
@@ -1,36 +1,35 @@
 # -*- Python -*-
-[pylithapp]
+[dislocation_static]
 
 # ----------------------------------------------------------------------
 # journal
 # ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-implicitelasticity = 1
-quadrature1d = 1
-fiatsimplex = 1
-faultcohesivekin = 1
+[dislocation_static.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#implicitelasticity = 1
+#quadrature1d = 1
+#fiatsimplex = 1
+#faultcohesivekin = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
 # ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
+[dislocation_static.mesh_generator]
+#debug = 1
 
-[pylithapp.mesh_generator.importer]
+[dislocation_static.mesh_generator.importer]
 filename = bar.mesh
 coordsys.space_dim = 1
 
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------
-[pylithapp.timedependent]
+[dislocation_static.timedependent]
 total_time = 0.0*s
 default_dt = 1.0*s
 dimension = 1
@@ -41,10 +40,10 @@
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
+[dislocation_static.timedependent.materials]
 material = pylith.materials.ElasticStrain1D
 
-[pylithapp.timedependent.materials.material]
+[dislocation_static.timedependent.materials.material]
 label = elastic material
 id = 1
 db.iohandler.filename = matprops.spatialdb
@@ -54,7 +53,7 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.bc]
+[dislocation_static.timedependent.bc.bc]
 fixed_dof = [0]
 id = 10
 label = end points
@@ -64,17 +63,17 @@
 # ----------------------------------------------------------------------
 # faults
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
+[dislocation_static.timedependent.interfaces]
 fault = pylith.faults.FaultCohesiveKin
 
-[pylithapp.timedependent.interfaces.fault]
+[dislocation_static.timedependent.interfaces.fault]
 id = 20
 label = fault
 quadrature = pylith.feassemble.quadrature.Quadrature0D
 quadrature.cell.shape = point
 mat_db.iohandler.filename = matprops.spatialdb
 
-[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+[dislocation_static.timedependent.interfaces.fault.eq_src.slip_function]
 slip.iohandler.filename = dislocation_slip.spatialdb
 slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
 slip_time.iohandler.filename = dislocation_sliptime.spatialdb
@@ -83,11 +82,11 @@
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
-[pylithapp.petsc]
+[dislocation_static.petsc]
 pc_type = jacobi
 
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output]
+[dislocation_static.problem.formulation.output.output]
 filename = dislocation_static.vtk

Modified: short/3D/PyLith/trunk/tests/1d/line2/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/testpylith.py	2007-11-13 18:55:28 UTC (rev 8287)
+++ short/3D/PyLith/trunk/tests/1d/line2/testpylith.py	2007-11-13 19:56:48 UTC (rev 8288)
@@ -23,9 +23,12 @@
   from TestAxial import TestAxial
   suite.addTest(unittest.makeSuite(TestAxial))
 
-  from TestDislocation import TestDislocation
-  suite.addTest(unittest.makeSuite(TestDislocation))
+  from TestDislocationStatic import TestDislocationStatic
+  suite.addTest(unittest.makeSuite(TestDislocationStatic))
 
+  from TestDislocationDyn import TestDislocationDyn
+  suite.addTest(unittest.makeSuite(TestDislocationDyn))
+
   return suite
 
 



More information about the cig-commits mailing list