[cig-commits] r7205 - in short/3D/PyLith/trunk: . tests/3d/hex8
tests/3d/tet4
brad at geodynamics.org
brad at geodynamics.org
Wed Jun 13 10:54:06 PDT 2007
Author: brad
Date: 2007-06-13 10:54:06 -0700 (Wed, 13 Jun 2007)
New Revision: 7205
Added:
short/3D/PyLith/trunk/tests/3d/hex8/README
short/3D/PyLith/trunk/tests/3d/hex8/TestShearElasticIsotropic.py
short/3D/PyLith/trunk/tests/3d/tet4/TestShearElasticIsotropic.py
short/3D/PyLith/trunk/tests/3d/tet4/shearelasticisotropic.cfg
short/3D/PyLith/trunk/tests/3d/tet4/shearxyz.spatialdb
Modified:
short/3D/PyLith/trunk/Makefile.am
short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py
short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am
short/3D/PyLith/trunk/tests/3d/tet4/README
short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py
Log:
Updated README files for 3d tests. Added shear test for tet4 cells.
Modified: short/3D/PyLith/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/Makefile.am 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/Makefile.am 2007-06-13 17:54:06 UTC (rev 7205)
@@ -20,8 +20,10 @@
if ENABLE_TESTING
SUBDIRS += \
- unittests \
- tests
+ unittests
+
+# Can't run tests without being able to 'rename' PyLith app.
+# tests
endif
if ENABLE_DOCUMENTATION
Added: short/3D/PyLith/trunk/tests/3d/hex8/README
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/README 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/hex8/README 2007-06-13 17:54:06 UTC (rev 7205)
@@ -0,0 +1,61 @@
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
+3-D axial compression test with trilinear hexahedral cells.
+
+-200 m <= x <= +200 m
+-200 m <= y <= +200 m
+-200 m <= z <= +200 m
+
+
+ Uz=-1.0 m
+ ----------
+ | |
+Ux=0.0 m | | x=0.0 m
+Uy=0.0 m | | y=0.0 m
+ | |
+ ----------
+ Uz=+0.0 m
+
+Dirichlet boundary conditions
+ Ux(+-200,0,0) = 0.0 m
+ Uy(0,+-200,0) = 0.0 m
+ Uz(0,0,+200) = -1.0 m
+ Uz(0,0,-200) = 0.0 m
+
+Analytical solution
+ Ux(x,y,z) = 0
+ Uy(x,y,z) = 0
+ Uz(x,y,z) = -0.0025 * (z + 200)
+
+
+======================================================================
+SHEAR
+======================================================================
+
+3-D shear test with trilinear hexahedral cells.
+
+-200 m <= x <= +200 m
+-200 m <= y <= +200 m
+-200 m <= z <= +200 m
+
+
+ ----------
+ | |
+Ux= 0.0 m | | Ux= 0.0m
+Uy=-1.0 m | | Uy=+1.0m
+Uz= 0.0 m | | Uz= 0.0m
+ ----------
+
+
+Dirichlet boundary conditions
+ Ux(+-200,0,0) = 0.0 m
+ Uy( -200,0,0) = -1.0 m
+ Uy( +200,0,0) = +1.0 m
+ Uz(+-200,0,0) = 0.0 m
+
+Analytical solution
+ Ux(x,y,z) = 0.0
+ Uy(x,y,z) = -0.004 * x
+ Uz(x,y,z) = -1.0 + 0.005 * (x + 200)
Added: short/3D/PyLith/trunk/tests/3d/hex8/TestShearElasticIsotropic.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/TestShearElasticIsotropic.py 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/hex8/TestShearElasticIsotropic.py 2007-06-13 17:54:06 UTC (rev 7205)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/3d/tet4/TestShearElasticIsotropic.py
+##
+## @brief Test suite for testing pylith with shear in y-direction for
+## 3-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("shearelasticisotropic")
+ app.run()
+ run_pylith.done = True
+ return
+
+
+class TestShearElasticIsotropic(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear in y-direction for 3-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/3d/hex8/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py 2007-06-13 17:54:06 UTC (rev 7205)
@@ -23,6 +23,9 @@
from TestAxialElasticIsotropic import TestAxialElasticIsotropic
suite.addTest(unittest.makeSuite(TestAxialElasticIsotropic))
+ from TestShearElasticIsotropic import TestShearElasticIsotropic
+ suite.addTest(unittest.makeSuite(TestShearElasticIsotropic))
+
return suite
Modified: short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am 2007-06-13 17:54:06 UTC (rev 7205)
@@ -15,7 +15,8 @@
check_SCRIPTS = testpylith.py
noinst_PYTHON = \
- TestAxialElasticIsotropic.py
+ TestAxialElasticIsotropic.py \
+ TestShearElasticIsotropic.py
noinst_DATA = \
box.exo \
@@ -23,6 +24,8 @@
axialx.spatialdb \
axialy.spatialdb \
axialz.spatialdb \
+ shearelasticisotropic.cfg \
+ shearxyz.spatialdb \
matprops.spatialdb
noinst_TMP = \
Modified: short/3D/PyLith/trunk/tests/3d/tet4/README
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/README 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/README 2007-06-13 17:54:06 UTC (rev 7205)
@@ -4,28 +4,30 @@
3-D axial compression test with linear tetrahedral cells.
--200 <= x <= +200
--200 <= y <= +200
+-200 m <= x <= +200 m
+-200 m <= y <= +200 m
+-200 m <= z <= +200 m
- z=-1.0 m
- ----------
- | |
-x=0.0 m | | x=0.0 m
-y=0.0 m | | y=0.0 m
- | |
- ----------
- z=+0.0 m
+ Uz=-1.0 m
+ ----------
+ | |
+Ux=0.0 m | | x=0.0 m
+Uy=0.0 m | | y=0.0 m
+ | |
+ ----------
+ Uz=+0.0 m
Dirichlet boundary conditions
- Ux(0,y) = 0.0
- Uy(x,-250) = +1.0 m
- Uy(x,+250) = -1.0 m
+ Ux(+-200,0,0) = 0.0 m
+ Uy(0,+-200,0) = 0.0 m
+ Uz(0,0,+200) = -1.0 m
+ Uz(0,0,-200) = 0.0 m
Analytical solution
- Ux(x,y) = 0
- Uy(x,y) = 0
- Uz(x,y) = -0.004 * y
+ Ux(x,y,z) = 0
+ Uy(x,y,z) = 0
+ Uz(x,y,z) = -0.0025 * (z + 200)
======================================================================
@@ -34,25 +36,26 @@
3-D shear test with linear tetrahedral cells.
--250 <= x <= +250
--250 <= y <= +250
+-200 m <= x <= +200 m
+-200 m <= y <= +200 m
+-200 m <= z <= +200 m
- ----------
- | |
-y=-1.0 m | | y=+1.0m
- | |
- | |
- ----------
+ ----------
+ | |
+Ux= 0.0 m | | Ux= 0.0m
+Uy=-1.0 m | | Uy=+1.0m
+Uz= 0.0 m | | Uz= 0.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
+ Ux(+-200,0,0) = 0.0 m
+ Uy( -200,0,0) = -1.0 m
+ Uy( +200,0,0) = +1.0 m
+ Uz(+-200,0,0) = 0.0 m
Analytical solution
- Ux(x,y) = 0
- Uy(x,y) = -0.004 * x
-
+ Ux(x,y,z) = 0.0
+ Uy(x,y,z) = -0.004 * x
+ Uz(x,y,z) = -1.0 + 0.005 * (x + 200)
Added: short/3D/PyLith/trunk/tests/3d/tet4/TestShearElasticIsotropic.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/TestShearElasticIsotropic.py 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/TestShearElasticIsotropic.py 2007-06-13 17:54:06 UTC (rev 7205)
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/3d/tet4/TestShearElasticIsotropic.py
+##
+## @brief Test suite for testing pylith with shear in
+## y-direction for 3-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("axialelasticisotropic")
+ app.run()
+ run_pylith.done = True
+ return
+
+
+class TestShearElasticIsotropic(unittest.TestCase):
+ """
+ Test suite for testing pylith with shear in y-direction for 3-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/3d/tet4/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/shearelasticisotropic.cfg 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/shearelasticisotropic.cfg 2007-06-13 17:54:06 UTC (rev 7205)
@@ -0,0 +1,80 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+implicitelasticity = 1
+quadrature3d = 1
+fiatsimplex = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+importer = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.importer]
+filename = box.exo
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 3
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCSixSides
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticIsotropic3D
+
+[pylithapp.timedependent.materials.material]
+label = elastic material
+id = 1
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell.shape = tetrahedron
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0, 1, 2]
+id = 3
+label = 3
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = shearxyz.spatialdb
+
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0, 1, 2]
+id = 4
+label = 4
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = shearxyz.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = shearelasticisotropic.vtk
Added: short/3D/PyLith/trunk/tests/3d/tet4/shearxyz.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/shearxyz.spatialdb 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/shearxyz.spatialdb 2007-06-13 17:54:06 UTC (rev 7205)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
++200.0 0.0 0.0 0.0 +1.0 0.0
+-200.0 0.0 0.0 0.0 -1.0 0.0
Modified: short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py 2007-06-13 17:41:17 UTC (rev 7204)
+++ short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py 2007-06-13 17:54:06 UTC (rev 7205)
@@ -23,6 +23,9 @@
from TestAxialElasticIsotropic import TestAxialElasticIsotropic
suite.addTest(unittest.makeSuite(TestAxialElasticIsotropic))
+ from TestShearElasticIsotropic import TestShearElasticIsotropic
+ suite.addTest(unittest.makeSuite(TestShearElasticIsotropic))
+
return suite
More information about the cig-commits
mailing list