[cig-commits] r7074 - in short/3D/PyLith/trunk: pylith/bc pylith/feassemble pylith/problems tests/2d/quad4 tests/2d/tri3 tests/3d/hex8 tests/3d/tet4 unittests/libtests/materials unittests/libtests/meshio/data unittests/pytests/feassemble

brad at geodynamics.org brad at geodynamics.org
Tue Jun 5 16:29:27 PDT 2007


Author: brad
Date: 2007-06-05 16:29:26 -0700 (Tue, 05 Jun 2007)
New Revision: 7074

Added:
   short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb
   short/3D/PyLith/trunk/tests/3d/hex8/TestAxialElasticIsotropic.py
   short/3D/PyLith/trunk/tests/3d/hex8/axialelasticisotropic.cfg
   short/3D/PyLith/trunk/tests/3d/hex8/axialx.spatialdb
   short/3D/PyLith/trunk/tests/3d/hex8/axialy.spatialdb
   short/3D/PyLith/trunk/tests/3d/hex8/axialz.spatialdb
   short/3D/PyLith/trunk/tests/3d/hex8/box.cub
   short/3D/PyLith/trunk/tests/3d/hex8/box.exo
   short/3D/PyLith/trunk/tests/3d/hex8/matprops.spatialdb
   short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py
   short/3D/PyLith/trunk/tests/3d/tet4/README
   short/3D/PyLith/trunk/tests/3d/tet4/TestAxialElasticIsotropic.py
   short/3D/PyLith/trunk/tests/3d/tet4/axialelasticisotropic.cfg
   short/3D/PyLith/trunk/tests/3d/tet4/axialx.spatialdb
   short/3D/PyLith/trunk/tests/3d/tet4/axialy.spatialdb
   short/3D/PyLith/trunk/tests/3d/tet4/axialz.spatialdb
   short/3D/PyLith/trunk/tests/3d/tet4/box.cub
   short/3D/PyLith/trunk/tests/3d/tet4/box.exo
   short/3D/PyLith/trunk/tests/3d/tet4/matprops.spatialdb
   short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py
Removed:
   short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb
   short/3D/PyLith/trunk/tests/2d/quad4/dispx.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4/dispy.spatialdb
   short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb
Modified:
   short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
   short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
   short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
   short/3D/PyLith/trunk/pylith/problems/BCPrism.py
   short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py
   short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
   short/3D/PyLith/trunk/tests/2d/quad4/README
   short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg
   short/3D/PyLith/trunk/tests/2d/quad4/box.cub
   short/3D/PyLith/trunk/tests/2d/quad4/box.exo
   short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg
   short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
   short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
   short/3D/PyLith/trunk/tests/2d/tri3/box.cub
   short/3D/PyLith/trunk/tests/2d/tri3/box.exo
   short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg
   short/3D/PyLith/trunk/tests/3d/hex8/Makefile.am
   short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
   short/3D/PyLith/trunk/unittests/libtests/meshio/data/twoquad4.cub
   short/3D/PyLith/trunk/unittests/libtests/meshio/data/twoquad4.exo
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATLagrange.py
Log:
Fixed ordering of quads and hexes in FIATLagrange. Started setting up 3-D hex and tet tests (axial compression).

Modified: short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -81,13 +81,13 @@
     """
     Initialize boundary condition.
     """
-    assert(None != self.cppHandle)
-    self.db.initialize()
-    self.cppHandle.id = self.id
-    self.cppHandle.label = self.label
-    self.cppHandle.db = self.db.cppHandle    
-    self.mesh = mesh
-    self.cppHandle.initialize(mesh.cppHandle, mesh.coordsys.cppHandle)
+    if None != self.cppHandle:
+      self.db.initialize()
+      self.cppHandle.id = self.id
+      self.cppHandle.label = self.label
+      self.cppHandle.db = self.db.cppHandle    
+      self.mesh = mesh
+      self.cppHandle.initialize(mesh.cppHandle, mesh.coordsys.cppHandle)
     return
 
 
@@ -104,4 +104,13 @@
     return
 
   
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def boundary_condition():
+  """
+  Factory associated with BoundaryCondition.
+  """
+  return BoundaryCondition()
+
+  
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/bc/Dirichlet.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/Dirichlet.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/pylith/bc/Dirichlet.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -103,5 +103,14 @@
     self.fixedDOF = self.inventory.fixedDOF
     return
 
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def boundary_condition():
+  """
+  Factory associated with Dirichlet.
+  """
+  return Dirichlet()
+
   
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -101,48 +101,54 @@
     self.numCorners = numBasisFns**dim
 
     if dim == 1:
-      self.quadPts    = quadpts
-      self.quadWts    = quadwts
-      self.basis      = basis
+      self.quadPts = quadpts
+      self.quadWts = quadwts
+      self.basis = basis
       self.basisDeriv = basisDeriv
     else:
       if dim == 2:
-        self.quadPts    = numpy.zeros((numQuadPts, numQuadPts, dim))
-        self.quadWts    = numpy.zeros((numQuadPts, numQuadPts))
-        self.basis      = numpy.zeros((numQuadPts, numQuadPts, numBasisFns, numBasisFns))
-        self.basisDeriv = numpy.zeros((numQuadPts, numQuadPts, numBasisFns, numBasisFns, dim))
+        self.quadPts = numpy.zeros((numQuadPts, numQuadPts, dim))
+        self.quadWts = numpy.zeros((numQuadPts, numQuadPts))
+        self.basis = numpy.zeros((numQuadPts, numQuadPts,
+                                       numBasisFns, numBasisFns))
+        self.basisDeriv = numpy.zeros((numQuadPts, numQuadPts,
+                                       numBasisFns, numBasisFns, dim))
         for q in range(numQuadPts):
           for r in range(numQuadPts):
-            self.quadPts[q][r][0] = quadpts[q]
-            self.quadPts[q][r][1] = quadpts[r]
-            self.quadWts[q][r]    = quadwts[q]*quadwts[r]
+            self.quadPts[q][r][0] = quadpts[r]
+            self.quadPts[q][r][1] = quadpts[q]
+            self.quadWts[q][r] = quadwts[r]*quadwts[q]
             for f in range(numBasisFns):
               for g in range(numBasisFns):
-                self.basis[q][r][f][g]         = basis[q][f]*basis[r][g]
-                self.basisDeriv[q][r][f][g][0] = basisDeriv[q][f][0]*basis[r][g]
-                self.basisDeriv[q][r][f][g][1] = basis[q][f]*basisDeriv[r][g][0]
+                self.basis[q][r][f][g] = basis[r][g]*basis[q][f]
+                self.basisDeriv[q][r][f][g][0] = basisDeriv[r][g][0]*basis[q][f]
+                self.basisDeriv[q][r][f][g][1] = basis[r][g]*basisDeriv[q][f][0]
       elif dim == 3:
-        self.quadPts    = numpy.zeros((numQuadPts, numQuadPts, numQuadPts, dim))
+        self.quadPts    = numpy.zeros((numQuadPts, numQuadPts,
+                                       numQuadPts, dim))
         self.quadWts    = numpy.zeros((numQuadPts, numQuadPts, numQuadPts))
-        self.basis      = numpy.zeros((numQuadPts, numQuadPts, numQuadPts, numBasisFns, numBasisFns, numBasisFns))
-        self.basisDeriv = numpy.zeros((numQuadPts, numQuadPts, numQuadPts, numBasisFns, numBasisFns, numBasisFns, dim))
+        self.basis      = numpy.zeros((numQuadPts, numQuadPts, numQuadPts,
+                                       numBasisFns, numBasisFns, numBasisFns))
+        self.basisDeriv = numpy.zeros((numQuadPts, numQuadPts, numQuadPts,
+                                       numBasisFns, numBasisFns, numBasisFns,
+                                       dim))
         for q in range(numQuadPts):
           for r in range(numQuadPts):
             for s in range(numQuadPts):
-              self.quadPts[q][r][s][0] = quadpts[q]
+              self.quadPts[q][r][s][0] = quadpts[s]
               self.quadPts[q][r][s][1] = quadpts[r]
-              self.quadPts[q][r][s][2] = quadpts[s]
-              self.quadWts[q][r][s]    = quadwts[q]*quadwts[r]*quadwts[s]
+              self.quadPts[q][r][s][2] = quadpts[q]
+              self.quadWts[q][r][s]    = quadwts[s]*quadwts[r]*quadwts[q]
               for f in range(numBasisFns):
                 for g in range(numBasisFns):
                   for h in range(numBasisFns):
-                    self.basis[q][r][s][f][g][h]         = basis[q][f]*basis[r][g]*basis[s][h]
-                    self.basisDeriv[q][r][s][f][g][h][0] = basisDeriv[q][f][0]*basis[r][g]*basis[s][h]
-                    self.basisDeriv[q][r][s][f][g][h][1] = basis[q][f]*basisDeriv[r][g][0]*basis[s][h]
-                    self.basisDeriv[q][r][s][f][g][h][2] = basis[q][f]*basis[r][g]*basisDeriv[s][h][0]
-      self.quadPts    = numpy.reshape(self.quadPts,    (self.numQuadPts, dim))
-      self.quadWts    = numpy.reshape(self.quadWts,    (self.numQuadPts))
-      self.basis      = numpy.reshape(self.basis,      (self.numQuadPts, self.numCorners))
+                    self.basis[q][r][s][f][g][h] = basis[s][h]*basis[r][g]*basis[q][f]
+                    self.basisDeriv[q][r][s][f][g][h][0] = basisDeriv[s][h][0]*basis[r][g]*basis[q][f]
+                    self.basisDeriv[q][r][s][f][g][h][1] = basis[s][h]*basisDeriv[r][g][0]*basis[q][f]
+                    self.basisDeriv[q][r][s][f][g][h][2] = basis[s][h]*basis[r][g]*basisDeriv[q][f][0]
+      self.quadPts = numpy.reshape(self.quadPts, (self.numQuadPts, dim))
+      self.quadWts = numpy.reshape(self.quadWts, (self.numQuadPts))
+      self.basis = numpy.reshape(self.basis, (self.numQuadPts, self.numCorners))
       self.basisDeriv = numpy.reshape(self.basisDeriv, (self.numQuadPts, self.numCorners, dim))
     self._info.line("Basis (quad pts):")
     self._info.line(self.basis)

Modified: short/3D/PyLith/trunk/pylith/problems/BCPrism.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/BCPrism.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/pylith/problems/BCPrism.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -54,7 +54,6 @@
     import pyre.inventory
     
     from pylith.bc.Dirichlet import Dirichlet
-    from pylith.bc.BoundaryCondition import BoundaryCondition
 
     xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
                                    factory=Dirichlet)
@@ -73,7 +72,7 @@
     yNeg.meta['tip'] = "Boundary condition on -y face of prism."
 
     zPos = pyre.inventory.facility("z_pos", family="boundary_condition",
-                                   factory=BoundaryCondition)
+                                   factory=Dirichlet)
     zPos.meta['tip'] = "Boundary condition on +z face of prism."
 
     zNeg = pyre.inventory.facility("z_neg", family="boundary_condition",
@@ -98,12 +97,12 @@
     Set attributes from inventory.
     """
     ObjectBin._configure(self)
-    self.bc = [self.inventory.xPos,
-               self.inventory.xNeg,
-               self.inventory.yPos,
-               self.inventory.yNeg,
-               self.inventory.zPos,
-               self.inventory.zNeg]
+    self.bin = [self.inventory.xPos,
+                self.inventory.xNeg,
+                self.inventory.yPos,
+                self.inventory.yNeg,
+                self.inventory.zPos,
+                self.inventory.zNeg]
     return
 
   

Modified: short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -52,7 +52,6 @@
     import pyre.inventory
     
     from pylith.bc.Dirichlet import Dirichlet
-    from pylith.bc.BoundaryCondition import BoundaryCondition
 
     xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
                                    factory=Dirichlet)
@@ -63,7 +62,7 @@
     xNeg.meta['tip'] = "Boundary condition on -x face of prism."
 
     yPos = pyre.inventory.facility("y_pos", family="boundary_condition",
-                                   factory=BoundaryCondition)
+                                   factory=Dirichlet)
     yPos.meta['tip'] = "Boundary condition on +y face of prism."
 
     yNeg = pyre.inventory.facility("y_neg", family="boundary_condition",
@@ -88,10 +87,10 @@
     Set attributes from inventory.
     """
     ObjectBin._configure(self)
-    self.bc = [self.inventory.xPos,
-               self.inventory.xNeg,
-               self.inventory.yPos,
-               self.inventory.yNeg]
+    self.bin = [self.inventory.xPos,
+                self.inventory.xNeg,
+                self.inventory.yPos,
+                self.inventory.yNeg]
     return
 
   

Modified: short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am	2007-06-05 23:29:26 UTC (rev 7074)
@@ -20,13 +20,15 @@
 noinst_DATA = \
 	box.exo \
 	axialplanestrain.cfg \
-	bcbox.odb \
-	dispx.spatialdb \
-	dispy.spatialdb \
+	shearplanestrain.cfg \
+	axialx.spatialdb \
+	axialy.spatialdb \
+	shearxy.spatialdb \
 	matprops.spatialdb
 
 noinst_TMP = \
-	axialplanestrain.vtk
+	axialplanestrain.vtk \
+	shearplanestrain.vtk
 
 
 TESTS_ENVIRONMENT = $(PYTHON)

Modified: short/3D/PyLith/trunk/tests/2d/quad4/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/README	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/README	2007-06-05 23:29:26 UTC (rev 7074)
@@ -1,3 +1,7 @@
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
 2-D axial compression test with linear quadrilateral 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,32 @@
 Analytical solution
   Ux(x,y) = 0
   Uy(x,y) = -0.004 * y
+
+
+======================================================================
+SHEAR
+======================================================================
+
+2-D shear test with linear quadrilateral 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/quad4/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -35,7 +35,7 @@
 default_dt = 1.0*s
 dimension = 2
 formulation = pylith.problems.Implicit
-bc = bcbox
+bc = pylith.problems.BCQuadrilateral
 
 # ----------------------------------------------------------------------
 # materials
@@ -54,34 +54,34 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_minus]
+[pylithapp.timedependent.bc.x_neg]
 fixed_dof = [0]
 id = 10
 label = 10
 db.label = Dirichlet BC -x edge
 db.iohandler.filename = dispx.spatialdb
 
-[pylithapp.timedependent.bc.x_plus]
+[pylithapp.timedependent.bc.x_pos]
 fixed_dof = [0]
 id = 11
 label = 11
 db.label = Dirichlet BC +x edge
 db.iohandler.filename = dispx.spatialdb
 
-[pylithapp.timedependent.bc.y_minus]
+[pylithapp.timedependent.bc.y_pos]
 fixed_dof = [1]
+id = 12
+label = 12
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = dispy.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
 id = 13
 label = 13
 db.label = Dirichlet BC -y edge
 db.iohandler.filename = dispy.spatialdb
 
-[pylithapp.timedependent.bc.y_plus]
-fixed_dof = [1]
-id = 12
-label = 12
-db.label = Dirichlet BC +y edge
-db.iohandler.filename = dispy.spatialdb
-
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------

Copied: short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb (from rev 7066, short/3D/PyLith/trunk/tests/2d/quad4/dispx.spatialdb)

Copied: short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb (from rev 7066, short/3D/PyLith/trunk/tests/2d/quad4/dispy.spatialdb)

Deleted: short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-#                           Brad T. Aagaard
-#                        U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCBox class
-class BCBox(ObjectBin):
-  """
-  Python boundary conditions container for box with four boundary conditions.
-
-  Factory: boundary_conditions
-  """
-
-  # INVENTORY //////////////////////////////////////////////////////////
-
-  class Inventory(ObjectBin.Inventory):
-    """
-    Python object for managing BCBox facilities and properties.
-    """
-    
-    ## @class Inventory
-    ## Python object for managing BCBox facilities and properties.
-    ##
-    ## \b Properties
-    ## @li None
-    ##
-    ## \b Facilities
-    ## @li \b bc Boundary condition.
-
-    import pyre.inventory
-    
-    from pylith.bc.Dirichlet import Dirichlet
-
-    xm = pyre.inventory.facility("x_minus", family="boundary_condition",
-                                 factory=Dirichlet)
-    xm.meta['tip'] = "Boundary condition on -x edge."
-
-    xp = pyre.inventory.facility("x_plus", family="boundary_condition",
-                                 factory=Dirichlet)
-    xp.meta['tip'] = "Boundary condition on +x edge."
-
-    ym = pyre.inventory.facility("y_minus", family="boundary_condition",
-                                 factory=Dirichlet)
-    ym.meta['tip'] = "Boundary condition on -y edge."
-
-    yp = pyre.inventory.facility("y_plus", family="boundary_condition",
-                                 factory=Dirichlet)
-    yp.meta['tip'] = "Boundary condition on +y edge."
-
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="bcbox"):
-    """
-    Constructor.
-    """
-    ObjectBin.__init__(self, name)
-    return
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set attributes from inventory.
-    """
-    ObjectBin._configure(self)
-    self.bin = [self.inventory.xm,
-                self.inventory.xp,
-                self.inventory.ym,
-                self.inventory.yp]
-    return
-
-  
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
-  """
-  Factory associated with BCBox.
-  """
-  return BCBox()
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/tests/2d/quad4/box.cub
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/tests/2d/quad4/box.exo
===================================================================
(Binary files differ)

Deleted: short/3D/PyLith/trunk/tests/2d/quad4/dispx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dispx.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dispx.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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/quad4/dispy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dispy.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dispy.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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

Modified: short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -35,7 +35,7 @@
 default_dt = 1.0*s
 dimension = 2
 formulation = pylith.problems.Implicit
-bc = bcbox
+bc = pylith.problems.BCQuadrilateral
 
 # ----------------------------------------------------------------------
 # materials
@@ -54,34 +54,20 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_minus]
+[pylithapp.timedependent.bc.x_neg]
 fixed_dof = [0, 1]
 id = 10
 label = 10
 db.label = Dirichlet BC -x edge
 db.iohandler.filename = shearxy.spatialdb
 
-[pylithapp.timedependent.bc.x_plus]
+[pylithapp.timedependent.bc.x_pos]
 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
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am	2007-06-05 23:29:26 UTC (rev 7074)
@@ -20,9 +20,10 @@
 noinst_DATA = \
 	box.exo \
 	axialplanestrain.cfg \
-	bcbox.odb \
+	shearplanestrain.cfg \
 	axialx.spatialdb \
 	axialy.spatialdb \
+	shearxy.spatialdb \
 	matprops.spatialdb
 
 noinst_TMP = \

Modified: short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -12,7 +12,7 @@
 solverlinear = 1
 meshioascii = 1
 homogeneous = 1
-explicitelasticity = 1
+implicitelasticity = 1
 quadrature2d = 1
 fiatsimplex = 1
 
@@ -35,7 +35,7 @@
 default_dt = 1.0*s
 dimension = 2
 formulation = pylith.problems.Implicit
-bc = bcbox
+bc = pylith.problems.BCQuadrilateral
 
 # ----------------------------------------------------------------------
 # materials
@@ -53,34 +53,34 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_minus]
+[pylithapp.timedependent.bc.x_neg]
 fixed_dof = [0]
 id = 10
 label = 10
 db.label = Dirichlet BC -x edge
 db.iohandler.filename = axialx.spatialdb
 
-[pylithapp.timedependent.bc.x_plus]
-fixed_dof = []
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0]
 id = 11
 label = 11
 db.label = Dirichlet BC +x edge
 db.iohandler.filename = axialx.spatialdb
 
-[pylithapp.timedependent.bc.y_minus]
+[pylithapp.timedependent.bc.y_pos]
 fixed_dof = [1]
+id = 12
+label = 12
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = axialy.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
 id = 13
 label = 13
 db.label = Dirichlet BC -y edge
 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 = axialy.spatialdb
-
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------

Deleted: short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-#                           Brad T. Aagaard
-#                        U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCBox class
-class BCBox(ObjectBin):
-  """
-  Python boundary conditions container for box with four boundary conditions.
-
-  Factory: boundary_conditions
-  """
-
-  # INVENTORY //////////////////////////////////////////////////////////
-
-  class Inventory(ObjectBin.Inventory):
-    """
-    Python object for managing BCBox facilities and properties.
-    """
-    
-    ## @class Inventory
-    ## Python object for managing BCBox facilities and properties.
-    ##
-    ## \b Properties
-    ## @li None
-    ##
-    ## \b Facilities
-    ## @li \b bc Boundary condition.
-
-    import pyre.inventory
-    
-    from pylith.bc.Dirichlet import Dirichlet
-
-    xm = pyre.inventory.facility("x_minus", family="boundary_condition",
-                                 factory=Dirichlet)
-    xm.meta['tip'] = "Boundary condition on -x edge."
-
-    xp = pyre.inventory.facility("x_plus", family="boundary_condition",
-                                 factory=Dirichlet)
-    xp.meta['tip'] = "Boundary condition on +x edge."
-
-    ym = pyre.inventory.facility("y_minus", family="boundary_condition",
-                                 factory=Dirichlet)
-    ym.meta['tip'] = "Boundary condition on -y edge."
-
-    yp = pyre.inventory.facility("y_plus", family="boundary_condition",
-                                 factory=Dirichlet)
-    yp.meta['tip'] = "Boundary condition on +y edge."
-
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="bcbox"):
-    """
-    Constructor.
-    """
-    ObjectBin.__init__(self, name)
-    return
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set attributes from inventory.
-    """
-    ObjectBin._configure(self)
-    self.bin = [self.inventory.xm,
-                self.inventory.xp,
-                self.inventory.ym,
-                self.inventory.yp]
-    return
-
-  
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
-  """
-  Factory associated with BCBox.
-  """
-  return BCBox()
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/tests/2d/tri3/box.cub
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/tests/2d/tri3/box.exo
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/2d/tri3/shearplanestrain.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -35,7 +35,7 @@
 default_dt = 1.0*s
 dimension = 2
 formulation = pylith.problems.Implicit
-bc = bcbox
+bc = pylith.problems.BCQuadrilateral
 
 # ----------------------------------------------------------------------
 # materials
@@ -53,34 +53,20 @@
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_minus]
+[pylithapp.timedependent.bc.x_neg]
 fixed_dof = [0, 1]
 id = 10
 label = 10
 db.label = Dirichlet BC -x edge
 db.iohandler.filename = shearxy.spatialdb
 
-[pylithapp.timedependent.bc.x_plus]
+[pylithapp.timedependent.bc.x_pos]
 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
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/Makefile.am	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/Makefile.am	2007-06-05 23:29:26 UTC (rev 7074)
@@ -15,13 +15,33 @@
 check_SCRIPTS = testpylith.py
 
 noinst_PYTHON = \
-	TestAxial.py
+	TestAxialElasticIsotropic.py
 
+noinst_DATA = \
+	box.exo \
+	axialelasticisotropic.cfg \
+	axialx.spatialdb \
+	axialy.spatialdb \
+	axialz.spatialdb \
+	matprops.spatialdb
 
-CLEANFILES = \
-	output.vtk
+noinst_TMP = \
+	axialelasticisotropic.vtk
 
+
 TESTS_ENVIRONMENT = $(PYTHON)
 
 
+# 'export' the input files by performing a mock install
+export_datadir = $(top_builddir)/tests/3d/hex8
+export-data: $(noinst_DATA)
+	for f in $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+
+BUILT_SOURCES = export-data
+
+CLEANFILES = \
+	$(export_datadir)/$(noinst_DATA) \
+	$(export_datadir)/$(noinst_TMP)
+
+
 # End of file 

Added: short/3D/PyLith/trunk/tests/3d/hex8/TestAxialElasticIsotropic.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/TestAxialElasticIsotropic.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/TestAxialElasticIsotropic.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/3d/tet4/TestAxialElasticIsotropic.py
+##
+## @brief Test suite for testing pylith with axial compresison in
+## z-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 TestAxialElasticIsotropic(unittest.TestCase):
+  """
+  Test suite for testing pylith with axial compression in z-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/hex8/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/axialelasticisotropic.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/axialelasticisotropic.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,109 @@
+# -*- 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.problems.BCPrism
+
+# ----------------------------------------------------------------------
+# 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 = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.z_pos]
+fixed_dof = [2]
+id = 1
+label = 1
+db.label = Dirichlet BC +z edge
+db.iohandler.filename = axialz.spatialdb
+
+[pylithapp.timedependent.bc.z_neg]
+fixed_dof = [2]
+id = 2
+label = 2
+db.label = Dirichlet BC -z edge
+db.iohandler.filename = axialz.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0]
+id = 3
+label = 3
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = axialx.spatialdb
+
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0]
+id = 4
+label = 4
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = axialx.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
+id = 5
+label = 5
+db.label = Dirichlet BC -y edge
+db.iohandler.filename = axialy.spatialdb
+
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [1]
+id = 6
+label = 6
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = axialy.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = axialelasticisotropic.vtk

Added: short/3D/PyLith/trunk/tests/3d/hex8/axialx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/axialx.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/axialx.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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 = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  0.0    0.0

Added: short/3D/PyLith/trunk/tests/3d/hex8/axialy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/axialy.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/axialy.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  dof-1
+  value-units =  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  0.0    0.0

Added: short/3D/PyLith/trunk/tests/3d/hex8/axialz.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/axialz.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/axialz.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  dof-2
+  value-units =  m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  +200.0    -1.0
+0.0  0.0  -200.0     0.0

Added: short/3D/PyLith/trunk/tests/3d/hex8/box.cub
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/trunk/tests/3d/hex8/box.cub
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/trunk/tests/3d/hex8/box.exo
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/trunk/tests/3d/hex8/box.exo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/trunk/tests/3d/hex8/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/matprops.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/matprops.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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 = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0 0.0  0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/hex8/testpylith.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,42 @@
+#!/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 TestAxialElasticIsotropic import TestAxialElasticIsotropic
+  suite.addTest(unittest.makeSuite(TestAxialElasticIsotropic))
+
+  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/3d/hex8/testpylith.py
___________________________________________________________________
Name: svn:executable
   + *

Modified: short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/Makefile.am	2007-06-05 23:29:26 UTC (rev 7074)
@@ -15,13 +15,33 @@
 check_SCRIPTS = testpylith.py
 
 noinst_PYTHON = \
-	TestAxial.py
+	TestAxialElasticIsotropic.py
 
+noinst_DATA = \
+	box.exo \
+	axialelasticisotropic.cfg \
+	axialx.spatialdb \
+	axialy.spatialdb \
+	axialz.spatialdb \
+	matprops.spatialdb
 
-CLEANFILES = \
-	output.vtk
+noinst_TMP = \
+	axialelasticisotropic.vtk
 
+
 TESTS_ENVIRONMENT = $(PYTHON)
 
 
+# 'export' the input files by performing a mock install
+export_datadir = $(top_builddir)/tests/3d/tet4
+export-data: $(noinst_DATA)
+	for f in $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+
+BUILT_SOURCES = export-data
+
+CLEANFILES = \
+	$(export_datadir)/$(noinst_DATA) \
+	$(export_datadir)/$(noinst_TMP)
+
+
 # End of file 

Added: short/3D/PyLith/trunk/tests/3d/tet4/README
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/README	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/README	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,58 @@
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
+3-D axial compression test with linear tetrahedral cells.
+
+-200 <= x <= +200
+-200 <= y <= +200
+
+
+         z=-1.0 m
+        ----------
+        |        |
+x=0.0 m |        | x=0.0 m
+y=0.0 m |        | y=0.0 m
+        |        |
+        ----------
+         z=+0.0 m
+
+Dirichlet boundary conditions
+  Ux(0,y) = 0.0
+  Uy(x,-250) = +1.0 m
+  Uy(x,+250) = -1.0 m
+
+Analytical solution
+  Ux(x,y) = 0
+  Uy(x,y) = 0
+  Uz(x,y) = -0.004 * y
+
+
+======================================================================
+SHEAR
+======================================================================
+
+3-D shear test with linear tetrahedral 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
+

Added: short/3D/PyLith/trunk/tests/3d/tet4/TestAxialElasticIsotropic.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/TestAxialElasticIsotropic.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/TestAxialElasticIsotropic.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/3d/tet4/TestAxialElasticIsotropic.py
+##
+## @brief Test suite for testing pylith with axial compresison in
+## z-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 TestAxialElasticIsotropic(unittest.TestCase):
+  """
+  Test suite for testing pylith with axial compression in z-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/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/axialelasticisotropic.cfg	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/axialelasticisotropic.cfg	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,108 @@
+# -*- 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.problems.BCPrism
+
+# ----------------------------------------------------------------------
+# 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.z_pos]
+fixed_dof = [2]
+id = 1
+label = 1
+db.label = Dirichlet BC +z edge
+db.iohandler.filename = axialz.spatialdb
+
+[pylithapp.timedependent.bc.z_neg]
+fixed_dof = [2]
+id = 2
+label = 2
+db.label = Dirichlet BC -z edge
+db.iohandler.filename = axialz.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0]
+id = 3
+label = 3
+db.label = Dirichlet BC -x edge
+db.iohandler.filename = axialx.spatialdb
+
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0]
+id = 4
+label = 4
+db.label = Dirichlet BC +x edge
+db.iohandler.filename = axialx.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
+id = 5
+label = 5
+db.label = Dirichlet BC -y edge
+db.iohandler.filename = axialy.spatialdb
+
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [1]
+id = 6
+label = 6
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = axialy.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = axialelasticisotropic.vtk

Added: short/3D/PyLith/trunk/tests/3d/tet4/axialx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/axialx.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/axialx.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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 = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  0.0    0.0

Added: short/3D/PyLith/trunk/tests/3d/tet4/axialy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/axialy.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/axialy.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  dof-1
+  value-units =  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  0.0    0.0

Added: short/3D/PyLith/trunk/tests/3d/tet4/axialz.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/axialz.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/axialz.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  dof-2
+  value-units =  m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  +200.0    -1.0
+0.0  0.0  -200.0     0.0

Added: short/3D/PyLith/trunk/tests/3d/tet4/box.cub
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/trunk/tests/3d/tet4/box.cub
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/trunk/tests/3d/tet4/box.exo
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/trunk/tests/3d/tet4/box.exo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/trunk/tests/3d/tet4/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/matprops.spatialdb	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/matprops.spatialdb	2007-06-05 23:29:26 UTC (rev 7074)
@@ -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 = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0 0.0  0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/tests/3d/tet4/testpylith.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -0,0 +1,42 @@
+#!/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 TestAxialElasticIsotropic import TestAxialElasticIsotropic
+  suite.addTest(unittest.makeSuite(TestAxialElasticIsotropic))
+
+  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/3d/tet4/testpylith.py
___________________________________________________________________
Name: svn:executable
   + *

Modified: short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/TestMaterial.cc	2007-06-05 23:29:26 UTC (rev 7074)
@@ -247,14 +247,13 @@
       const int numParamValues = data.numParamValues[iParam];
       CPPUNIT_ASSERT_EQUAL(numParamValues, int(parameterData[iParam].size()));
       for (int iValue=0; iValue < numParamValues; ++iValue)
-	if(fabs(parameterDataE[i]) > tolerance)
+	if (fabs(parameterDataE[i]) > tolerance)
 	  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, 
-				     parameterData[iParam][iValue]/parameterDataE[i++],
-				     tolerance);
+				       parameterData[iParam][iValue]/parameterDataE[i++],
+				       tolerance);
 	else
 	  CPPUNIT_ASSERT_DOUBLES_EQUAL(parameterDataE[i++], parameterData[iParam][iValue],
-				     tolerance);
-	 
+				       tolerance);
     } // for
   } // for
 } // _testDBToParameters

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/twoquad4.cub
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/twoquad4.exo
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATLagrange.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATLagrange.py	2007-06-05 22:07:37 UTC (rev 7073)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATLagrange.py	2007-06-05 23:29:26 UTC (rev 7074)
@@ -29,22 +29,22 @@
   return -(1-p[0])/4.0
 
 def N1(p):
-  return (1-p[0])*(1+p[1])/4.0
+  return (1+p[0])*(1-p[1])/4.0
 
 def N1p(p):
-  return -(1+p[1])/4.0
+  return (1-p[1])/4.0
 
 def N1q(p):
-  return (1-p[0])/4.0
+  return -(1+p[0])/4.0
 
 def N2(p):
-  return (1+p[0])*(1-p[1])/4.0
+  return (1-p[0])*(1+p[1])/4.0
 
 def N2p(p):
-  return (1-p[1])/4.0
+  return -(1+p[1])/4.0
 
 def N2q(p):
-  return -(1+p[0])/4.0
+  return (1-p[0])/4.0
 
 def N3(p):
   return (1+p[0])*(1+p[1])/4.0
@@ -68,16 +68,16 @@
   return -(1-p[0])*(1-p[1])/8.0
 
 def Q1(p):
-  return (1-p[0])*(1-p[1])*(1+p[2])/8.0
+  return (1+p[0])*(1-p[1])*(1-p[2])/8.0
 
 def Q1p(p):
-  return -(1-p[1])*(1+p[2])/8.0
+  return (1-p[1])*(1-p[2])/8.0
 
 def Q1q(p):
-  return -(1-p[0])*(1+p[2])/8.0
+  return -(1+p[0])*(1-p[2])/8.0
 
 def Q1r(p):
-  return (1-p[0])*(1-p[1])/8.0
+  return -(1+p[0])*(1-p[1])/8.0
 
 def Q2(p):
   return (1-p[0])*(1+p[1])*(1-p[2])/8.0
@@ -92,28 +92,28 @@
   return -(1-p[0])*(1+p[1])/8.0
 
 def Q3(p):
-  return (1-p[0])*(1+p[1])*(1+p[2])/8.0
+  return (1+p[0])*(1+p[1])*(1-p[2])/8.0
 
 def Q3p(p):
-  return -(1+p[1])*(1+p[2])/8.0
+  return (1+p[1])*(1-p[2])/8.0
 
 def Q3q(p):
-  return (1-p[0])*(1+p[2])/8.0
+  return (1+p[0])*(1-p[2])/8.0
 
 def Q3r(p):
-  return (1-p[0])*(1+p[1])/8.0
+  return -(1+p[0])*(1+p[1])/8.0
 
 def Q4(p):
-  return (1+p[0])*(1-p[1])*(1-p[2])/8.0
+  return (1-p[0])*(1-p[1])*(1+p[2])/8.0
 
 def Q4p(p):
-  return (1-p[1])*(1-p[2])/8.0
+  return -(1-p[1])*(1+p[2])/8.0
 
 def Q4q(p):
-  return -(1+p[0])*(1-p[2])/8.0
+  return -(1-p[0])*(1+p[2])/8.0
 
 def Q4r(p):
-  return -(1+p[0])*(1-p[1])/8.0
+  return (1-p[0])*(1-p[1])/8.0
 
 def Q5(p):
   return (1+p[0])*(1-p[1])*(1+p[2])/8.0
@@ -128,16 +128,16 @@
   return (1+p[0])*(1-p[1])/8.0
 
 def Q6(p):
-  return (1+p[0])*(1+p[1])*(1-p[2])/8.0
+  return (1-p[0])*(1+p[1])*(1+p[2])/8.0
 
 def Q6p(p):
-  return (1+p[1])*(1-p[2])/8.0
+  return -(1+p[1])*(1+p[2])/8.0
 
 def Q6q(p):
-  return (1+p[0])*(1-p[2])/8.0
+  return (1-p[0])*(1+p[2])/8.0
 
 def Q6r(p):
-  return -(1+p[0])*(1+p[1])/8.0
+  return (1-p[0])*(1+p[1])/8.0
 
 def Q7(p):
   return (1+p[0])*(1+p[1])*(1+p[2])/8.0
@@ -168,8 +168,8 @@
     cell.degree = 1
     cell.order  = 2
     quadPtsE = numpy.array( [(-1.0/3**0.5, -1.0/3**0.5),
+                             (+1.0/3**0.5, -1.0/3**0.5),
                              (-1.0/3**0.5, +1.0/3**0.5),
-                             (+1.0/3**0.5, -1.0/3**0.5),
                              (+1.0/3**0.5, +1.0/3**0.5)],
                             dtype=numpy.float64 )
     quadWtsE = numpy.array( [1.0, 1.0, 1.0, 1.0], dtype=numpy.float64 )
@@ -215,12 +215,12 @@
     cell.degree = 1
     cell.order  = 2
     quadPtsE = numpy.array( [(-1.0/3**0.5, -1.0/3**0.5, -1.0/3**0.5),
+                             (+1.0/3**0.5, -1.0/3**0.5, -1.0/3**0.5),
+                             (-1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5),
+                             (+1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5),
                              (-1.0/3**0.5, -1.0/3**0.5, +1.0/3**0.5),
-                             (-1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5),
+                             (+1.0/3**0.5, -1.0/3**0.5, +1.0/3**0.5),
                              (-1.0/3**0.5, +1.0/3**0.5, +1.0/3**0.5),
-                             (+1.0/3**0.5, -1.0/3**0.5, -1.0/3**0.5),
-                             (+1.0/3**0.5, -1.0/3**0.5, +1.0/3**0.5),
-                             (+1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5),
                              (+1.0/3**0.5, +1.0/3**0.5, +1.0/3**0.5)],
                             dtype=numpy.float64 )
     quadWtsE = numpy.array( [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], dtype=numpy.float64 )



More information about the cig-commits mailing list