[cig-commits] r7043 - in short/3D/PyLith/trunk: . examples examples/twocells examples/twocells/twotri3 tests tests/1d tests/1d/line2 tests/2d tests/3d

brad at geodynamics.org brad at geodynamics.org
Fri Jun 1 17:18:53 PDT 2007


Author: brad
Date: 2007-06-01 17:18:51 -0700 (Fri, 01 Jun 2007)
New Revision: 7043

Added:
   short/3D/PyLith/trunk/examples/twocells/
   short/3D/PyLith/trunk/examples/twocells/twohex8/
   short/3D/PyLith/trunk/examples/twocells/twoquad4/
   short/3D/PyLith/trunk/examples/twocells/twotet4/
   short/3D/PyLith/trunk/examples/twocells/twotri3/
   short/3D/PyLith/trunk/examples/twocells/twotri3/explicit.cfg
   short/3D/PyLith/trunk/tests/
   short/3D/PyLith/trunk/tests/1d/
   short/3D/PyLith/trunk/tests/1d/line2/
   short/3D/PyLith/trunk/tests/1d/line2/README
   short/3D/PyLith/trunk/tests/1d/line2/bar.mesh
   short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb
   short/3D/PyLith/trunk/tests/1d/line2/dispbc.spatialdb
   short/3D/PyLith/trunk/tests/1d/line2/implicit.cfg
   short/3D/PyLith/trunk/tests/1d/line2/matprops.spatialdb
   short/3D/PyLith/trunk/tests/1d/line2/pylithapp.cfg
   short/3D/PyLith/trunk/tests/1d/line3/
   short/3D/PyLith/trunk/tests/2d/
   short/3D/PyLith/trunk/tests/2d/quad4/
   short/3D/PyLith/trunk/tests/2d/tri3/
   short/3D/PyLith/trunk/tests/3d/
   short/3D/PyLith/trunk/tests/3d/hex8/
   short/3D/PyLith/trunk/tests/3d/tet4/
Removed:
   short/3D/PyLith/trunk/examples/dynamic/
   short/3D/PyLith/trunk/examples/twotri3/
Modified:
   short/3D/PyLith/trunk/TODO
Log:
Reorganized examples and added tests directory to hold complete test cases.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/TODO	2007-06-02 00:18:51 UTC (rev 7043)
@@ -2,15 +2,33 @@
 MAIN PRIORITIES (Brad)
 ======================================================================
 
-0. Incorporate Quad/Hex basis stuff
+0. Incorporate Quad/Hex basis stuff (waiting for Matt to fix)
 
 1. Simple tests with analytical solutions
 
-   a. 1-D: axial compression
-   b. 2-D: axial compression of a "box"
-   c. 2-DD: shearing of a "box"
-   d. 3-D: axial compression of a "box"
-   3. 3-D: shearing of a "box"
+   a. 1-D
+     i. line2 cells
+       (1) axial compression
+     ii. line3 cells
+       (1) axial compression
+   b. 2-D
+     i. tri3 cells
+       (1) axial compression
+       (2) shear
+       (3) axialshear
+     ii. quad4 cells
+       (1) axial compression
+       (2) shear
+       (3) axialshear
+   c. 3-D
+     i. tet4 cells
+       (1) axial compression
+       (2) shear
+       (3) axialshear
+     ii. hex8 cells
+       (1) axial compression
+       (2) shear
+       (3) axialshear
 
 2. Allow use of all elasticity constants (9 for 2-D, 36 for 3-D).
    a. Materials C++ code

Copied: short/3D/PyLith/trunk/examples/twocells/twotri3 (from rev 7040, short/3D/PyLith/trunk/examples/twotri3)

Added: short/3D/PyLith/trunk/examples/twocells/twotri3/explicit.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twotri3/explicit.cfg	2007-06-01 23:04:01 UTC (rev 7040)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/explicit.cfg	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,8 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+formulation = pylith.problems.Explicit

Added: short/3D/PyLith/trunk/tests/1d/line2/README
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/README	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/README	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,19 @@
+1-D axial extension test.
+
+
+0      1      2      3      4
+* ---- * ---- * ---- * ---- *
+
+Vertex   Coordinates
+  0        0.0
+  1        1.0
+  2        2.0
+  3        3.0
+  4        4.0
+
+Dirichlet boundary conditions
+  u(0) = -0.2
+  u(4) = +0.2
+
+Analytical solution
+  u(x) = -0.2 + 0.1 * x

Added: short/3D/PyLith/trunk/tests/1d/line2/bar.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/bar.mesh	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/bar.mesh	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,39 @@
+mesh = {
+  dimension = 1
+  vertices = {
+    dimension = 1
+    count = 5
+    coordinates = {
+      0   0.0
+      1   1.0
+      2   2.0
+      3   3.0
+      4   4.0
+    }
+  }
+  cells = {
+    num-corners = 2
+    count = 4
+    simplices = {
+      0    0  1
+      1    1  2
+      2    2  3
+      3    3  4
+    }
+    material-ids = {
+      0   1
+      1   1
+      2   1
+      3   1
+    }
+  }
+  group = {
+    type = vertices
+    name = end points
+    count = 2
+    indices = {
+      0
+      4
+    }
+  }
+}

Added: short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+from pylith.problems.BoundaryConditions import BoundaryConditions
+
+# BCSingle class
+class BCSingle(BoundaryConditions):
+  """
+  Python boundary conditions container for a single boundary condition.
+
+  Factory: boundary_conditions
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(BoundaryConditions.Inventory):
+    """
+    Python object for managing BCSingle facilities and properties.
+    """
+    
+    ## @class Inventory
+    ## Python object for managing BCSingle facilities and properties.
+    ##
+    ## \b Properties
+    ## @li None
+    ##
+    ## \b Facilities
+    ## @li \b bc Boundary condition.
+
+    import pyre.inventory
+    
+    from pylith.bc.Dirichlet import Dirichlet
+
+    bc = pyre.inventory.facility("bc", family="boundary_condition",
+                                   factory=Dirichlet)
+    bc.meta['tip'] = "Boundary condition."
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="bcsingle"):
+    """
+    Constructor.
+    """
+    BoundaryConditions.__init__(self, name)
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set attributes from inventory.
+    """
+    BoundaryConditions._configure(self)
+    self.bc = [self.inventory.bc]
+    return
+
+  
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def boundary_conditions():
+  """
+  Factory associated with BCSingle.
+  """
+  return BCSingle()
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/1d/line2/dispbc.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/dispbc.spatialdb	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/dispbc.spatialdb	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,15 @@
+#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

Added: short/3D/PyLith/trunk/tests/1d/line2/implicit.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/implicit.cfg	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/implicit.cfg	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,19 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+formulation = pylith.problems.Implicit
+bc = bcsingle
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.bc]
+fixed_dof = [0]
+id = 10
+label = end points
+db.label = Dirichlet BC
+db.iohandler.filename = dispbc.spatialdb

Added: short/3D/PyLith/trunk/tests/1d/line2/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/matprops.spatialdb	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/matprops.spatialdb	2007-06-02 00:18:51 UTC (rev 7043)
@@ -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 = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/1d/line2/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/pylithapp.cfg	2007-06-02 00:18:06 UTC (rev 7042)
+++ short/3D/PyLith/trunk/tests/1d/line2/pylithapp.cfg	2007-06-02 00:18:51 UTC (rev 7043)
@@ -0,0 +1,54 @@
+# -*- 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
+
+[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
+
+# ----------------------------------------------------------------------
+# 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
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi



More information about the cig-commits mailing list