[cig-commits] r7055 - 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
Sun Jun 3 19:45:37 PDT 2007
Author: brad
Date: 2007-06-03 19:45:37 -0700 (Sun, 03 Jun 2007)
New Revision: 7055
Added:
short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/TestShearPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/axialy.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/tri3/shearxy.spatialdb
Removed:
short/3D/PyLith/trunk/tests/2d/tri3/dispx.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/dispy.spatialdb
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/tests/1d/line2/TestAxial.py
short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py
short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
short/3D/PyLith/trunk/tests/2d/tri3/README
short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
Log:
Setup shear tests for 2d tri3 and quad4 cells.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/TODO 2007-06-04 02:45:37 UTC (rev 7055)
@@ -6,9 +6,8 @@
Replace specific object bins with ObjectBin.
-C++ unit test
- Dirichlet
- test with no fixedDOF
+Update Dirichlet BC to allow mixing different Dirichlet BC for the
+same points.
1. Simple tests with analytical solutions
Modified: short/3D/PyLith/trunk/tests/1d/line2/TestAxial.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestAxial.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestAxial.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -10,7 +10,7 @@
# ----------------------------------------------------------------------
#
-## @file tests/TestAxial.py
+## @file tests/1d/line2/TestAxial.py
##
## @brief Test suite for testing pylith with 1-D axial extension.
Modified: short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -10,7 +10,7 @@
# ----------------------------------------------------------------------
#
-## @file tests/TestAxial.py
+## @file tests/1d/line3/TestAxial.py
##
## @brief Test suite for testing pylith with 1-D axial extension.
Modified: short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -10,7 +10,7 @@
# ----------------------------------------------------------------------
#
-## @file tests/TestAxialPlaneStrain.py
+## @file tests/2d/quad4/TestAxialPlaneStrain.py
##
## @brief Test suite for testing pylith with axial extension in
## y-direction for 2-D box.
Added: short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/quad4/TestShearPlaneStrain.py
+##
+## @brief Test suite for testing pylith with shear in y-direction 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 TestShearPlaneStrain(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear in y-direction 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/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,95 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+explicitelasticity = 1
+quadrature2d = 1
+fiatlagrange = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+importer = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.importer]
+filename = box.exo
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+formulation = pylith.problems.Implicit
+bc = bcbox
+
+# ----------------------------------------------------------------------
+# 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
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_minus]
+fixed_dof = [0, 1]
+id = 10
+label = 10
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = shearxy.spatialdb
+
+[pylithapp.timedependent.bc.x_plus]
+fixed_dof = [0, 1]
+id = 11
+label = 11
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = shearxy.spatialdb
+
+#[pylithapp.timedependent.bc.y_minus]
+#fixed_dof = []
+#id = 13
+#label = 13
+#db.label = Dirichlet BC -y edge
+#db.iohandler.filename = shearxy.spatialdb
+
+#[pylithapp.timedependent.bc.y_plus]
+#fixed_dof = []
+#id = 12
+#label = 12
+#db.label = Dirichlet BC +y edge
+#db.iohandler.filename = shearxy.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = shearplanestrain.vtk
Added: short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-0 dof-1
+ value-units = m m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+-250.0 0.0 0.0 -1.0
++250.0 0.0 0.0 +1.0
Modified: short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2007-06-04 02:45:37 UTC (rev 7055)
@@ -21,8 +21,8 @@
box.exo \
axialplanestrain.cfg \
bcbox.odb \
- dispx.spatialdb \
- dispy.spatialdb \
+ axialx.spatialdb \
+ axialy.spatialdb \
matprops.spatialdb
noinst_TMP = \
Modified: short/3D/PyLith/trunk/tests/2d/tri3/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/README 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/README 2007-06-04 02:45:37 UTC (rev 7055)
@@ -1,3 +1,7 @@
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
2-D axial compression test with linear triangular cells.
-250 <= x <= +250
@@ -4,14 +8,14 @@
-250 <= y <= +250
- -1.0 m
- ----------
- | |
- 0.0 m | |
- | |
- | |
- ----------
- +1.0 m
+ y=-1.0 m
+ ----------
+ | |
+x=0.0 m | |
+ | |
+ | |
+ ----------
+ y=+1.0 m
Dirichlet boundary conditions
Ux(0,y) = 0.0
@@ -21,3 +25,33 @@
Analytical solution
Ux(x,y) = 0
Uy(x,y) = -0.004 * y
+
+
+======================================================================
+SHEAR
+======================================================================
+
+2-D shear test with linear triangular cells.
+
+-250 <= x <= +250
+-250 <= y <= +250
+
+
+ ----------
+ | |
+y=-1.0 m | | y=+1.0m
+ | |
+ | |
+ ----------
+
+
+Dirichlet boundary conditions
+ Ux( 0,y) = 0.0
+ Uy( 0,y) = -1.0 m
+ Ux(+250,y) = 0.0
+ Uy(+250,y) = +1.0 m
+
+Analytical solution
+ Ux(x,y) = 0
+ Uy(x,y) = -0.004 * x
+
Modified: short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -10,7 +10,7 @@
# ----------------------------------------------------------------------
#
-## @file tests/TestAxialPlaneStrain.py
+## @file tests/2d/tri3/TestAxialPlaneStrain.py
##
## @brief Test suite for testing pylith with axial extension in
## y-direction for 2-D box.
Added: short/3D/PyLith/trunk/tests/2d/tri3/TestShearPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/TestShearPlaneStrain.py 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/TestShearPlaneStrain.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/tri3/TestShearPlaneStrain.py
+##
+## @brief Test suite for testing pylith with shear in y-direction 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 TestShearPlaneStrain(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear in y-direction for 2-D box.
+ """
+
+ 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/2d/tri3/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2007-06-04 02:45:37 UTC (rev 7055)
@@ -58,28 +58,28 @@
id = 10
label = 10
db.label = Dirichlet BC -x edge
-db.iohandler.filename = dispx.spatialdb
+db.iohandler.filename = axialx.spatialdb
[pylithapp.timedependent.bc.x_plus]
-fixed_dof = [0]
+fixed_dof = []
id = 11
label = 11
db.label = Dirichlet BC +x edge
-db.iohandler.filename = dispx.spatialdb
+db.iohandler.filename = axialx.spatialdb
[pylithapp.timedependent.bc.y_minus]
fixed_dof = [1]
id = 13
label = 13
db.label = Dirichlet BC -y edge
-db.iohandler.filename = dispy.spatialdb
+db.iohandler.filename = axialy.spatialdb
[pylithapp.timedependent.bc.y_plus]
fixed_dof = [1]
id = 12
label = 12
db.label = Dirichlet BC +y edge
-db.iohandler.filename = dispy.spatialdb
+db.iohandler.filename = axialy.spatialdb
# ----------------------------------------------------------------------
# PETSc
Copied: short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb (from rev 7053, short/3D/PyLith/trunk/tests/2d/tri3/dispx.spatialdb)
Copied: short/3D/PyLith/trunk/tests/2d/tri3/axialy.spatialdb (from rev 7053, short/3D/PyLith/trunk/tests/2d/tri3/dispy.spatialdb)
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/dispx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dispx.spatialdb 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dispx.spatialdb 2007-06-04 02:45:37 UTC (rev 7055)
@@ -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 = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--250.0 0.0 0.0
-+250.0 0.0 0.0
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/dispy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/dispy.spatialdb 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/dispy.spatialdb 2007-06-04 02:45:37 UTC (rev 7055)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-1
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
-0.0 -250.0 +1.0
-0.0 +250.0 -1.0
Added: short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,94 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+explicitelasticity = 1
+quadrature2d = 1
+fiatsimplex = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+importer = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.importer]
+filename = box.exo
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+formulation = pylith.problems.Implicit
+bc = bcbox
+
+# ----------------------------------------------------------------------
+# 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.x_minus]
+fixed_dof = [0, 1]
+id = 10
+label = 10
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = shearxy.spatialdb
+
+[pylithapp.timedependent.bc.x_plus]
+fixed_dof = [0, 1]
+id = 11
+label = 11
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = shearxy.spatialdb
+
+#[pylithapp.timedependent.bc.y_minus]
+#fixed_dof = []
+#id = 13
+#label = 13
+#db.label = Dirichlet BC -y edge
+#db.iohandler.filename = shearxy.spatialdb
+
+#[pylithapp.timedependent.bc.y_plus]
+#fixed_dof = []
+#id = 12
+#label = 12
+#db.label = Dirichlet BC +y edge
+#db.iohandler.filename = shearxy.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = shearplanestrain.vtk
Added: short/3D/PyLith/trunk/tests/2d/tri3/shearxy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/shearxy.spatialdb 2007-06-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/shearxy.spatialdb 2007-06-04 02:45:37 UTC (rev 7055)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 2
+ value-names = dof-0 dof-1
+ value-units = m m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 2
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 2
+ }
+}
+-250.0 0.0 0.0 -1.0
++250.0 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-04 02:10:17 UTC (rev 7054)
+++ short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2007-06-04 02:45:37 UTC (rev 7055)
@@ -23,6 +23,9 @@
from TestAxialPlaneStrain import TestAxialPlaneStrain
suite.addTest(unittest.makeSuite(TestAxialPlaneStrain))
+ from TestShearPlaneStrain import TestShearPlaneStrain
+ suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
+
return suite
More information about the cig-commits
mailing list