[cig-commits] r7965 - in short/3D/PyLith/trunk/tests/2d: . quad4b

brad at geodynamics.org brad at geodynamics.org
Thu Sep 13 13:47:45 PDT 2007


Author: brad
Date: 2007-09-13 13:47:44 -0700 (Thu, 13 Sep 2007)
New Revision: 7965

Added:
   short/3D/PyLith/trunk/tests/2d/quad4b/
   short/3D/PyLith/trunk/tests/2d/quad4b/dislocation.cfg
   short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliprate.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4b/faults.odb
   short/3D/PyLith/trunk/tests/2d/quad4b/materials.odb
   short/3D/PyLith/trunk/tests/2d/quad4b/matprops.spatialdb
   short/3D/PyLith/trunk/tests/2d/quad4b/quad4h.mesh
Log:
Added test for using two faults in mesh with quad cells.

Added: short/3D/PyLith/trunk/tests/2d/quad4b/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/dislocation.cfg	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/dislocation.cfg	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,120 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+implicitelasticity = 1
+quadrature1d = 1
+fiatsimplex = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+
+[pylithapp.mesh_generator.importer]
+filename = quad4h.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCFourSides
+interfaces = faults
+#interfaces = pylith.faults.SingleFault
+materials = materials
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials.one]
+label = elastic material A
+id = 10
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+[pylithapp.timedependent.materials.two]
+label = elastic material B
+id = 11
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+[pylithapp.timedependent.materials.three]
+label = elastic material C
+id = 12
+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_neg]
+fixed_dof = [0, 1]
+label = corners
+db.label = Dirichlet BC on corners
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = nearest
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces.one]
+id = 1
+label = faultA
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell.shape = line
+mat_db.iohandler.filename = matprops.spatialdb
+
+[pylithapp.timedependent.interfaces.one.eq_src.slip_function]
+slip.iohandler.filename = dislocation_slip.spatialdb
+slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+[pylithapp.timedependent.interfaces.two]
+id = 2
+label = faultB
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell.shape = line
+mat_db.iohandler.filename = matprops.spatialdb
+
+[pylithapp.timedependent.interfaces.two.eq_src.slip_function]
+slip.iohandler.filename = dislocation_slip.spatialdb
+slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = asm
+ksp_rtol = 1.0e-8
+ksp_gmres_restart = 5000
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation.vtk

Added: short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_disp.spatialdb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_disp.spatialdb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  dof-0 dof-1
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0     0.0  0.0

Added: short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_slip.spatialdb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_slip.spatialdb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  left-lateral-slip fault-opening
+  value-units =  m  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   1.0  0.5

Added: short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliprate.spatialdb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliprate.spatialdb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-rate
+  value-units =  m/s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0  1.0e+6

Added: short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliptime.spatialdb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/dislocation_sliptime.spatialdb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  0.0   -1.0

Added: short/3D/PyLith/trunk/tests/2d/quad4b/faults.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/faults.odb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/faults.odb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+from pylith.utils.ObjectBin import ObjectBin
+
+class MyFaults(ObjectBin):
+  """
+  User-defined boundary conditions container.
+
+  Factory: object_bin
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(ObjectBin.Inventory):
+    """
+    Python object for managing MyBC facilities and properties.
+    """
+
+    import pyre.inventory
+    
+    from pylith.faults.FaultCohesiveKin import FaultCohesiveKin
+
+    one = pyre.inventory.facility("one", family="fault",
+                                   factory=FaultCohesiveKin)
+    one.meta['tip'] = "Fault A."
+    
+    two = pyre.inventory.facility("two", family="fault",
+                                   factory=FaultCohesiveKin)
+    two.meta['tip'] = "Fault B."
+    
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="myfaults"):
+    """
+    Constructor.
+    """
+    ObjectBin.__init__(self, name)
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set attributes from inventory.
+    """
+    ObjectBin._configure(self)
+
+    self.bin = [self.inventory.one,
+                self.inventory.two]
+    return
+
+  
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def object_bin():
+  """
+  Factory associated with MyFaults.
+  """
+  return MyFaults()
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/2d/quad4b/materials.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/materials.odb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/materials.odb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+from pylith.utils.ObjectBin import ObjectBin
+
+class MyMatBin(ObjectBin):
+  """
+  User-defined materials container.
+
+  Factory: object_bin
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(ObjectBin.Inventory):
+    """
+    Python object for managing MyBC facilities and properties.
+    """
+
+    import pyre.inventory
+    
+    from pylith.materials.ElasticPlaneStrain import ElasticPlaneStrain
+
+    one = pyre.inventory.facility("one", family="material",
+                                  factory=ElasticPlaneStrain)
+    one.meta['tip'] = "Material A."
+    
+    two = pyre.inventory.facility("two", family="material",
+                                  factory=ElasticPlaneStrain)
+    two.meta['tip'] = "Material B."
+    
+    three = pyre.inventory.facility("three", family="material",
+                                    factory=ElasticPlaneStrain)
+    three.meta['tip'] = "Material C."
+
+    
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="mymatbin"):
+    """
+    Constructor.
+    """
+    ObjectBin.__init__(self, name)
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set attributes from inventory.
+    """
+    ObjectBin._configure(self)
+
+    self.bin = [self.inventory.one,
+                self.inventory.two,
+                self.inventory.three]
+    return
+
+  
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def object_bin():
+  """
+  Factory associated with MyMatBin.
+  """
+  return MyMatBin()
+
+
+# End of file 

Added: short/3D/PyLith/trunk/tests/2d/quad4b/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/matprops.spatialdb	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/matprops.spatialdb	2007-09-13 20:47:44 UTC (rev 7965)
@@ -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 = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0 0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/trunk/tests/2d/quad4b/quad4h.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4b/quad4h.mesh	2007-09-13 19:29:24 UTC (rev 7964)
+++ short/3D/PyLith/trunk/tests/2d/quad4b/quad4h.mesh	2007-09-13 20:47:44 UTC (rev 7965)
@@ -0,0 +1,82 @@
+mesh = {
+  dimension = 2
+  use-index-zero = true
+  vertices = {
+    dimension = 2
+    count = 16
+    coordinates = {
+             0     -3.0   3.0
+             1     -1.0   3.0
+             2      1.0   3.0
+             3      3.0   3.0
+             4     -3.0   1.0
+             5     -1.0   1.0
+             6      1.0   1.0
+             7      3.0   1.0
+             8     -3.0  -1.0
+             9     -1.0  -1.0
+            10      1.0  -1.0
+            11      3.0  -1.0
+            12     -3.0  -3.0
+            13     -1.0  -3.0
+            14      1.0  -3.0
+            15      3.0  -3.0
+    }
+  }
+  cells = {
+    count = 9
+    num-corners = 4
+    simplices = {
+             0       0  4  5  1
+             1       1  5  6  2
+             2       2  6  7  3
+             3       4  8  9  5
+             4       5  9 10  6
+             5       6 10 11  7
+             6       8 12 13  9
+             7       9 13 14 10
+             8      10 14 15 11
+    }
+    material-ids = {
+             0   10
+             1   10
+             2   11
+             3   10
+             4   10
+             5   11
+             6   12
+             7   12
+             8   11
+    }
+  }
+  group = {
+    name = faultA
+    type = vertices
+    count = 3
+    indices = {
+      2
+      6
+      10
+    }
+  }
+  group = {
+    name = faultB
+    type = vertices
+    count = 2
+    indices = {
+      8
+      9
+    }
+  }
+  group = {
+    name = corners
+    type = vertices
+    count = 4
+    indices = {
+      0
+      3
+     12
+     15
+    }
+  }
+}



More information about the cig-commits mailing list