[cig-commits] r7217 - in short/3D/PyLith/trunk: . tests/1d/line2
tests/1d/line3 tests/2d/quad4 tests/2d/tri3
brad at geodynamics.org
brad at geodynamics.org
Wed Jun 13 15:26:17 PDT 2007
Author: brad
Date: 2007-06-13 15:26:16 -0700 (Wed, 13 Jun 2007)
New Revision: 7217
Added:
short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py
short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py
short/3D/PyLith/trunk/tests/1d/line3/axialextension_disp.spatialdb
short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg
short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb
short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb
short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb
short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py
short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py
short/3D/PyLith/trunk/tests/2d/tri3/dislocation.cfg
short/3D/PyLith/trunk/tests/2d/tri3/dislocation_disp.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/dislocation_slip.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliprate.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliptime.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh
Removed:
short/3D/PyLith/trunk/tests/1d/line3/dispbc.spatialdb
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
short/3D/PyLith/trunk/tests/1d/line2/testpylith.py
short/3D/PyLith/trunk/tests/1d/line3/Makefile.am
short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg
short/3D/PyLith/trunk/tests/1d/line3/bar.mesh
short/3D/PyLith/trunk/tests/1d/line3/testpylith.py
short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py
short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
Log:
Added two cell tests for faults with tri3 and quad4 meshes. Faults work for 2-D meshes with one cohesive cell.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/TODO 2007-06-13 22:26:16 UTC (rev 7217)
@@ -6,9 +6,14 @@
Need to prevent multiple contributions of orientation information for
each vertex, because we want to use ADD_VALUES in updateOperator().
-tests/1d/line2
+ Make slip directions consistent (left-lateral, fault-opening) across
+ 0-D, 1-D, and 2-D. Need to adjust slip for 1-D (orient2D) to be
+ left-lateral instead of right lateral (p is lateral, q is out of
+ plane, r is normal in order to be consistent with 2-D faults).
- dislocation.cfg
+Dirichlet
+ Add check for overly constrained points.
+ (number of previously constrained DOF + number added <= fiberDim)
5. Additional unit tests
b. ElasticityExplicit and ElasticityImplicit
Modified: short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/Makefile.am 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line2/Makefile.am 2007-06-13 22:26:16 UTC (rev 7217)
@@ -15,7 +15,8 @@
check_SCRIPTS = testpylith.py
noinst_PYTHON = \
- TestAxial.py
+ TestAxial.py \
+ TestDislocation.py
noinst_DATA = \
bar.mesh \
Added: short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestDislocation.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,53 @@
+#!/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("dislocationextension")
+ 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
Modified: short/3D/PyLith/trunk/tests/1d/line2/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/testpylith.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line2/testpylith.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -23,6 +23,9 @@
from TestAxial import TestAxial
suite.addTest(unittest.makeSuite(TestAxial))
+ from TestDislocation import TestDislocation
+ suite.addTest(unittest.makeSuite(TestDislocation))
+
return suite
Modified: short/3D/PyLith/trunk/tests/1d/line3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/Makefile.am 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/Makefile.am 2007-06-13 22:26:16 UTC (rev 7217)
@@ -15,16 +15,23 @@
check_SCRIPTS = testpylith.py
noinst_PYTHON = \
- TestAxial.py
+ TestAxial.py \
+ TestDislocation.py
noinst_DATA = \
bar.mesh \
axialextension.cfg \
- dispbc.spatialdb \
+ axialextension_disp.spatialdb \
+ dislocation.cfg \
+ dislocation_disp.spatialdb \
+ dislocation_slip.spatialdb \
+ dislocation_sliprate.spatialdb \
+ dislocation_sliptime.spatialdb \
matprops.spatialdb
noinst_TMP = \
- output.vtk
+ axialextension.vtk \
+ dislocation.vtk
TESTS_ENVIRONMENT = $(PYTHON)
Added: short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/1d/line3/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("dislocationextension")
+ 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
Modified: short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg 2007-06-13 22:26:16 UTC (rev 7217)
@@ -58,10 +58,16 @@
id = 10
label = end points
db.label = Dirichlet BC
-db.iohandler.filename = dispbc.spatialdb
+db.iohandler.filename = axialextension_disp.spatialdb
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
[pylithapp.petsc]
pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = axialextension.vtk
Copied: short/3D/PyLith/trunk/tests/1d/line3/axialextension_disp.spatialdb (from rev 7201, short/3D/PyLith/trunk/tests/1d/line3/dispbc.spatialdb)
Modified: short/3D/PyLith/trunk/tests/1d/line3/bar.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/bar.mesh 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/bar.mesh 2007-06-13 22:26:16 UTC (rev 7217)
@@ -24,12 +24,20 @@
}
}
group = {
+ name = end points
type = vertices
- name = end points
count = 2
indices = {
0
4
}
}
+ group = {
+ name = fault
+ type = vertices
+ count = 1
+ indices = {
+ 2
+ }
+ }
}
Added: short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,93 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# 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
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = bar.mesh
+coordsys.space_dim = 1
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 1
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCSingle
+interfaces = pylith.faults.SingleFault
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticStrain1D
+
+[pylithapp.timedependent.materials.material]
+label = elastic material
+id = 1
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature1D
+quadrature.cell.shape = line
+quadrature.cell.degree = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.bc]
+fixed_dof = [0]
+id = 10
+label = end points
+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.Quadrature0D
+quadrature.cell.shape = point
+
+[pylithapp.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
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation.vtk
Added: short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = dof-0
+ value-units = m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+0.0 0.0
Added: short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = slip
+ value-units = m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+0.0 1.0
Added: short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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 = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+0.0 1.0e+6
Added: short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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 = 1
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 1
+ }
+}
+0.0 -1.0
Deleted: short/3D/PyLith/trunk/tests/1d/line3/dispbc.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dispbc.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/dispbc.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-0
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 1
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 1
- }
-}
-0.0 -0.2
-4.0 +0.2
Modified: short/3D/PyLith/trunk/tests/1d/line3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/testpylith.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/1d/line3/testpylith.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -23,6 +23,9 @@
from TestAxial import TestAxial
suite.addTest(unittest.makeSuite(TestAxial))
+ from TestDislocation import TestDislocation
+ suite.addTest(unittest.makeSuite(TestDislocation))
+
return suite
Modified: short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am 2007-06-13 22:26:16 UTC (rev 7217)
@@ -15,22 +15,32 @@
check_SCRIPTS = testpylith.py
noinst_PYTHON = \
- TestAxialPlaneStrain.py
+ TestAxialPlaneStrain.py \
+ TestShearPlaneStrain.py \
+ TestDislocation.py
noinst_DATA = \
box.exo \
+ twocells.mesh \
+ matprops.spatialdb \
axialplanestrain.cfg \
+ axialx.spatialdb \
+ axialy.spatialdb \
shearplanestrain.cfg \
shearplanestrain_free.cfg \
shearplanestrain_xfixed.cfg \
- axialx.spatialdb \
- axialy.spatialdb \
shearxy.spatialdb \
- matprops.spatialdb
+ dislocation.cfg \
+ dislocation_disp.spatialdb \
+ dislocation_sliprate.spatialdb \
+ dislocation_slip.spatialdb \
+ dislocation_sliptime.spatialdb
noinst_TMP = \
- axialplanestrain.vtk \
- shearplanestrain.vtk
+ axialplanestrain_t0.vtk \
+ axialplanestrain_t1.vtk \
+ shearplanestrain_t0.vtk \
+ shearplanestrain_t1.vtk
TESTS_ENVIRONMENT = $(PYTHON)
Added: short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/quad4/TestDislocation.py
+##
+## @brief Test suite for testing pylith with shear dislocation for 2-D
+## box.
+
+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("shearplanestrain")
+ app.run()
+ run_pylith.done = True
+ return
+
+
+class TestDislocation(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear dislocation for 2-D box.
+ """
+
+ 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/2d/quad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,103 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# 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
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = twocells.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCTwoSides
+interfaces = pylith.faults.SingleFault
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.material]
+label = elastic material
+id = 0
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.neg]
+fixed_dof = [0]
+id = 10
+label = x_neg
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = linear
+
+[pylithapp.timedependent.bc.pos]
+fixed_dof = [0]
+id = 11
+label = x_pos
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = linear
+
+
+# ----------------------------------------------------------------------
+# 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
+
+[pylithapp.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
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation.vtk
Added: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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/quad4/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = 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/quad4/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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 1.0e+6
Added: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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.0 -1.0
Modified: short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/testpylith.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -23,6 +23,12 @@
from TestAxialPlaneStrain import TestAxialPlaneStrain
suite.addTest(unittest.makeSuite(TestAxialPlaneStrain))
+ from TestShearPlaneStrain import TestShearPlaneStrain
+ suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
+
+ from TestDislocation import TestDislocation
+ suite.addTest(unittest.makeSuite(TestDislocation))
+
return suite
Added: short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,55 @@
+mesh = {
+ dimension = 2
+ use-index-zero = true
+ vertices = {
+ dimension = 2
+ count = 6
+ coordinates = {
+ 0 -2.0 -1.0
+ 1 -2.0 1.0
+ 2 0.0 -1.0
+ 3 0.0 1.0
+ 4 2.0 -1.0
+ 5 2.0 1.0
+ }
+ }
+ cells = {
+ count = 2
+ num-corners = 4
+ simplices = {
+ 0 0 2 3 1
+ 1 4 5 3 2
+ }
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+ group = {
+ name = fault
+ type = vertices
+ count = 2
+ indices = {
+ 2
+ 3
+ }
+ }
+ group = {
+ name = x_neg
+ type = vertices
+ count = 2
+ indices = {
+ 0
+ 1
+ }
+ }
+ group = {
+ name = x_pos
+ type = vertices
+ count = 2
+ indices = {
+ 4
+ 5
+ }
+ }
+}
Modified: short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2007-06-13 22:26:16 UTC (rev 7217)
@@ -15,19 +15,32 @@
check_SCRIPTS = testpylith.py
noinst_PYTHON = \
- TestAxialPlaneStrain.py
+ TestAxialPlaneStrain.py \
+ TestShearPlaneStrain.py \
+ TestDislocation.py
noinst_DATA = \
box.exo \
+ twocells.mesh \
+ matprops.spatialdb \
axialplanestrain.cfg \
- shearplanestrain.cfg \
axialx.spatialdb \
axialy.spatialdb \
+ shearplanestrain.cfg \
shearxy.spatialdb \
- matprops.spatialdb
+ dislocation.cfg \
+ dislocation_disp.spatialdb \
+ dislocation_sliprate.spatialdb \
+ dislocation_slip.spatialdb \
+ dislocation_sliptime.spatialdb
noinst_TMP = \
- axialplanestrain.vtk
+ axialplanestrain_t0.vtk \
+ axialplanestrain_t1.vtk \
+ shearplanestrain_t0.vtk \
+ shearplanestrain_t1.vtk \
+ dislocation_t0.vtk \
+ dislocation_t1.vtk
TESTS_ENVIRONMENT = $(PYTHON)
Added: short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/tri3/TestDislocationPlaneStrain.py
+##
+## @brief Test suite for testing pylith with shear dislocation for 2-D
+## box.
+
+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")
+ app.run()
+ run_pylith.done = True
+ return
+
+
+class TestDislocationPlaneStrain(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear dislocation for 2-D box.
+ """
+
+ 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/2d/tri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dislocation.cfg 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dislocation.cfg 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,92 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# 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
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = twocells.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCSingle
+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
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.bc]
+fixed_dof = [0]
+id = 10
+label = end points
+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
+
+[pylithapp.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
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation.vtk
Added: short/3D/PyLith/trunk/tests/2d/tri3/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dislocation_disp.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dislocation_disp.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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/tri3/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dislocation_slip.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dislocation_slip.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = 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/tri3/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliprate.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliprate.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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 1.0e+6
Added: short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliptime.spatialdb 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dislocation_sliptime.spatialdb 2007-06-13 22:26:16 UTC (rev 7217)
@@ -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.0 -1.0
Modified: short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2007-06-13 22:26:16 UTC (rev 7217)
@@ -26,6 +26,9 @@
from TestShearPlaneStrain import TestShearPlaneStrain
suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
+ from TestDislocation import TestDislocation
+ suite.addTest(unittest.makeSuite(TestDislocation))
+
return suite
Added: short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh 2007-06-13 20:58:32 UTC (rev 7216)
+++ short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh 2007-06-13 22:26:16 UTC (rev 7217)
@@ -0,0 +1,43 @@
+mesh = {
+ dimension = 2
+ vertices = {
+ dimension = 2
+ count = 4
+ coordinates = {
+ 0 -1.0 0.0
+ 1 0.0 1.0
+ 2 0.0 -1.0
+ 3 1.0 0.0
+ }
+ }
+ cells = {
+ num-corners = 3
+ count = 2
+ simplices = {
+ 0 0 2 1
+ 1 1 2 3
+ }
+ material-ids = {
+ 0 1
+ 1 1
+ }
+ }
+ group = {
+ type = vertices
+ name = fault
+ count = 2
+ indices = {
+ 1
+ 2
+ }
+ }
+ group = {
+ type = vertices
+ name = end points
+ count = 2
+ indices = {
+ 0
+ 3
+ }
+ }
+}
More information about the cig-commits
mailing list