[cig-commits] r8293 - in short/3D/PyLith/trunk/tests: 2d/bar_quad4
2d/bar_tri3 3d 3d/bar_hex8
brad at geodynamics.org
brad at geodynamics.org
Tue Nov 13 17:31:06 PST 2007
Author: brad
Date: 2007-11-13 17:31:05 -0800 (Tue, 13 Nov 2007)
New Revision: 8293
Added:
short/3D/PyLith/trunk/tests/3d/bar_hex8/
short/3D/PyLith/trunk/tests/3d/bar_hex8/Makefile.am
short/3D/PyLith/trunk/tests/3d/bar_hex8/README
short/3D/PyLith/trunk/tests/3d/bar_hex8/bar_hex8_200m.exo
short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_disp.spatialdb
short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn.cfg
short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliprate.spatialdb
short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliptime.spatialdb
short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_slip.spatialdb
short/3D/PyLith/trunk/tests/3d/bar_hex8/geometry.jou
short/3D/PyLith/trunk/tests/3d/bar_hex8/matprops.spatialdb
short/3D/PyLith/trunk/tests/3d/bar_hex8/mesh_hex8_200m.jou
short/3D/PyLith/trunk/tests/3d/bar_hex8/testpylith.py
Modified:
short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg
short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb
short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg
short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb
Log:
Added 3-D test for dynamic dislocation in bar with hex8 cells.
Modified: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn.cfg 2007-11-14 01:31:05 UTC (rev 8293)
@@ -4,17 +4,17 @@
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
-faultcohesivekin = 1
+#[pylithapp.journal.info]
+#timedependent = 1
+#explicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#explicitelasticity = 1
+#quadrature2d = 1
+#fiatlagrange = 1
+#faultcohesivekin = 1
# ----------------------------------------------------------------------
# mesh_generator
@@ -108,8 +108,8 @@
#ksp_type = preonly
#pc_jacobi_rowsum = 1
-ksp_monitor = true
-ksp_view = true
+#ksp_monitor = true
+#ksp_view = true
log_summary = true
Modified: short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/2d/bar_quad4/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -11,4 +11,4 @@
space-dim = 2
}
}
-0.0 0.075
+0.0 0.0 0.075
Modified: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn.cfg 2007-11-14 01:31:05 UTC (rev 8293)
@@ -4,17 +4,17 @@
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatsimplex = 1
-faultcohesivekin = 1
+#[pylithapp.journal.info]
+#timedependent = 1
+#explicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#explicitelasticity = 1
+#quadrature2d = 1
+#fiatsimplex = 1
+#faultcohesivekin = 1
# ----------------------------------------------------------------------
# mesh_generator
@@ -105,8 +105,8 @@
#ksp_type = preonly
#pc_jacobi_rowsum = 1
-ksp_monitor = true
-ksp_view = true
+#ksp_monitor = true
+#ksp_view = true
log_summary = true
Modified: short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/2d/bar_tri3/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -11,4 +11,4 @@
space-dim = 2
}
}
-0.0 0.075
+0.0 0.0 0.075
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/Makefile.am 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/Makefile.am 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,48 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+TESTS = testpylith.py
+
+check_SCRIPTS = testpylith.py
+
+noinst_PYTHON = \
+ TestDislocationDyn.py
+
+noinst_DATA = \
+ bar.mesh \
+ dislocation_dyn.cfg \
+ dislocation_slip.spatialdb \
+ dislocation_dyn_sliprate.spatialdb \
+ dislocation_dyn_sliptime.spatialdb \
+ matprops.spatialdb
+
+noinst_TMP = \
+ dislocation_dyn_*.vtk
+
+
+TESTS_ENVIRONMENT = $(PYTHON)
+
+
+# 'export' the input files by performing a mock install
+export_datadir = $(top_builddir)/tests/2d/bar_quad4
+export-data: $(noinst_PYTHON) $(noinst_DATA)
+ for f in $(noinst_PYTHON) $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+
+BUILT_SOURCES = export-data
+
+CLEANFILES = \
+ $(export_datadir)/$(noinst_PYTHON) \
+ $(export_datadir)/$(noinst_DATA) \
+ $(export_datadir)/$(noinst_TMP)
+
+
+# End of file
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/README
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/README 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/README 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,9 @@
+3-D dynamic shear dislocation in bar with hex8 cells.
+
+See geometry.jou for geometry.
+
+Absorbing boundary conditions at +x and -x faces.
+
+Kinematic fault condition at x = 0.0.
+
+All non-fault vertices are pinned except in direction of fault motion.
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/bar_hex8_200m.exo
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/tests/3d/bar_hex8/bar_hex8_200m.exo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_disp.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_disp.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ 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 0.0 0.0 0.0
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn.cfg 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn.cfg 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,139 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+#timedependent = 1
+#explicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#homogeneous = 1
+#explicitelasticity = 1
+#quadrature2d = 1
+#fiatlagrange = 1
+#faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+#debug = 1
+importer = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.importer]
+filename = bar_hex8_200m.exo
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 12.0*s
+default_dt = 0.05*s
+dimension = 3
+formulation = pylith.problems.Explicit
+formulation.solver.initial_guess_zero = False
+bc = pylith.bc.BCFourSides
+bc.x_pos = pylith.bc.AbsorbingDampers
+bc.x_neg = pylith.bc.AbsorbingDampers
+interfaces = pylith.faults.SingleFault
+materials = pylith.materials.BiMaterial
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials.one]
+label = elastic material +x
+id = 1
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.materials.two]
+label = elastic material -x
+id = 2
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_pos]
+id = 11
+label = 11
+db.label = Absorbing BC +x
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2Din3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.x_neg]
+id = 12
+label = 12
+db.label = Absorbing BC -x
+db.iohandler.filename = matprops.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature2Din3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [0, 2]
+id = 13
+label = 13
+db.label = Dirichlet BC
+db.iohandler.filename = dislocation_disp.spatialdb
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+id = 10
+label = 10
+quadrature = pylith.feassemble.quadrature.Quadrature2Din3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+mat_db.iohandler.filename = matprops.spatialdb
+
+[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+slip.iohandler.filename = dislocation_slip.spatialdb
+slip_rate.iohandler.filename = dislocation_dyn_sliprate.spatialdb
+slip_time.iohandler.filename = dislocation_dyn_sliptime.spatialdb
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_type = gmres
+pc_type = asm
+ksp_rtol = 1.0e-8
+ksp_max_it = 50
+ksp_gmres_restart = 10
+
+#ksp_type = preonly
+#pc_jacobi_rowsum = 1
+
+#ksp_monitor = true
+#ksp_view = true
+log_summary = true
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = output/dislocation_dyn.vtk
+time_format = %05.2f
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliprate.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliprate.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -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 = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 1.0
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_dyn_sliptime.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -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.2
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_slip.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/dislocation_slip.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -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/trunk/tests/3d/bar_hex8/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/geometry.jou 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/geometry.jou 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,38 @@
+## /tools/common/cubit-10.2/bin/clarox
+## Cubit Version 10.2
+## Cubit Build 24
+## Revised 12/15/2006 16:09:40 MST
+## Running 06/18/2007 10:26:50 AM
+## Command Options:
+## -warning = On
+## -information = On
+
+# ----------------------------------------------------------------------
+# Create block
+# ----------------------------------------------------------------------
+
+# Bar is 400m x 400m x 8000m
+# -4000 m <= x <= 4000 m
+# -200 m <= y <= 200 m
+# -200 m <= z <= 200 km
+reset
+brick x 8000 y 400 z 400
+
+# ----------------------------------------------------------------------
+# Create interface surfaces
+# ----------------------------------------------------------------------
+create planar surface with plane xplane offset 0
+surface 7 name "fault_surface"
+
+# ----------------------------------------------------------------------
+# Divide volumes using interface surfaces
+# ----------------------------------------------------------------------
+webcut volume 1 with plane surface fault_surface
+volume 1 name "elastic_xpos"
+volume 3 name "elastic_xneg"
+
+# ----------------------------------------------------------------------
+# Imprint all volumes, merging surfaces
+# ----------------------------------------------------------------------
+imprint all with volume all
+merge all
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/matprops.spatialdb 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/matprops.spatialdb 2007-11-14 01:31:05 UTC (rev 8293)
@@ -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 1000.0 1732.0
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/mesh_hex8_200m.jou
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/mesh_hex8_200m.jou 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/mesh_hex8_200m.jou 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,65 @@
+## /tools/common/cubit-10.2/bin/clarox
+## Cubit Version 10.2
+## Cubit Build 24
+## Revised 12/15/2006 16:09:40 MST
+## Running 06/18/2007 10:26:50 AM
+## Command Options:
+## -warning = On
+## -information = On
+
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size
+# ----------------------------------------------------------------------
+volume all size 200
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh volume all
+
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 volume 1
+block 1 name "elastic x_pos"
+block 2 volume 3
+block 2 name "elastic x_neg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault
+# ----------------------------------------------------------------------
+group "fault" add node in fault_surface
+nodeset 10 group fault
+nodeset 10 name "fault"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +x face
+# ----------------------------------------------------------------------
+group "face_xpos" add node in surface 6
+nodeset 11 group face_xpos
+nodeset 11 name "face xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x face
+# ----------------------------------------------------------------------
+group "face_xneg" add node in surface 4
+nodeset 12 group face_xneg
+nodeset 12 name "face xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for all vertices but fault
+# ----------------------------------------------------------------------
+group "vertices_nofault" add node all
+group "vertices_nofault" remove node in fault
+nodeset 13 group vertices_nofault
+nodeset 13 name "vertices_nofault"
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "bar_hex8_200m.exo" dimension 3 overwrite
Added: short/3D/PyLith/trunk/tests/3d/bar_hex8/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/3d/bar_hex8/testpylith.py 2007-11-14 01:30:44 UTC (rev 8292)
+++ short/3D/PyLith/trunk/tests/3d/bar_hex8/testpylith.py 2007-11-14 01:31:05 UTC (rev 8293)
@@ -0,0 +1,48 @@
+#!/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 TestAxial import TestAxial
+ suite.addTest(unittest.makeSuite(TestAxial))
+
+ from TestDislocationStatic import TestDislocationStatic
+ suite.addTest(unittest.makeSuite(TestDislocationStatic))
+
+ from TestDislocationDyn import TestDislocationDyn
+ suite.addTest(unittest.makeSuite(TestDislocationDyn))
+
+ 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/bar_hex8/testpylith.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the cig-commits
mailing list