[cig-commits] r20034 - in short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns: . reverse reverse/output strikeslip

brad at geodynamics.org brad at geodynamics.org
Thu May 3 14:32:38 PDT 2012


Author: brad
Date: 2012-05-03 14:32:38 -0700 (Thu, 03 May 2012)
New Revision: 20034

Added:
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/Makefile.am
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/README
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/createbc.jou
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqsim.cfg
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqslip.spatialdb
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/geometry.jou
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/gradient.jou
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/greensfns.cfg
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mat_elastic.spatialdb
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.exo
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.jou
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output/
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output/Makefile.am
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output_points.txt
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/pylithapp.cfg
Modified:
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/Makefile.am
   short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/pylithapp.cfg
Log:
Added reverse faulting Green's function example.

Modified: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/Makefile.am	2012-05-03 20:33:21 UTC (rev 20033)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/Makefile.am	2012-05-03 21:32:38 UTC (rev 20034)
@@ -17,7 +17,8 @@
 #
 
 SUBDIRS = \
-	strikeslip 
+	strikeslip \
+	reverse
 
 
 # End of file 

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/Makefile.am	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/Makefile.am	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,38 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# 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-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+dist_noinst_DATA = \
+	README \
+	pylithapp.cfg \
+	eqsim.cfg \
+	greensfns.cfg \
+	geometry.jou \
+	tri3.jou \
+	gradient.jou \
+	createbc.jou \
+	mesh_tri3.exo \
+	eqslip.spatialdb \
+	impulse_amplitude.spatialdb \
+	mat_elastic.spatialdb
+
+
+SUBDIRS = \
+	output
+
+
+# End of file 

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/README
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/README	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/README	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,88 @@
+The example in this directory demonstrates the use of computing static
+Green's functions using PyLith and using them in a simple inversion
+for slip on a reverse fault.
+
+The main features of this example are:
+
+  * Generating a finite-element mesh using CUBIT
+    + Variable mesh resolution
+  * Spatially variable slip
+  * Computing Green's functions using PyLith
+
+The examples consists of two simulations. In the first simulation we
+compute the displacements due to a variable slip on a reverse
+fault (idealized in a 2-D model with plane-strain); this serves as the
+"observed" displacements. In the second simulation we compute Green's
+functions for the fault. We use these Green's functions in the second
+simulation and the observed displacements from the first simulation to
+invert for the slip (in the first simulation).
+
+The imposed slip in the first simulation includes a region of uniform
+slip with a linear taper at each end. We use uniform linear elastic
+properties with a plane-strain formulation.
+
+The parameters for the bulk constitutive models are defined in
+  mat_elastic.spatialdb
+
+The simulation will output the displacements on the ground surface as
+well as a selection of points (defined in output_points.txt).
+
+For each of the simulations, we recommend examining the displacements,
+stress field, and fault slip. 
+
+
+Mesh generation (optional)
+
+  NOTE: The result of this step will overwrite the included file
+        tri3_mesh.exo. You may want to copy/rename this file so that
+        you have a backup copy in case you have difficulty running
+        CUBIT.
+
+  Start CUBIT and play the journal file "mesh_tri3.jou". We highly
+  recommend that you study the contents of the journal files to
+  understand the mesh generation process.
+
+
+Step 1. Forward simulation
+
+  This simulation mimics an earthquake generating an observed
+  displacement field.
+
+  The parameters for the earthquake slip are defined in
+    eqslip.spatialdb
+
+  Run the simulation via the following command:
+    pylith eqsim.cfg.
+
+
+Step 2. Generate Green's functions
+
+  This simulation generates Green's functions for a subset of the fault.
+
+  The parameters for the amplitude (and sign) of the slip impulses are
+  defined in
+    impulse_amplitude.spatialdb
+
+  Run the simulation via the following command:
+    pylith --problem.pylith.problems.GreensFns
+
+
+Step 3. Invert for coseismic slip
+
+  ADD STUFF HERE
+
+
+Suggestions variations
+
+  The list below includes some suggested modifications to the problem
+  that will allow you to become more familiar with PyLith while
+  examining some interesting physics.
+
+  * Create a spatial variation in material properties. For example you
+    might create a velocity contrast across the fault.
+
+  * Adjust the slip distribution.
+
+  * Adjust the location and number of the observation points.
+
+  * Increase/decrease the resolution of the mesh.

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/createbc.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/createbc.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/createbc.jou	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 surface 8 9
+block 1 name "elastic"
+
+# ----------------------------------------------------------------------
+# 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 curve 14
+nodeset 11 group face_xpos
+nodeset 11 name "face_xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x face
+# ----------------------------------------------------------------------
+group "face_xneg" add node in curve 16
+nodeset 12 group face_xneg
+nodeset 12 name "face_xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +y face
+# ----------------------------------------------------------------------
+group "face_ypos" add node in curve 19 20
+nodeset 13 group face_ypos
+nodeset 13 name "face_ypos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -y face
+# ----------------------------------------------------------------------
+group "face_yneg" add node in curve 18 21
+nodeset 14 group face_yneg
+nodeset 14 name "face_yneg"
+

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqsim.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqsim.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqsim.cfg	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,70 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This simulation computes the deformation due to earthquake slip for
+# the forward problem.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file specifies only the earthquake parameters for the
+# simulation. The general static and mesh parameters are specificed in
+# the pylithapp.cfg file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith eqsim.cfg
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set the type of fault interface condition.
+[pylithapp.problem.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+# Set the parameters for the fault interface condition.
+[pylithapp.problem.interfaces.fault]
+
+# The slip time and final slip are defined in spatial databases.
+[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
+slip.iohandler.filename = eqslip.spatialdb
+slip.query_type = linear
+slip.label = Final slip
+
+# Slip time is uniform, so use UniformDB for convenience
+slip_time = spatialdata.spatialdb.UniformDB
+slip_time.label = Slip time
+slip_time.values = [slip-time]
+slip_time.data = [0.0*year]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Domain
+[pylithapp.problem.formulation.output.domain]
+writer.filename = output/eqsim.h5
+
+# Ground surface
+[pylithapp.problem.formulation.output.groundsurf]
+writer.filename = output/eqsim-groundsurf.h5
+
+# Points
+[pylithapp.problem.formulation.output.points]
+writer.filename = output/eqsim-points.h5
+
+# Fault
+[pylithapp.problem.interfaces.fault.output]
+writer.filename = output/eqsim-fault.h5
+
+# Materials
+[pylithapp.problem.materials.elastic.output]
+writer.filename = output/eqsim-statevars.h5
+
+
+# End of file

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqslip.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqslip.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/eqslip.spatialdb	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,27 @@
+// -*- C++ -*- (syntax highlighting)
+//
+// This spatial database specifies the distribution of slip on the
+// fault surface for the forward problem.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  left-lateral-slip  fault-opening
+  value-units =  m  m
+  num-locs = 4
+  data-dim = 1 // Data is specified along a line.
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+    space-dim = 2
+  } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) reverse-slip (cm)
+// (4) fault-opening (cm)
+0.0  +99.9   -2.5  0.0
+0.0  -12.0   -2.5  0.0
+0.0  -15.0    0.0  0.0
+0.0  -99.9    0.0  0.0

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/geometry.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/geometry.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/geometry.jou	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,69 @@
+# -*- Python -*- (syntax highlighting)
+# ----------------------------------------------------------------------
+#
+# 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-2011 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+# CUBIT journal file with geometry for strike-slip Green's functions
+# example.
+#
+# ----------------------------------------------------------------------
+# Set units to SI.
+# ----------------------------------------------------------------------
+# {Units('si')}
+#
+# ----------------------------------------------------------------------
+# Reset geometry.
+# ----------------------------------------------------------------------
+reset
+
+# Make sure undo is off to prevent errors in stitching volumes.
+undo off
+
+# ----------------------------------------------------------------------
+# Create block
+# ----------------------------------------------------------------------
+# Block is 150.0 km x 80.0 km
+# -75.0 km <= x <= 75.0 km
+# -80.0 km <= y <= 0.0 km
+#
+#{blockWidth=150*km}
+#{blockHeight=80*km}
+#{blockLength=10*km}
+#
+#{faultWidth=30.0*km}
+#{faultDipAngle=45.0}
+#
+#{xoffset=0.5*faultWidth*cosd(faultDipAngle)}
+
+brick x {blockWidth} y {blockHeight} z {blockLength}
+volume 1 move x {-xoffset} y {-blockHeight/2.0} z 0.0
+
+create midsurface volume 1 surface 1 2
+delete volume 1
+
+# ----------------------------------------------------------------------
+# Create fault surface
+# ----------------------------------------------------------------------
+
+# Create fault (yz plane) at x = 0.0
+split surface 7 across location position 0 0 0 location position {-blockHeight/tand(faultDipAngle)} {-blockHeight} 0
+split curve 17 at position {-faultWidth*cosd(faultDipAngle)} {-faultWidth*sind(faultDipAngle)} 0
+curve 23 name "fault_surface"
+
+# ----------------------------------------------------------------------
+# Imprint all volumes, merging surfaces
+# ----------------------------------------------------------------------
+imprint all
+merge all
+

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/gradient.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/gradient.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/gradient.jou	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,55 @@
+# ----------------------------------------------------------------------
+# Set vertex spacing with increasing spacing away from fault
+# ----------------------------------------------------------------------
+#{bias_factor=1.05}
+
+# Function for computing discretization size at end of curve with bias
+#{fun_dx='dxStart*bias_factor**ceil( ln(1-curveL/dxStart*(1-bias_factor))/ln(bias_factor))'}
+
+# ----------------------------------------------------------------------
+# Compute sizes at curve endpoints
+# ----------------------------------------------------------------------
+
+# dxA - size at vertex 11
+#{dxStart=dx}{curveL=Length(19)}{execute("dxA="//fun_dx)}
+
+# dxB - size at vertex 12
+#{dxStart=dx}{curveL=Length(20)}{execute("dxB="//fun_dx)}
+
+# dxC - size at vertex 13, 10
+#{dxStart=dx}{curveL=Length(22)}{execute("dxC="//fun_dx)}
+
+# dxD - size at vertex 9
+#{dxStart=dxA}{curveL=Length(14)}{execute("dxD="//fun_dx)}
+
+# ----------------------------------------------------------------------
+# Reset sizes
+# ----------------------------------------------------------------------
+curve all scheme default
+surface all sizing function none
+
+# Set size on faults
+curve fault_surface size {dx}
+
+# Set bias on curves extending from faults
+curve 19 scheme bias fine size {dx} factor {bias_factor} start vertex 14
+curve 20 scheme bias fine size {dx} factor {bias_factor} start vertex 14
+curve 22 scheme bias fine size {dx} factor {bias_factor} start vertex 15
+
+curve 21 size {dxC}
+
+# A to D
+curve 18 scheme bias fine size {dxA} coarse size {dxD} start vertex 11
+
+# B to C
+curve 16 scheme bias fine size {dxA} coarse size {dxD} start vertex 12
+
+# D to C
+curve 18 scheme bias fine size {dxA} coarse size {dxD} start vertex 13
+
+surface 8 9 sizing function type bias start curve fault_surface factor {bias_factor}
+
+# End of file
+
+
+

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/greensfns.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/greensfns.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/greensfns.cfg	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,77 @@
+[greensfns]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This simulation computes the Green's functions for slip impulses at
+# points on the fault surface.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file specifies only the Green's function parameters for the
+# simulation. The general static and mesh parameters are specificed in
+# the pylithapp.cfg file which PyLith reads by default.
+#
+# NOTE: This file will be read automatically when the problem is
+# changed to "GreensFns" because the facility name is "greensfns", and
+# PyLith will look for a .cfg file matching the name of the facility.
+#
+# To run the simulation:
+# pylith --problem=pylith.problems.GreensFns
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[greensfns]
+fault_id = 100
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set the type of fault interface condition.
+[greensfns.interfaces]
+fault = pylith.faults.FaultCohesiveImpulses
+
+# Set the parameters for the fault interface condition.
+[greensfns.interfaces.fault]
+# Generate impulses for lateral slip only, no fault opening.
+# Fault DOF 0 corresponds to left-lateral slip.
+impulse_dof = [0]
+
+# Set the amplitude of the slip impulses (amplitude is nonzero on only
+# a subset of the fault)
+db_impulse_amplitude.label = Amplitude of slip impulses
+db_impulse_amplitude.iohandler.filename = impulse_amplitude.spatialdb
+db_impulse_amplitude.query_type = nearest
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Domain
+[greensfns.formulation.output.domain]
+writer.filename = output/greensfns.h5
+
+# Ground surface
+[greensfns.formulation.output.groundsurf]
+writer.filename = output/greensfns-groundsurf.h5
+
+# Points
+[greensfns.formulation.output.points]
+writer.filename = output/greensfns-points.h5
+
+# Fault
+[greensfns.interfaces.fault.output]
+writer.filename = output/greensfns-fault.h5
+
+# Materials
+[greensfns.materials.elastic.output]
+writer.filename = output/greensfns-statevars.h5
+
+
+# End of file

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,25 @@
+// -*- C++ -*- (syntax highlighting)
+//
+// This spatial database specifies the distribution of slip on the
+// fault surface for the forward problem.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 2
+  data-dim = 1 // Data is specified along a line.
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+    space-dim = 2
+  } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) reverse-slip (cm)
+// (4) fault-opening (cm)
+0.0  +18.0   -1.0
+0.0  +18.1    0.0

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mat_elastic.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mat_elastic.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mat_elastic.spatialdb	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,26 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of material
+// properties. In this case, the material properties are uniform.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3 // number of material property values
+  value-names =  density vs vp // names of the material property values
+  value-units =  kg/m**3  m/s  m/s // units
+  num-locs = 1 // number of locations
+  data-dim = 0
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+// Columns are
+// (1) x coordinate (m)
+// (2) y coordinate (m)
+// (3) z coordinate (m)
+// (4) density (kg/m^3)
+// (5) vs (m/s)
+// (6) vp (m/s)
+0.0  0.0   2500.0  3000.0  5291.502622129181

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.exo
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.exo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.jou
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/mesh_tri3.jou	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,42 @@
+# ----------------------------------------------------------------------
+# Create tri3 mesh at 100m resolution.
+# ----------------------------------------------------------------------
+
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size and scheme
+# ----------------------------------------------------------------------
+#{dx=1.0*km}
+surface all scheme trimesh
+playback 'gradient.jou'
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh surface all
+
+# ----------------------------------------------------------------------
+# Smooth mesh to improve quality
+# ----------------------------------------------------------------------
+surface all smooth scheme condition number beta 1.3 cpu 10
+smooth surface all
+
+# ----------------------------------------------------------------------
+# Setup boundary conditions.
+# ----------------------------------------------------------------------
+playback 'createbc.jou'
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "mesh_tri3.exo" dimension 2 overwrite
+
+
+# End of file
+
+
+

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output/Makefile.am	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output/Makefile.am	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,22 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# 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-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+dist_noinst_DATA =
+
+
+# End of file 

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output_points.txt
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output_points.txt	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/output_points.txt	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,21 @@
+# This file contains a list of points where we want the solution. The
+# solution will be interpolated to these points, so they need not
+# coincide with vertices of the mesh.
+#
+# We specify the coordinates in the default coordinate system (2-D
+# Cartesian). To specify points in another coordinate system, use the
+# coordsys component of the OutputSolnPoints object. The points will
+# be transformed into the coordinate system of the mesh before
+# interpolation.
+ -55.0  0.0
+ -45.0  0.0
+ -35.0  0.0
+ -25.0  0.0
+ -15.0  0.0
+  -5.0  0.0
+  +5.0  0.0
+ +15.0  0.0
+ +25.0  0.0
+ +35.0  0.0
+ +45.0  0.0
+ +55.0  0.0

Added: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/pylithapp.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/pylithapp.cfg	2012-05-03 21:32:38 UTC (rev 20034)
@@ -0,0 +1,165 @@
+[pylithapp]
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the general parameters common to the simulations
+# in this directory.
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+# Turn on some journals to show progress.
+[pylithapp.journal.info]
+timedependent = 1
+greensfns = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshimporter = 1
+meshiocubit = 1
+elasticityimplicit = 1
+faultcohesivekin = 1
+faultcohesiveimpulses = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+# Change the default mesh reader to the CUBIT reader.
+reader = pylith.meshio.MeshIOCubit
+reader.filename = mesh_tri3.exo
+# Reorder cells and vertices using Reverse Cuthill-McKee algorithm
+reorder_mesh = True
+
+[pylithapp.mesh_generator.reader]
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.problem]
+dimension = 2
+
+normalizer.length_scale = 1.0*km
+# Use relaxation time of 1.0*s so timesteps in output are in seconds
+normalizer.relaxation_time = 1.0*s
+
+[pylithapp.problem.formulation.time_step]
+# Define the total time for the simulation and the time step size.
+total_time = 0.0*s
+dt = 1.0*year
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Set array of materials to one material
+[pylithapp.problem]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.problem.materials.elastic]
+label = Elastic material
+# The id corresponds to the block id in CUBIT.
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+db_properties.label = Elastic properties
+
+# We must define the quadrature information for the material.
+# The fault cells are 2D (triangles).
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Create array of BCs, one for each side of the domain
+[pylithapp.problem]
+bc = [x_neg,x_pos,y_neg]
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+[pylithapp.problem.bc.x_pos]
+label = face_xpos
+bc_dof = [0]
+db_initial = pylith.bc.ZeroDispDB
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.problem.bc.x_neg]
+label = face_xneg
+bc_dof = [0]
+db_initial = pylith.bc.ZeroDispDB
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.problem.bc.y_neg]
+label = face_yneg
+bc_dof = [1]
+db_initial = pylith.bc.ZeroDispDB
+db_initial.label = Dirichlet BC on -y
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Create array of faults with one fault.
+[pylithapp.problem]
+interfaces = [fault]
+
+[pylithapp.problem.interfaces.fault]
+id = 100
+# The label corresponds to the name of the nodeset in CUBIT.
+label = fault
+
+# We must define the quadrature information for fault cells.
+# The fault cells are 1D (line).
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation]
+output = [domain,groundsurf,points]
+output.points = pylith.meshio.OutputSolnPoints
+output.groundsurf = pylith.meshio.OutputSolnSubset
+
+[pylithapp.problem.formulation.output.domain]
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+[pylithapp.problem.formulation.output.groundsurf]
+label = face_ypos
+writer = pylith.meshio.DataWriterHDF5SubMesh
+
+[pylithapp.problem.formulation.output.points]
+coordsys.space_dim = 2
+coordsys.units = km
+
+writer = pylith.meshio.DataWriterHDF5Mesh
+reader.filename = output_points.txt
+
+[pylithapp.problem.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+
+[pylithapp.problem.materials.elastic.output]
+cell_info_fields = []
+cell_data_fields = []
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+
+ksp_type = gmres
+ksp_gmres_restart = 100
+pc_type = asm
+sub_pc_factor_shift_type = nonzero
+
+ksp_rtol = 1.0e-8
+ksp_atol = 1.0e-20
+ksp_max_it = 500
+
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+
+log_summary = true
+
+# End of file

Modified: short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/pylithapp.cfg	2012-05-03 20:33:21 UTC (rev 20033)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/pylithapp.cfg	2012-05-03 21:32:38 UTC (rev 20034)
@@ -40,12 +40,9 @@
 dimension = 2
 
 normalizer.length_scale = 1.0*km
+# Use relaxation time of 1.0*s so timesteps in output are in seconds
 normalizer.relaxation_time = 1.0*s
 
-[pylithapp.problem.formulation]
-output = [domain,points]
-output.points = pylith.meshio.OutputSolnPoints
-
 [pylithapp.problem.formulation.time_step]
 # Define the total time for the simulation and the time step size.
 total_time = 0.0*s
@@ -124,6 +121,10 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
+[pylithapp.problem.formulation]
+output = [domain,points]
+output.points = pylith.meshio.OutputSolnPoints
+
 [pylithapp.problem.formulation.output.domain]
 writer = pylith.meshio.DataWriterHDF5Mesh
 



More information about the CIG-COMMITS mailing list