[cig-commits] r17158 - in short/3D/PyLith/branches/v1.5-stable/tests_auto: 2d/quad9 2d/tri6 3dnew/hex27

brad at geodynamics.org brad at geodynamics.org
Mon Aug 30 17:34:18 PDT 2010


Author: brad
Date: 2010-08-30 17:34:18 -0700 (Mon, 30 Aug 2010)
New Revision: 17158

Added:
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/TestDislocation.py
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation.cfg
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_slipLL.spatialdb
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation.cfg
   short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_slipLL.spatialdb
   short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_sliptime.spatialdb
Modified:
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/axialdisp.cfg
   short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/dislocation.cfg
Log:
Turn off debugging output and enable mesh reordering.

Modified: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/axialdisp.cfg	2010-08-31 00:33:18 UTC (rev 17157)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/axialdisp.cfg	2010-08-31 00:34:18 UTC (rev 17158)
@@ -23,6 +23,7 @@
 [pylithapp.mesh_generator]
 #debug = 1
 reader = pylith.meshio.MeshIOCubit
+reorder_mesh = True
 
 [pylithapp.mesh_generator.reader]
 filename = mesh.exo

Modified: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/dislocation.cfg	2010-08-31 00:33:18 UTC (rev 17157)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/quad9/dislocation.cfg	2010-08-31 00:34:18 UTC (rev 17158)
@@ -21,8 +21,9 @@
 # mesh_generator
 # ----------------------------------------------------------------------
 [pylithapp.mesh_generator]
-debug = 1
+#debug = 1
 reader = pylith.meshio.MeshIOCubit
+reorder_mesh = True
 
 [pylithapp.mesh_generator.reader]
 filename = mesh.exo

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/TestDislocation.py
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/TestDislocation.py	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/TestDislocation.py	2010-08-31 00:34:18 UTC (rev 17158)
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/2d/tri3/TestDislocation.py
+##
+## @brief Test suite for testing pylith with shear dislocation for 2-D
+## box.
+
+import unittest
+
+# Local application
+from pylith.apps.PyLithApp import PyLithApp
+class DislocationApp(PyLithApp):
+  def __init__(self):
+    PyLithApp.__init__(self, name="dislocation")
+    return
+
+
+# Helper function to run PyLith
+def run_pylith():
+  """
+  Run pylith.
+  """
+  if not "done" in dir(run_pylith):
+    app = DislocationApp()
+    app.run()
+    run_pylith.done = True
+  return
+
+
+class TestDislocation(unittest.TestCase):
+  """
+  Test suite for testing pylith with shear dislocation for 2-D box.
+  """
+
+  def setUp(self):
+    """
+    Setup for test.
+    """
+    run_pylith()
+    return
+
+
+  def test_disp(self):
+    """
+    Check displacement field.
+    """
+    return
+
+
+# End of file 

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation.cfg	2010-08-31 00:34:18 UTC (rev 17158)
@@ -0,0 +1,126 @@
+# -*- Python -*-
+[pylithapp]
+
+[pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature = 1
+#fiatsimplex = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+#debug = 1
+reader = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.reader]
+filename = mesh.exo
+use_nodeset_names = True
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 2
+bc = [x_neg,x_pos]
+interfaces = [fault]
+
+[pylithapp.timedependent.formulation]
+output = [domain,subdomain]
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 0.0*s
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = matprops.spatialdb
+quadrature.cell.shape = triangle
+quadrature.cell.degree = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0, 1]
+label = edge_xpos
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Dirichlet BC +x edge
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*m,+0.5*m]
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = edge_xneg
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Dirichlet BC -x edge
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*m,-0.5*m]
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+id = 2
+label = fault_x
+quadrature.cell.shape = line
+quadrature.cell.degree = 2
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+slip.iohandler.filename = dislocation_slipLL.spatialdb
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_rtol = 1.0e-8
+pc_type = asm
+ksp_max_it = 100
+ksp_gmres_restart = 50
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+#log_summary = true
+# start_in_debugger = true
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.domain.writer]
+filename = dislocation.vtk
+
+[pylithapp.problem.formulation.output.subdomain]
+label = edge_ypos
+writer.filename = dislocation-groundsurf.vtk
+
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation-statevars-elastic.vtk
+
+[pylithapp.timedependent.interfaces.fault.output.writer]
+filename = dislocation-fault.vtk

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_slipLL.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_slipLL.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_slipLL.spatialdb	2010-08-31 00:34:18 UTC (rev 17158)
@@ -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.0

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_sliptime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/2d/tri6/dislocation_sliptime.spatialdb	2010-08-31 00:34:18 UTC (rev 17158)
@@ -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/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation.cfg	2010-08-31 00:34:18 UTC (rev 17158)
@@ -0,0 +1,142 @@
+# -*- Python -*-
+[pylithapp]
+
+[pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature3d = 1
+#fiatlagrange = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 1
+reader = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.reader]
+filename = mesh.exo
+use_nodeset_names = True
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 3
+bc = [x_neg,x_pos]
+interfaces = [fault]
+
+[pylithapp.timedependent.formulation]
+output = [domain,subdomain]
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 0.0*s
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+materials = [elastic,viscoelastic]
+materials.elastic = pylith.materials.ElasticIsotropic3D
+materials.viscoelastic = pylith.materials.ElasticIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = matprops.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.degree= 2
+
+[pylithapp.timedependent.materials.viscoelastic]
+label = Elastic material 2
+id = 2
+db_properties.iohandler.filename = matprops.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.degree = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0, 1, 2]
+label = face_xpos
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Dirichlet BC +x edge
+db_initial.values = [displacement-x,displacement-y,displacement-z]
+db_initial.data = [0.0*m,+0.5*m,0.0*m]
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1, 2]
+label = face_xneg
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Dirichlet BC -x edge
+db_initial.values = [displacement-x,displacement-y,displacement-z]
+db_initial.data = [0.0*m,-0.5*m,0.0*m]
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+id = 100
+label = fault
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.degree= 2
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+slip.iohandler.filename = dislocation_slipLL.spatialdb
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = asm
+
+# Change the preconditioner settings.
+sub_pc_factor_shift_type = none
+
+ksp_rtol = 1.0e-8
+ksp_max_it = 100
+ksp_gmres_restart = 50
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+#log_summary = true
+# start_in_debugger = true
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.domain.writer]
+filename = dislocation.vtk
+
+[pylithapp.problem.formulation.output.subdomain]
+label = face_zpos
+writer.filename = dislocation-groundsurf.vtk
+
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation-elastic.vtk
+
+[pylithapp.timedependent.materials.viscoelastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation-viscoelastic.vtk

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_slipLL.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_slipLL.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_slipLL.spatialdb	2010-08-31 00:34:18 UTC (rev 17158)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  left-lateral-slip reverse-slip fault-opening
+  value-units =  m  m  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   1.0  0.0  0.0

Added: short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_sliptime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/tests_auto/3dnew/hex27/dislocation_sliptime.spatialdb	2010-08-31 00:34:18 UTC (rev 17158)
@@ -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 = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  0.0  0.0    -1.0



More information about the CIG-COMMITS mailing list