[cig-commits] [commit] baagaard/test-buried-fault-intersect: Added test of intersection of buried faults for tet4 cells. (c780ba2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Jan 16 13:42:40 PST 2015
Repository : https://github.com/geodynamics/pylith
On branch : baagaard/test-buried-fault-intersect
Link : https://github.com/geodynamics/pylith/compare/0000000000000000000000000000000000000000...4b5f5061aa7cbc4424425dfd74936e2b4731e3e5
>---------------------------------------------------------------
commit c780ba23940dc096d45b525b0e91fad55fa6361b
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Fri Jan 16 13:41:20 2015 -0800
Added test of intersection of buried faults for tet4 cells.
>---------------------------------------------------------------
c780ba23940dc096d45b525b0e91fad55fa6361b
tests_auto/3d/tet4/Makefile.am | 6 +-
...tsIntersect.py => TestFaultsIntersectNoSlip.py} | 26 +++---
...pnosliprefine.cfg => faultsintersectnoslip.cfg} | 96 +++++++++++++---------
tests_auto/3d/tet4/testpylith.py | 3 +
4 files changed, 77 insertions(+), 54 deletions(-)
diff --git a/tests_auto/3d/tet4/Makefile.am b/tests_auto/3d/tet4/Makefile.am
index 8ca7094..3d35858 100644
--- a/tests_auto/3d/tet4/Makefile.am
+++ b/tests_auto/3d/tet4/Makefile.am
@@ -36,7 +36,8 @@ dist_noinst_PYTHON = \
sliponefault_soln.py \
TestSlipTwoFaults.py \
sliptwofaults_soln.py \
- TestFaultsIntersect.py
+ TestFaultsIntersect.py \
+ TestFaultsIntersectNoSlip.py
dist_noinst_DATA = \
@@ -51,7 +52,8 @@ dist_noinst_DATA = \
sliponefault.cfg \
points.txt \
sliptwofaults.cfg \
- faultsintersect.cfg
+ faultsintersect.cfg \
+ faultsintersectnoslip.cfg
noinst_TMP = \
axial_dispx.spatialdb \
diff --git a/tests_auto/3d/tet4/TestFaultsIntersect.py b/tests_auto/3d/tet4/TestFaultsIntersectNoSlip.py
similarity index 88%
copy from tests_auto/3d/tet4/TestFaultsIntersect.py
copy to tests_auto/3d/tet4/TestFaultsIntersectNoSlip.py
index 8fca5bd..2c5a0d3 100644
--- a/tests_auto/3d/tet4/TestFaultsIntersect.py
+++ b/tests_auto/3d/tet4/TestFaultsIntersectNoSlip.py
@@ -16,19 +16,19 @@
# ----------------------------------------------------------------------
#
-## @file tests/3d/tet4/TestFaultsIntersect.py
+## @file tests/3d/tet4/TestFaultsIntersectNoSlip.py
##
## @brief Test suite for testing pylith with shear slip.
import numpy
from TestTet4 import TestTet4
-from sliponefault_soln import AnalyticalSoln
+from sheardisp_soln import AnalyticalSoln
# Local version of PyLithApp
from pylith.apps.PyLithApp import PyLithApp
-class FaultsIntersectApp(PyLithApp):
+class FaultsIntersectNoSlipApp(PyLithApp):
def __init__(self):
- PyLithApp.__init__(self, name="faultsintersect")
+ PyLithApp.__init__(self, name="faultsintersectnoslip")
return
@@ -38,13 +38,13 @@ def run_pylith():
Run pylith.
"""
if not "done" in dir(run_pylith):
- app = FaultsIntersectApp()
+ app = FaultsIntersectNoSlipApp()
run_pylith.done = True # Put before run() so only called once
app.run()
return
-class TestFaultsIntersect(TestTet4):
+class TestFaultsIntersectNoSlip(TestTet4):
"""
Test suite for testing pylith with shear slip on two faults.
"""
@@ -57,10 +57,10 @@ class TestFaultsIntersect(TestTet4):
self.nverticesO = self.mesh['nvertices']
# Fault x
- self.mesh['nvertices'] += 50
- self.faultMeshX = {'nvertices': 50,
+ self.mesh['nvertices'] += 8
+ self.faultMeshX = {'nvertices': 19,
'spaceDim': 3,
- 'ncells': 72,
+ 'ncells': 20,
'ncorners': 3}
# Fault y
@@ -70,7 +70,7 @@ class TestFaultsIntersect(TestTet4):
'ncells': 8,
'ncorners': 3}
run_pylith()
- self.outputRoot = "faultsintersect"
+ self.outputRoot = "faultsintersectnoslip"
self.soln = AnalyticalSoln()
return
@@ -122,7 +122,7 @@ class TestFaultsIntersect(TestTet4):
"""
Calculate displacement field given coordinates of vertices.
"""
- return self.soln.displacement(vertices, self.nverticesO)
+ return self.soln.displacement(vertices)
def calcStateVar(self, name, vertices, cells):
@@ -148,7 +148,7 @@ class TestFaultsIntersect(TestTet4):
if self.fault == "x":
normalDir = (+1.0, 0.0, 0.0)
- finalSlip = -2.0
+ finalSlip = 0.0
faultMesh = self.faultMeshX
elif self.fault == "y":
normalDir = (0.0,-1.0, 0.0)
@@ -190,7 +190,7 @@ class TestFaultsIntersect(TestTet4):
# ----------------------------------------------------------------------
if __name__ == '__main__':
import unittest
- from TestFaultsIntersect import TestFaultsIntersect as Tester
+ from TestFaultsIntersectNoSlip import TestFaultsIntersectNoSlip as Tester
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(Tester))
diff --git a/tests_auto/3d/tet4/sheardispnosliprefine.cfg b/tests_auto/3d/tet4/faultsintersectnoslip.cfg
similarity index 64%
copy from tests_auto/3d/tet4/sheardispnosliprefine.cfg
copy to tests_auto/3d/tet4/faultsintersectnoslip.cfg
index 3167a66..e60b71a 100644
--- a/tests_auto/3d/tet4/sheardispnosliprefine.cfg
+++ b/tests_auto/3d/tet4/faultsintersectnoslip.cfg
@@ -1,14 +1,14 @@
-[sheardispnosliprefine]
-nodes = 4
+# Test intersection of faults. Both faults have buried edges.
+#
+# The deformation is pure shear without fault slip.
-[sheardispnosliprefine.launcher] # WARNING: THIS IS NOT PORTABLE
-command = mpirun -np ${nodes}
+[faultsintersectnoslip]
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[sheardispnosliprefine.journal.info]
-#sheardispnosliprefine = 1
+[faultsintersectnoslip.journal.info]
+#faultsintersectnoslip = 1
#timedependent = 1
#implicit = 1
#petsc = 1
@@ -17,42 +17,37 @@ command = mpirun -np ${nodes}
#meshiocubit = 1
#implicitelasticity = 1
#quadrature3d = 1
-#faultcohesivekin = 1
#fiatsimplex = 1
# ----------------------------------------------------------------------
# mesh_generator
# ----------------------------------------------------------------------
-[sheardispnosliprefine.mesh_generator]
+[faultsintersectnoslip.mesh_generator]
reader = pylith.meshio.MeshIOCubit
reorder_mesh = True
-refiner = pylith.topology.RefineUniform
-[sheardispnosliprefine.mesh_generator.reader]
+[faultsintersectnoslip.mesh_generator.reader]
filename = mesh.exo
coordsys.space_dim = 3
# ----------------------------------------------------------------------
# problem
# ----------------------------------------------------------------------
-[sheardispnosliprefine.timedependent]
+[faultsintersectnoslip.timedependent]
dimension = 3
-bc = [x_neg,x_pos,y_neg,y_pos,z_neg]
-
-normalizer.length_scale = 2.5*km
-[sheardispnosliprefine.timedependent.formulation.time_step]
+[faultsintersectnoslip.timedependent.formulation.time_step]
total_time = 0.0*s
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[sheardispnosliprefine.timedependent]
+[faultsintersectnoslip.timedependent]
materials = [elastic,viscoelastic]
materials.elastic = pylith.materials.ElasticIsotropic3D
materials.viscoelastic = pylith.materials.ElasticIsotropic3D
-[sheardispnosliprefine.timedependent.materials.elastic]
+[faultsintersectnoslip.timedependent.materials.elastic]
label = Elastic material
id = 1
db_properties.label = Elastic properties
@@ -60,7 +55,7 @@ db_properties.iohandler.filename = matprops.spatialdb
quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.dimension = 3
-[sheardispnosliprefine.timedependent.materials.viscoelastic]
+[faultsintersectnoslip.timedependent.materials.viscoelastic]
label = Elastic material
id = 2
db_properties.label = Elastic properties
@@ -71,35 +66,38 @@ quadrature.cell.dimension = 3
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-[sheardispnosliprefine.timedependent.bc.x_pos]
+[faultsintersectnoslip.timedependent]
+bc = [x_neg,x_pos,y_neg,y_pos,z_neg]
+
+[faultsintersectnoslip.timedependent.bc.x_pos]
bc_dof = [1]
label = face_xpos
db_initial = spatialdata.spatialdb.SimpleDB
db_initial.label = Dirichlet BC +x edge
db_initial.iohandler.filename = shear_dispy.spatialdb
-[sheardispnosliprefine.timedependent.bc.x_neg]
+[faultsintersectnoslip.timedependent.bc.x_neg]
bc_dof = [1]
label = face_xneg
db_initial = spatialdata.spatialdb.SimpleDB
db_initial.label = Dirichlet BC -x edge
db_initial.iohandler.filename = shear_dispy.spatialdb
-[sheardispnosliprefine.timedependent.bc.y_pos]
+[faultsintersectnoslip.timedependent.bc.y_pos]
bc_dof = [0]
label = face_ypos
db_initial = spatialdata.spatialdb.SimpleDB
db_initial.label = Dirichlet BC +y edge
db_initial.iohandler.filename = shear_dispx.spatialdb
-[sheardispnosliprefine.timedependent.bc.y_neg]
+[faultsintersectnoslip.timedependent.bc.y_neg]
bc_dof = [0]
label = face_yneg
db_initial = spatialdata.spatialdb.SimpleDB
db_initial.label = Dirichlet BC -y edge
db_initial.iohandler.filename = shear_dispx.spatialdb
-[sheardispnosliprefine.timedependent.bc.z_neg]
+[faultsintersectnoslip.timedependent.bc.z_neg]
bc_dof = [2]
label = face_zneg
db_initial = spatialdata.spatialdb.SimpleDB
@@ -109,17 +107,33 @@ db_initial.iohandler.filename = shear_dispz.spatialdb
# ----------------------------------------------------------------------
# faults
# ----------------------------------------------------------------------
-[sheardispnosliprefine.timedependent]
-interfaces = [fault]
+[faultsintersectnoslip.timedependent]
+interfaces = [faultx,faulty]
-[sheardispnosliprefine.timedependent.interfaces.fault]
-id = 100
+[faultsintersectnoslip.timedependent.interfaces.faultx]
+id = 10
label = fault_x_trim
edge = fault_x_trim_edge
-quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.dimension = 2
-[sheardispnosliprefine.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+[faultsintersectnoslip.timedependent.interfaces.faultx.eq_srcs.rupture.slip_function]
+slip = spatialdata.spatialdb.UniformDB
+slip.label = Final slip
+slip.values = [left-lateral-slip,reverse-slip,fault-opening]
+slip.data = [0.0*m,0.0*m,0.0*m]
+
+slip_time = spatialdata.spatialdb.UniformDB
+slip_time.label = Slip start time
+slip_time.values = [slip-time]
+slip_time.data = [0.0*s]
+
+[faultsintersectnoslip.timedependent.interfaces.faulty]
+id = 20
+label = fault_y
+edge = fault_y_edge
+quadrature.cell.dimension = 2
+
+[faultsintersectnoslip.timedependent.interfaces.faulty.eq_srcs.rupture.slip_function]
slip = spatialdata.spatialdb.UniformDB
slip.label = Final slip
slip.values = [left-lateral-slip,reverse-slip,fault-opening]
@@ -133,7 +147,7 @@ slip_time.data = [0.0*s]
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
-[sheardispnosliprefine.petsc]
+[faultsintersectnoslip.petsc]
pc_type = asm
# Change the preconditioner settings.
@@ -154,20 +168,24 @@ ksp_gmres_restart = 50
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[sheardispnosliprefine.problem.formulation.output.output]
+[faultsintersectnoslip.problem.formulation.output.output]
writer = pylith.meshio.DataWriterHDF5
-writer.filename = sheardispnosliprefine.h5
+writer.filename = faultsintersectnoslip.h5
-[sheardispnosliprefine.timedependent.interfaces.fault.output]
+[faultsintersectnoslip.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvg
writer = pylith.meshio.DataWriterHDF5
-writer.filename = sheardispnosliprefine-fault.h5
+writer.filename = faultsintersectnoslip-elastic.h5
-[sheardispnosliprefine.timedependent.materials.elastic.output]
+[faultsintersectnoslip.timedependent.materials.viscoelastic.output]
cell_filter = pylith.meshio.CellFilterAvg
writer = pylith.meshio.DataWriterHDF5
-writer.filename = sheardispnosliprefine-elastic.h5
+writer.filename = faultsintersectnoslip-viscoelastic.h5
-[sheardispnosliprefine.timedependent.materials.viscoelastic.output]
-cell_filter = pylith.meshio.CellFilterAvg
+[faultsintersectnoslip.timedependent.interfaces.faultx.output]
+writer = pylith.meshio.DataWriterHDF5
+writer.filename = faultsintersectnoslip-faultx.h5
+
+[faultsintersectnoslip.timedependent.interfaces.faulty.output]
writer = pylith.meshio.DataWriterHDF5
-writer.filename = sheardispnosliprefine-viscoelastic.h5
+writer.filename = faultsintersectnoslip-faulty.h5
diff --git a/tests_auto/3d/tet4/testpylith.py b/tests_auto/3d/tet4/testpylith.py
index 0e402f9..1192251 100755
--- a/tests_auto/3d/tet4/testpylith.py
+++ b/tests_auto/3d/tet4/testpylith.py
@@ -45,6 +45,9 @@ def suite():
from TestFaultsIntersect import TestFaultsIntersect
suite.addTest(unittest.makeSuite(TestFaultsIntersect))
+ from TestFaultsIntersectNoSlip import TestFaultsIntersectNoSlip
+ suite.addTest(unittest.makeSuite(TestFaultsIntersectNoSlip))
+
return suite
More information about the CIG-COMMITS
mailing list