[cig-commits] r8291 - in short/3D/PyLith/trunk/tests/2d: . bar_quad4 bar_tri3

brad at geodynamics.org brad at geodynamics.org
Tue Nov 13 14:44:54 PST 2007


Author: brad
Date: 2007-11-13 14:44:54 -0800 (Tue, 13 Nov 2007)
New Revision: 8291

Added:
   short/3D/PyLith/trunk/tests/2d/bar_quad4/
   short/3D/PyLith/trunk/tests/2d/bar_quad4/Makefile.am
   short/3D/PyLith/trunk/tests/2d/bar_quad4/README
   short/3D/PyLith/trunk/tests/2d/bar_quad4/bar.mesh
   short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg
   short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliprate.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_quad4/matprops.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_quad4/testpylith.py
   short/3D/PyLith/trunk/tests/2d/bar_tri3/
   short/3D/PyLith/trunk/tests/2d/bar_tri3/Makefile.am
   short/3D/PyLith/trunk/tests/2d/bar_tri3/README
   short/3D/PyLith/trunk/tests/2d/bar_tri3/bar.mesh
   short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg
   short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliprate.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_tri3/matprops.spatialdb
   short/3D/PyLith/trunk/tests/2d/bar_tri3/testpylith.py
Log:
Added test cases for dynamic dislocation with small bar with tri3 or quad4 cells.

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/Makefile.am	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/Makefile.am	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,48 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+TESTS = testpylith.py
+
+check_SCRIPTS = testpylith.py
+
+noinst_PYTHON = \
+	TestDislocationDyn.py
+
+noinst_DATA = \
+	bar.mesh \
+	dislocation_dyn.cfg \
+	dislocation_slip.spatialdb \
+	dislocation_dyn_sliprate.spatialdb \
+	dislocation_dyn_sliptime.spatialdb \
+	matprops.spatialdb
+
+noinst_TMP = \
+	dislocation_dyn_*.vtk
+
+
+TESTS_ENVIRONMENT = $(PYTHON)
+
+
+# 'export' the input files by performing a mock install
+export_datadir = $(top_builddir)/tests/2d/bar_quad4
+export-data: $(noinst_PYTHON) $(noinst_DATA)
+	for f in $(noinst_PYTHON) $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+
+BUILT_SOURCES = export-data
+
+CLEANFILES = \
+	$(export_datadir)/$(noinst_PYTHON) \
+	$(export_datadir)/$(noinst_DATA) \
+	$(export_datadir)/$(noinst_TMP)
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/README	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/README	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,27 @@
+2-D dynamic shear dislocation in bar with quad4 cells.
+
+
+1 ----- 3 ----- 5 ----- 7 ----- 9
+|       |       |       |       |
+|       |       |       |       |
+|   0   |   1   |   2   |   3   |
+|       |       |       |       |
+|       |       |       |       |
+0 ----- 2 ----- 4 ----- 6 ----- 8
+
+
+Vertex   Coordinates
+  0        -400.0  -100.0
+  1        -400.0  +100.0
+  2        -200.0  -100.0
+  3        -200.0  +100.0
+  4           0.0  -100.0
+  5           0.0  +100.0
+  6        +200.0  -100.0
+  7        +200.0  +100.0
+  8        +400.0  -100.0
+  9        +400.0  +100.0
+
+Absorbing boundary conditions at x = +-400.0.
+
+Kinematic fault condition at x = 0.0.

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/bar.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/bar.mesh	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/bar.mesh	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,60 @@
+mesh = {
+  dimension = 2
+  vertices = {
+    dimension = 2
+    count = 10
+    coordinates = {
+      0  -400.0  -100.0
+      1  -400.0  +100.0
+      2  -200.0  -100.0
+      3  -200.0  +100.0
+      4     0.0  -100.0
+      5     0.0  +100.0
+      6  +200.0  -100.0
+      7  +200.0  +100.0
+      8  +400.0  -100.0
+      9  +400.0  +100.0
+    }
+  }
+  cells = {
+    num-corners = 4
+    count = 4
+    simplices = {
+      0    1  0  2  3
+      1    3  2  4  5
+      2    5  4  6  7
+      3    7  6  8  9
+    }
+    material-ids = {
+      0   1
+      1   1
+      2   1
+      3   1
+    }
+  }
+  group = {
+    name = end points
+    type = vertices
+    count = 4
+    indices = {
+      0  1
+      8  9
+    }
+  }
+  group = {
+    name = fault
+    type = vertices
+    count = 2
+    indices = {
+      4  5
+    }
+  }
+  group = {
+    name = sides
+    type = vertices
+    count = 8
+    indices = {
+      0  1  2  3  6  7  8  9
+    }
+  }
+}

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_disp.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_disp.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  dof-0  dof-1
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   0.0  0.0

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,121 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+explicitelasticity = 1
+quadrature2d = 1
+fiatlagrange = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+#debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = bar.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 2.0*s
+default_dt = 0.0125*s
+dimension = 2
+formulation = pylith.problems.Explicit
+#formulation.solver.initial_guess_zero = False
+bc = pylith.bc.BCTwoSides
+bc.pos = pylith.bc.AbsorbingDampers
+interfaces = pylith.faults.SingleFault
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.material]
+label = elastic material
+id = 1
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.pos]
+id = 10
+label = end points
+db.label = Absorbing BC
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.neg]
+fixed_dof = [0]
+id = 11
+label = sides
+db.label = Dirichlet BC
+db.iohandler.filename = dislocation_disp.spatialdb
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+id = 20
+label = fault
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+mat_db.iohandler.filename = matprops.spatialdb
+
+[pylithapp.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
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_type = gmres
+pc_type = jacobi
+ksp_rtol = 1.0e-8
+ksp_max_it = 50
+ksp_gmres_restart = 10
+
+#ksp_type = preonly
+#pc_jacobi_rowsum = 1
+
+ksp_monitor = true
+ksp_view = true
+log_summary = true
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = output/dislocation_dyn.vtk
+time_format = %05.3f

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliprate.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliprate.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0    4.0

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0   0.075

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_slip.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_slip.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  left-lateral-slip  fault-opening
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   1.0  0.0

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/matprops.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/matprops.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  density vs vp
+  value-units =  kg/m^3  m/s  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/2d/bar_quad4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/testpylith.py	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/testpylith.py	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+__requires__ = "PyLith"
+
+import unittest
+
+def suite():
+  """
+  Create test suite.
+  """
+  suite = unittest.TestSuite()
+
+  from TestAxial import TestAxial
+  suite.addTest(unittest.makeSuite(TestAxial))
+
+  from TestDislocationStatic import TestDislocationStatic
+  suite.addTest(unittest.makeSuite(TestDislocationStatic))
+
+  from TestDislocationDyn import TestDislocationDyn
+  suite.addTest(unittest.makeSuite(TestDislocationDyn))
+
+  return suite
+
+
+def main():
+  """
+  Run test suite.
+  """
+  unittest.TextTestRunner(verbosity=2).run(suite())
+  return
+
+
+# ----------------------------------------------------------------------
+if __name__ == '__main__':
+  main()
+
+  
+# End of file 


Property changes on: short/3D/PyLith/trunk/tests/2d/bar_quad4/testpylith.py
___________________________________________________________________
Name: svn:executable
   + *

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/Makefile.am	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/Makefile.am	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,48 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+TESTS = testpylith.py
+
+check_SCRIPTS = testpylith.py
+
+noinst_PYTHON = \
+	TestDislocationDyn.py
+
+noinst_DATA = \
+	bar.mesh \
+	dislocation_dyn.cfg \
+	dislocation_slip.spatialdb \
+	dislocation_dyn_sliprate.spatialdb \
+	dislocation_dyn_sliptime.spatialdb \
+	matprops.spatialdb
+
+noinst_TMP = \
+	dislocation_dyn_*.vtk
+
+
+TESTS_ENVIRONMENT = $(PYTHON)
+
+
+# 'export' the input files by performing a mock install
+export_datadir = $(top_builddir)/tests/2d/bar_quad4
+export-data: $(noinst_PYTHON) $(noinst_DATA)
+	for f in $(noinst_PYTHON) $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+
+BUILT_SOURCES = export-data
+
+CLEANFILES = \
+	$(export_datadir)/$(noinst_PYTHON) \
+	$(export_datadir)/$(noinst_DATA) \
+	$(export_datadir)/$(noinst_TMP)
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/README	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/README	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,27 @@
+2-D dynamic shear dislocation in bar with tri3 cells.
+
+
+1 ----- 3 ----- 5 ----- 7 ----- 9
+| \     |     / | \     |     / |
+|  \    |    /  |  \    |    /  |
+|   \   |   /   |   \   |   /   |
+|    \  |  /    |    \  |  /    |
+|     \ | /     |     \ | /     |
+0 ----- 2 ----- 4 ----- 6 ----- 8
+
+
+Vertex   Coordinates
+  0        -400.0  -100.0
+  1        -400.0  +100.0
+  2        -200.0  -100.0
+  3        -200.0  +100.0
+  4           0.0  -100.0
+  5           0.0  +100.0
+  6        +200.0  -100.0
+  7        +200.0  +100.0
+  8        +400.0  -100.0
+  9        +400.0  +100.0
+
+Absorbing boundary conditions at x = +-400.0.
+
+Kinematic fault condition at x = 0.0.

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/bar.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/bar.mesh	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/bar.mesh	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,68 @@
+mesh = {
+  dimension = 2
+  vertices = {
+    dimension = 2
+    count = 10
+    coordinates = {
+      0  -400.0  -100.0
+      1  -400.0  +100.0
+      2  -200.0  -100.0
+      3  -200.0  +100.0
+      4     0.0  -100.0
+      5     0.0  +100.0
+      6  +200.0  -100.0
+      7  +200.0  +100.0
+      8  +400.0  -100.0
+      9  +400.0  +100.0
+    }
+  }
+  cells = {
+    num-corners = 3
+    count = 8
+    simplices = {
+      0    1  0  2
+      1    2  3  1
+      2    3  2  5
+      3    2  4  5
+      4    5  4  6
+      5    6  7  5
+      6    9  7  6
+      7    6  8  9
+    }
+    material-ids = {
+      0   1
+      1   1
+      2   1
+      3   1 
+      4   1
+      5   1
+      6   1
+      7   1 
+   }
+  }
+  group = {
+    name = end points
+    type = vertices
+    count = 4
+    indices = {
+      0  1
+      8  9
+    }
+  }
+  group = {
+    name = fault
+    type = vertices
+    count = 2
+    indices = {
+      4  5
+    }
+  }
+  group = {
+    name = sides
+    type = vertices
+    count = 8
+    indices = {
+      0  1  2  3  6  7  8  9
+    }
+  }
+}

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_disp.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_disp.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  dof-0  dof-1
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   0.0  0.0

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,118 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+explicitelasticity = 1
+quadrature2d = 1
+fiatsimplex = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+#debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = bar.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 2.0*s
+default_dt = 0.0125*s
+dimension = 2
+formulation = pylith.problems.Explicit
+#formulation.solver.initial_guess_zero = False
+bc = pylith.bc.BCTwoSides
+bc.pos = pylith.bc.AbsorbingDampers
+interfaces = pylith.faults.SingleFault
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.material]
+label = elastic material
+id = 1
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2D
+quadrature.cell.shape = triangle
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.pos]
+id = 10
+label = end points
+db.label = Absorbing BC
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell.shape = line
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.neg]
+fixed_dof = [0]
+id = 11
+label = sides
+db.label = Dirichlet BC
+db.iohandler.filename = dislocation_disp.spatialdb
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+id = 20
+label = fault
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell.shape = line
+quadrature.cell.quad_order = 2
+mat_db.iohandler.filename = matprops.spatialdb
+
+[pylithapp.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
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_type = gmres
+pc_type = jacobi
+ksp_rtol = 1.0e-8
+ksp_max_it = 50
+ksp_gmres_restart = 10
+
+#ksp_type = preonly
+#pc_jacobi_rowsum = 1
+
+ksp_monitor = true
+ksp_view = true
+log_summary = true
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = output/dislocation_dyn.vtk
+time_format = %05.3f

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliprate.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliprate.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0    4.0

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0   0.075

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_slip.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_slip.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  left-lateral-slip  fault-opening
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   1.0  0.0

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/matprops.spatialdb	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/matprops.spatialdb	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  density vs vp
+  value-units =  kg/m^3  m/s  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/2d/bar_tri3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/testpylith.py	2007-11-13 22:01:52 UTC (rev 8290)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/testpylith.py	2007-11-13 22:44:54 UTC (rev 8291)
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+__requires__ = "PyLith"
+
+import unittest
+
+def suite():
+  """
+  Create test suite.
+  """
+  suite = unittest.TestSuite()
+
+  from TestAxial import TestAxial
+  suite.addTest(unittest.makeSuite(TestAxial))
+
+  from TestDislocationStatic import TestDislocationStatic
+  suite.addTest(unittest.makeSuite(TestDislocationStatic))
+
+  from TestDislocationDyn import TestDislocationDyn
+  suite.addTest(unittest.makeSuite(TestDislocationDyn))
+
+  return suite
+
+
+def main():
+  """
+  Run test suite.
+  """
+  unittest.TextTestRunner(verbosity=2).run(suite())
+  return
+
+
+# ----------------------------------------------------------------------
+if __name__ == '__main__':
+  main()
+
+  
+# End of file 


Property changes on: short/3D/PyLith/trunk/tests/2d/bar_tri3/testpylith.py
___________________________________________________________________
Name: svn:executable
   + *



More information about the cig-commits mailing list