[cig-commits] [commit] knepley/fix-faults-parallel: Remove obsolete example (Green's function kludge). (1507a08)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue May 27 08:29:11 PDT 2014


Repository : https://github.com/geodynamics/pylith

On branch  : knepley/fix-faults-parallel
Link       : https://github.com/geodynamics/pylith/compare/bc4ad8c1e4f7cbe0286a7c030323fe6906bf7cbf...a6dcee9c56c2ed915b63f90186133bd8ce8789a9

>---------------------------------------------------------------

commit 1507a0865ff0d22e2fe2a48df25d6a61798ce9b5
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Tue May 27 08:26:18 2014 -0700

    Remove obsolete example (Green's function kludge).
    
    Remove examples/greensfns/hex8. This example was a kludge that Charles
    put together before we implemented the user friendly
    FaultCohesiveImpulses.


>---------------------------------------------------------------

1507a0865ff0d22e2fe2a48df25d6a61798ce9b5
 examples/greensfns/hex8/README                |  63 -----
 examples/greensfns/hex8/box_hex8_1000m.exo    | Bin 16900 -> 0 bytes
 examples/greensfns/hex8/finalslip.spatialdb   |  31 ---
 examples/greensfns/hex8/geometry.jou          |  39 ---
 examples/greensfns/hex8/gfgen.cfg             |  14 -
 examples/greensfns/hex8/gfgen.py              | 384 --------------------------
 examples/greensfns/hex8/gfoutput.cfg          |  51 ----
 examples/greensfns/hex8/initial-run.cfg       |  66 -----
 examples/greensfns/hex8/mat_elastic.spatialdb |  26 --
 examples/greensfns/hex8/mesh_hex8_1000m.jou   |  86 ------
 examples/greensfns/hex8/pylithapp.cfg         | 139 ----------
 examples/greensfns/hex8/sliptime.spatialdb    |  26 --
 12 files changed, 925 deletions(-)

diff --git a/examples/greensfns/hex8/README b/examples/greensfns/hex8/README
deleted file mode 100644
index 38370c3..0000000
--- a/examples/greensfns/hex8/README
+++ /dev/null
@@ -1,63 +0,0 @@
-**********************************************************************
-This example is obsolete. Please see examples/2d/greensfns for an
-up-to-date example.
-**********************************************************************
-
-
-In this directory are files that allow a primitive method of generating
-Green's functions using PyLith.  The impulses are specified amounts of
-strike-slip applied on the vertices of a fault, and the responses are
-displacements at the vertices on the ground surface. The method used is as
-follows:
-
-The entire problem is treated as a time-dependent elastic problem with
-time-varying slip. At each time step, a specified slip is applied for the
-desired impulse. For time step zero, this is all that needs to be done.
-For subsequent time steps, it is necessary to remove the applied impulse
-from the previous step. This is done by applying a unit negative impulse.
-It is necessary to generate a sequence of spatial databases to specify the
-slip at each time step. A Python application has been provided that
-generates these spatial databases, as well as a .cfg file to be used by
-PyLith and a file describing the impulses (metadata).
-
-Before the impulses can be generated, we first require a .vtk file
-containing fault information.  There are thus three steps required to
-generate the Green's functions:
-
-1.  Run PyLith once to generate the fault information file
-(gftest-initial-fault_info.vtk).  This may be done as follows:
-pylith initial-run.cfg
-
-2.  Edit the gfgen.cfg file as needed to provide the parameters for
-gfgen.py, then simply run gfgen.py:
-./gfgen.py
-
-3.  Finally, run PyLith again using the generated gftest.cfg file along
-with the spatial databases in gfspatialdb:
-pylith gftest.cfg gfoutput.cfg
-
-The gfoutput.cfg file simply contains output information, so that the
-impulse and response files end up in gfimpulses and gfresponses.
-
-When it has finished running, you will have a number of VTK files in the
-gfimpulses directory that show what the applied fault slip was for each
-time step. In the gfresponses directory you will have all of the resulting
-displacements on the ground surface. The time step number for each of these
-files indicates the impulse number to which they correspond. There will also
-be a metadata file that defines the location and fault orientation for each
-applied impulse.
-
-This method is not very sophisticated, but it provides a simple method for
-generating Green's functions without too much work. The main shortcoming at
-present is that the responses are only generated at the specified set of
-vertices. If users need responses at locations that do not correspond to one
-of the vertices in the mesh, they will need to do their own interpolation.
-In the future, we plan to provide a method that will allow PyLith to do the
-interpolation.  Also, this method does not provide a method for determining
-the seismic moment for each impulse. To do this it would be necessary to
-integrate over the fault elements attached to each impulse vertex. At
-present, it is probably easiest to do this by postprocessing using the
-fault mesh. Note that for problems involving variations in elastic
-properties, you will require property information for the entire mesh to
-compute seismic moment. Seismic potency may be a better quantity to use,
-since it is independent of material properties.
diff --git a/examples/greensfns/hex8/box_hex8_1000m.exo b/examples/greensfns/hex8/box_hex8_1000m.exo
deleted file mode 100644
index dcf2e86..0000000
Binary files a/examples/greensfns/hex8/box_hex8_1000m.exo and /dev/null differ
diff --git a/examples/greensfns/hex8/finalslip.spatialdb b/examples/greensfns/hex8/finalslip.spatialdb
deleted file mode 100644
index 9cc4a2e..0000000
--- a/examples/greensfns/hex8/finalslip.spatialdb
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
-//
-// This spatial database specifies the distribution of slip on the
-// fault surface. In this case we prescribe a piecewise linear, depth
-// dependent distribution of slip. The slip is 2.0 m left-lateral
-// with 0.25 m of reverse slip at the surface with a linear taper from
-// 2.0 m to 0.0 m from -2 km to -4 km.
-//
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 3
-  value-names =  left-lateral-slip  reverse-slip  fault-opening
-  value-units =  m  m  m
-  num-locs = 3
-  data-dim = 1 // Locations of data points form a line.
-  space-dim = 3
-  cs-data = cartesian {
-    to-meters = 1.0e+3 // Specify coordinates in km for convenience.
-    space-dim = 3
-  } // cs-data
-} // SimpleDB
-// Columns are
-// (1) x coordinate (km)
-// (2) y coordinate (km)
-// (3) z coordinate (km)
-// (4) left-lateral-slip (m) (right-lateral is negative)
-// (5) reverse-slip (m)
-// (6) fault-opening (m)
-0.0  0.0  0.0     2.00  0.25  0.00
-0.0  0.0 -2.0     2.00  0.00  0.00
-0.0  0.0 -4.0     0.00  0.00  0.00
diff --git a/examples/greensfns/hex8/geometry.jou b/examples/greensfns/hex8/geometry.jou
deleted file mode 100644
index c912576..0000000
--- a/examples/greensfns/hex8/geometry.jou
+++ /dev/null
@@ -1,39 +0,0 @@
-# ----------------------------------------------------------------------
-# Create block
-# ----------------------------------------------------------------------
-
-# Block is 6 km x 6 km x 4 km
-# -3 km <= x <= 3 km
-# -3 km <= y <= 3 km
-# -4 km <= z <= 0 km
-reset
-brick x 6000 y 6000 z 4000
-
-# Translate block so the top is at z=0
-volume 1 move x 0 y 0 z -2000
-
-# ----------------------------------------------------------------------
-# Create interface surfaces
-# ----------------------------------------------------------------------
-create planar surface with plane xplane offset 0
-surface 7 name "fault_surface"
-create planar surface with plane zplane offset -2000
-surface 8 name "material_interface"
-
-# ----------------------------------------------------------------------
-# Divide volumes using interface surfaces
-# ----------------------------------------------------------------------
-webcut volume 1 with plane surface fault_surface
-webcut volume 1 with plane surface material_interface
-webcut volume 4 with plane surface material_interface
-volume 1 name "elastic_xpos"
-volume 4 name "elastic_xneg"
-volume 5 name "visco_xpos"
-volume 6 name "visco_xneg"
-
-# ----------------------------------------------------------------------
-# Imprint all volumes, merging surfaces
-# ----------------------------------------------------------------------
-imprint all with volume all
-merge all
-delete body 2 3
diff --git a/examples/greensfns/hex8/gfgen.cfg b/examples/greensfns/hex8/gfgen.cfg
deleted file mode 100644
index c1e100b..0000000
--- a/examples/greensfns/hex8/gfgen.cfg
+++ /dev/null
@@ -1,14 +0,0 @@
-[gfgen]
-
-# Configuration file for gfgen.py application.
-# The application sets up impulses for generating Green's functions using
-# PyLith.
-
-fault_info_file = gftest-initial-fault_info.vtk
-spatialdb_output_root = gfspatialdb/gfimpulse
-slip_time_spatialdb = sliptime.spatialdb
-metadata_output_file = gftest-metadata.txt
-config_output_file = gftest.cfg
-impulse_type = left-lateral-slip
-impulse_value = 1.0*cm
-impulse_number_width = 4
diff --git a/examples/greensfns/hex8/gfgen.py b/examples/greensfns/hex8/gfgen.py
deleted file mode 100644
index fba1007..0000000
--- a/examples/greensfns/hex8/gfgen.py
+++ /dev/null
@@ -1,384 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-#                           Brad T. Aagaard
-#                        U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file examples/greensfns/hex8/gfgen.py
-
-## @brief Python application to set up impulses for generating Green's functions
-## using PyLith. This application creates the necessary spatialdb files, a
-## metadata file describing each impulse, and a PyLith .cfg file to set up the
-## impulses.
-
-import math
-import numpy
-import os
-import re
-from pyre.units.time import s
-from pyre.units.length import m
-
-from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
-from spatialdata.geocoords.CSCart import CSCart
-from pyre.applications.Script import Script as Application
-
-class GfGen(Application):
-  """
-  Python application to set up impulses for generating Green's functions
-  using PyLith. This application creates the necessary spatialdb files, a
-  metadata file describing each impulse, and a PyLith .cfg file to set up the
-  impulses.
-  """
-  
-  class Inventory(Application.Inventory):
-    """
-    Python object for managing GfGen facilities and properties.
-    """
-
-    ## @class Inventory
-    ## Python object for managing GfGen facilities and properties.
-    ##
-    ## \b Properties
-    ## @li \b fault_info_file  Name of VTK file containing fault info.
-    ## @li \b spatialdb_output_root Root name for output spatialdb files.
-    ## @li \b slip_time_spatialdb Name of spatialdb file containing slip times.
-    ## @li \b metadata_output_file Name of output file containing metadata.
-    ## @li \b config_output_file Name of .cfg output file.
-    ## @li \b impulse_type Type of impulse to be applied.
-    ## @li \b impulse_value Amount of impulse to apply.
-    ## @li \b impulse_number_width Width of impulse number field.
-    ##
-    ## \b Facilities
-    ## @li \b geometry  Geometry for output database.
-
-    import pyre.inventory
-
-    faultInfoFile = pyre.inventory.str("fault_info_file",
-                                       default="fault_info.vtk")
-    faultInfoFile.meta['tip'] = "Name of VTK file containing fault info."
-
-    spatialdbOutputRoot = pyre.inventory.str("spatialdb_output_root",
-                                             default="impulse.spatialdb")
-    spatialdbOutputRoot.meta['tip'] = "Root name for output spatialdb files."
-
-    slipTimeSpatialdb = pyre.inventory.str("slip_time_spatialdb",
-                                             default="sliptime.spatialdb")
-    slipTimeSpatialdb.meta['tip'] = "Name of spatialdb file with slip times."
-
-    metadataOutputFile = pyre.inventory.str("metadata_output_file",
-                                            default="impulse_metadata.txt")
-    metadataOutputFile.meta['tip'] = "Name of output file containing metadata."
-
-    configOutputFile = pyre.inventory.str("config_output_file",
-                                          default="greenfn.cfg")
-    configOutputFile.meta['tip'] = "Name of .cfg output file."
-
-    impulseType = pyre.inventory.str("impulse_type",
-                                     default="left-lateral-slip",
-                                     validator=pyre.inventory.choice([
-      "left-lateral-slip","reverse-slip","fault-opening"]))
-    impulseType.meta['tip'] = "Type of impulse to apply."
-
-    impulseValue = pyre.inventory.dimensional("impulse_value", default=1.0*m)
-    impulseValue.meta['tip'] = "Impulse value."
-
-    impulseNumberWidth = pyre.inventory.int("impulse_number_width", default=4)
-    impulseNumberWidth.meta['tip'] = "Width of impulse number field."
-
-    from spatialdata.spatialdb.generator.Geometry import Geometry
-    geometry = pyre.inventory.facility("geometry", family="geometry",
-                                       factory=Geometry)
-    geometry.meta['tip'] = "Geometry for output database."
-
-  
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="gfgen"):
-    Application.__init__(self, name)
-
-    self.numFaultVertices = 0
-    self.numFaultCells = 0
-    self.spaceDim = 0
-    self.cellType = ""
-
-    self.faultVertices = None
-    self.normalDir = None
-    self.strikeDir = None
-    self.dipDir = None
-
-    return
-
-
-  def main(self):
-    # import pdb
-    # pdb.set_trace()
-    self._readFaultInfo()
-    self._makeSpatialdb()
-    self._makeConfig()
-    self._makeMetadata()
-    return
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Setup members using inventory.
-    """
-    Application._configure(self)
-    # import pdb
-    # pdb.set_trace()
-
-    # File info.
-    self.faultInfoFile = self.inventory.faultInfoFile
-    self.spatialdbOutputRoot = self.inventory.spatialdbOutputRoot
-    self.slipTimeSpatialdb = self.inventory.slipTimeSpatialdb
-    self.metadataOutputFile = self.inventory.metadataOutputFile
-    self.configOutputFile = self.inventory.configOutputFile
-
-    # Impulse information
-    self.impulseType = self.inventory.impulseType
-    self.impulseValue = self.inventory.impulseValue.value
-    self.impulseNumberWidth = self.inventory.impulseNumberWidth
-
-    # Spatialdb output facilities
-    self.geometry = self.inventory.geometry
-
-    return
-      
-
-  def _readFaultInfo(self):
-    """
-    Function to read fault information from VTK file.
-    """
-    from enthought.mayavi.sources.vtk_file_reader import VTKFileReader
-    from enthought.tvtk.api import tvtk
-
-    reader = VTKFileReader()
-    reader.initialize(self.faultInfoFile)
-    data = reader.outputs[0]
-
-    # Get cell and vertex info.
-    cellVtk = data.get_cells()
-    self.numFaultCells = cellVtk.number_of_cells
-    self.faultCellArray = cellVtk.to_array()
-    self.faultVertices = data._get_points().to_array()
-    self.cellType = data.get_cell_type(0)
-    (self.numFaultVertices, self.spaceDim) = self.faultVertices.shape
-
-    # Get vertex fields and extract normal vectors.
-    vertData = data._get_point_data()
-    numVertDataArrays = vertData._get_number_of_arrays()
-    for vertDataArray in range(numVertDataArrays):
-      arrayName = vertData.get_array_name(vertDataArray)
-      if (arrayName == "normal_dir"):
-        self.normalDir = vertData.get_array(vertDataArray).to_array()
-      elif (arrayName == "strike_dir"):
-        self.strikeDir = vertData.get_array(vertDataArray).to_array()
-      elif (arrayName == "dip_dir"):
-        self.dipDir = vertData.get_array(vertDataArray).to_array()
-
-    return
-
-
-  def _makeSpatialdb(self):
-    """
-    Function to generate a set of spatial databases (one for each impulse).
-    """
-
-    # Create empty arrays for impulse values.
-    # Only array1 will be modified.
-    array1 = numpy.zeros( (self.numFaultVertices,), dtype=numpy.float64)
-    array2 = numpy.zeros( (self.numFaultVertices,), dtype=numpy.float64)
-
-    # Set up info for arrays that won't be modified.
-    if (self.impulseType == "left-lateral-slip"):
-      info2 = {'name': "fault-opening",
-               'units': "m",
-               'data': array2.flatten()}
-      if (self.spaceDim == 3):
-        info3 = {'name': "reverse-slip",
-                 'units': "m",
-                 'data': array2.flatten()}
-    elif (self.impulseType == "fault-opening"):
-      info2 = {'name': "left-lateral-slip",
-               'units': "m",
-               'data': array2.flatten()}
-      if (self.spaceDim == 3):
-        info3 = {'name': "reverse-slip",
-                 'units': "m",
-                 'data': array2.flatten()}
-    elif (self.impulseType == "reverse-slip"):
-      info2 = {'name': "left-lateral-slip",
-               'units': "m",
-               'data': array2.flatten()}
-      info3 = {'name': "fault-opening",
-               'units': "m",
-               'data': array2.flatten()}
-
-    # Create root output filename.
-    suffIndex = self.spatialdbOutputRoot.rfind(".spatialdb")
-    outputRoot = self.spatialdbOutputRoot
-    if (suffIndex != -1):
-      outputRoot = self.spatialdbOutputRoot[:suffIndex - 1]
-
-    # Set data dimension.
-    dataDim = self.spaceDim - 1
-    
-    # Loop over impulses to generate and modify the appropriate entries.
-    for impulse in range(self.numFaultVertices):
-
-      # Set filename
-      impulseNum = int(impulse)
-      impulseString = repr(impulseNum).rjust(self.impulseNumberWidth, '0')
-      filename = outputRoot + "_i" + impulseString + ".spatialdb"
-      writer = SimpleIOAscii()
-      writer.inventory.filename = filename
-      writer._configure()
-
-      # Modify database values.
-      array1[impulse] = self.impulseValue
-      if (impulse > 0):
-        array1[impulse - 1] = -self.impulseValue
-      
-      if (impulse > 1):
-	array1[impulse - 2] = 0.0
-      info1 = {'name': self.impulseType,
-               'units': "m",
-               'data': array1.flatten()}
-
-      # Create data and write it to a database.
-      if (self.spaceDim == 2):
-        data = {'points': self.faultVertices,
-                'coordsys': self.geometry.coordsys,
-                'data_dim': dataDim,
-                'values': [info1, info2]}
-      else:
-        data = {'points': self.faultVertices,
-                'coordsys': self.geometry.coordsys,
-                'data_dim': dataDim,
-                'values': [info1, info2, info3]}
-
-      writer.write(data)
-
-    return
-
-    
-  def _makeConfig(self):
-    """
-    Function to create .cfg file for creating Green's functions.
-    """
-    f = open(self.configOutputFile, 'w')
-    newLine = "\n"
-
-    # Write top-level header
-    topHeader = "# -*- Python -*-" + newLine + "[pylithapp]" + newLine + newLine
-    f.write(topHeader)
-    
-    # Write time step information
-    totalTime = "total_time = " + repr(float(self.numFaultVertices - 1)) + \
-                "*year" + newLine
-    dt  = "dt = 1.0*year" + newLine
-    divider = "# ----------------------------------------------------------" + \
-              newLine
-    problem = divider + "# problem" + newLine + divider + \
-              "[pylithapp.timedependent.implicit.time_step]" + newLine + \
-              totalTime + dt
-    f.write(problem)
-    faults = divider + "# faults" + newLine + divider + \
-             "[pylithapp.timedependent.interfaces.fault]" + newLine
-    f.write(newLine)
-    f.write(faults)
-    eqSrcs = "eq_srcs = ["
-    f.write(eqSrcs)
-    comma = ","
-
-    # Write eq_srcs list.
-    for impulse in range(self.numFaultVertices):
-      srcName = repr(impulse).rjust(self.impulseNumberWidth, '0')
-      f.write(srcName)
-      if (impulse != self.numFaultVertices - 1):
-        f.write(comma)
-
-    srcEnd = "]" + newLine
-    f.write(srcEnd)
-
-    # Base strings for eq_src info.
-    baseHeader = "[pylithapp.timedependent.interfaces.fault.eq_srcs."
-    baseOrigin = "origin_time = "
-    suffIndex = self.spatialdbOutputRoot.rfind(".spatialdb")
-    slipRoot = self.spatialdbOutputRoot
-    if (suffIndex != -1):
-      slipRoot = self.spatialdbOutputRoot[:suffIndex - 1]
-    baseSlip = "slip_function.slip.iohandler.filename = " + slipRoot + "_i"
-    slipTime = "slip_function.slip_time.iohandler.filename = " + \
-               self.slipTimeSpatialdb + newLine
-    slipLabelRoot = "slip_function.slip.label = Slip for impulse "
-    slipTimeLabelRoot = "slip_function.slip_time.label = Slip time for impulse "
-
-    # Write info for each eq_src.
-    for impulse in range(self.numFaultVertices):
-      f.write(newLine)
-      srcName = repr(impulse).rjust(self.impulseNumberWidth, '0')
-      originTime = float(impulse)
-      originString = str(originTime) + "*year\n"
-      f.write(baseHeader + srcName + "]\n")
-      f.write(baseOrigin + originString)
-      f.write(slipLabelRoot + srcName + newLine)
-      f.write(slipTimeLabelRoot + srcName + newLine)
-      f.write(baseSlip + srcName + ".spatialdb\n")
-      f.write(slipTime)
-
-    f.close()
-    
-    return
-  
-
-  def _makeMetadata(self):
-    """
-    Function to write out metadata file containing information for each
-    impulse.
-    """
-    f = open(self.metadataOutputFile, 'w')
-    tab = "\t"
-    newLine = "\n"
-    header = "Impulse #" + tab + "X-Coord" + tab + "Y-Coord" + tab + \
-             "Z-Coord" + tab + "Normal-X" + tab + "Normal-Y" + tab + \
-             "Normal-Z" + tab + "Strike-X" + tab + "Strike-Y" + tab + \
-             "Strike-Z" + tab + "Dip-X" + tab + "Dip-Y" + tab + "Dip-Z" \
-             + newLine
-    f.write(header)
-    for impulse in range(self.numFaultVertices):
-      x = str(self.faultVertices[impulse, 0]) + tab
-      y = str(self.faultVertices[impulse, 1]) + tab
-      z = str(self.faultVertices[impulse, 2]) + tab
-      xNorm = str(self.normalDir[impulse, 0]) + tab
-      yNorm = str(self.normalDir[impulse, 1]) + tab
-      zNorm = str(self.normalDir[impulse, 2]) + tab
-      xStrike = str(self.strikeDir[impulse, 0]) + tab
-      yStrike = str(self.strikeDir[impulse, 1]) + tab
-      zStrike = str(self.strikeDir[impulse, 2]) + tab
-      xDip = str(self.dipDir[impulse, 0]) + tab
-      yDip = str(self.dipDir[impulse, 1]) + tab
-      zDip = str(self.dipDir[impulse, 2]) + newLine
-      outLine = str(impulse) + tab + x + y + z + xNorm + yNorm + zNorm + \
-                xStrike + yStrike + zStrike + xDip + yDip + zDip
-      f.write(outLine)
-
-    f.close()
-
-    return
-  
-
-# ----------------------------------------------------------------------
-if __name__ == '__main__':
-  app = GfGen()
-  app.run()
-
-# End of file
diff --git a/examples/greensfns/hex8/gfoutput.cfg b/examples/greensfns/hex8/gfoutput.cfg
deleted file mode 100644
index 0ff1a96..0000000
--- a/examples/greensfns/hex8/gfoutput.cfg
+++ /dev/null
@@ -1,51 +0,0 @@
-[pylithapp]
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies output information for Green's function impulses
-# and responses. Additional information is contained in pylithapp.cfg,
-# which is read by default, and in gftest.cfg, which is created by the
-# gfgen.py application.
-#
-# To generate Green's functions:
-# pylith gftest.cfg gfoutput.cfg
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[pylithapp.problem.formulation.output.domain]
-skip = 2000
-writer.filename = gftest.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for VTK domain output of solution over ground surface.
-[pylithapp.problem.formulation.output.subdomain]
-label = face_zpos ; nodeset for subdomain
-skip = 0
-writer.filename = gfresponses/gfresponse.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for vtk fault rupture output.
-[pylithapp.timedependent.interfaces.fault.output]
-vertex_info_fields = [normal_dir,strike_dir,dip_dir]
-skip = 0
-writer.filename = gfimpulses/gfimpulse.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.elastic_upper.output]
-skip = 2000
-cell_filter = pylith.meshio.CellFilterAvg
-writer.filename = gftest-elastic_upper.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-[pylithapp.timedependent.materials.elastic_lower.output]
-skip = 2000
-cell_filter = pylith.meshio.CellFilterAvg
-writer.filename = gftest-elastic_lower.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
diff --git a/examples/greensfns/hex8/initial-run.cfg b/examples/greensfns/hex8/initial-run.cfg
deleted file mode 100644
index 6c254df..0000000
--- a/examples/greensfns/hex8/initial-run.cfg
+++ /dev/null
@@ -1,66 +0,0 @@
-[pylithapp]
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies parameters specific to the fault slip and
-# output information for running an initial simulation.
-# The other parameters are specificed in the
-# pylithapp.cfg file which PyLith reads by default.
-#
-# To run the simulation:
-# pylith initial-run.cfg
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.implicit.time_step]
-# Define the total time for the simulation and the time step size.
-# Overwrite values in pylithapp.cfg
-total_time = 0.0*year ; total time of simulation
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces.fault]
-output.vertex_info_fields = [normal_dir,strike_dir,dip_dir]
-
-# The slip time and final slip are defined in spatial databases.
-[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
-slip.label = Applied slip for initial run
-slip.iohandler.filename = finalslip.spatialdb
-slip_time.label = Slip initiation time
-slip_time.iohandler.filename = sliptime.spatialdb
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[pylithapp.problem.formulation.output.domain]
-writer.filename = gftest-initial.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for VTK domain output of solution over ground surface.
-[pylithapp.problem.formulation.output.subdomain]
-label = face_zpos ; nodeset for subdomain
-writer.filename = gftest-initial-groundsurf.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for vtk fault rupture output.
-[pylithapp.timedependent.interfaces.fault.output]
-writer.filename = gftest-initial-fault.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.elastic_upper.output]
-cell_filter = pylith.meshio.CellFilterAvg
-writer.filename = gftest-initial-elastic_upper.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
-
-[pylithapp.timedependent.materials.elastic_lower.output]
-cell_filter = pylith.meshio.CellFilterAvg
-writer.filename = gftest-initial-elastic_lower.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
diff --git a/examples/greensfns/hex8/mat_elastic.spatialdb b/examples/greensfns/hex8/mat_elastic.spatialdb
deleted file mode 100644
index 526fab2..0000000
--- a/examples/greensfns/hex8/mat_elastic.spatialdb
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- 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 = 3
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 3
-  }
-}
-// 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  0.0   2500.0  3000.0  5291.502622129181
diff --git a/examples/greensfns/hex8/mesh_hex8_1000m.jou b/examples/greensfns/hex8/mesh_hex8_1000m.jou
deleted file mode 100644
index b5f1865..0000000
--- a/examples/greensfns/hex8/mesh_hex8_1000m.jou
+++ /dev/null
@@ -1,86 +0,0 @@
-# ----------------------------------------------------------------------
-# Generate geometry
-# ----------------------------------------------------------------------
-playback 'geometry.jou'
-
-# ----------------------------------------------------------------------
-# Set discretization size
-# ----------------------------------------------------------------------
-volume all size 1000
-
-# ----------------------------------------------------------------------
-# Generate the mesh
-# ----------------------------------------------------------------------
-mesh volume all
-
-# ----------------------------------------------------------------------
-# Create blocks for materials
-# ----------------------------------------------------------------------
-block 1 volume 1 4
-block 1 name "elastic_upper"
-block 2 volume 5 6
-block 2 name "elastic_lower"
-
-# ----------------------------------------------------------------------
-# 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 20
-group "face_xpos" add node in surface 28
-nodeset 11 group face_xpos
-nodeset 11 name "face_xpos"
-
-# ----------------------------------------------------------------------
-# Create nodeset for -x face
-# ----------------------------------------------------------------------
-group "face_xneg" add node in surface 30
-group "face_xneg" add node in surface 38
-nodeset 12 group face_xneg
-nodeset 12 name "face_xneg"
-
-# ----------------------------------------------------------------------
-# Create nodeset for +y face
-# ----------------------------------------------------------------------
-group "face_ypos" add node in surface 21
-group "face_ypos" add node in surface 27
-group "face_ypos" add node in surface 33
-group "face_ypos" add node in surface 35
-nodeset 13 group face_ypos
-nodeset 13 name "face_ypos"
-
-# ----------------------------------------------------------------------
-# Create nodeset for -y face
-# ----------------------------------------------------------------------
-group "face_yneg" add node in surface 23
-group "face_yneg" add node in surface 25
-group "face_yneg" add node in surface 31
-group "face_yneg" add node in surface 37
-nodeset 14 group face_yneg
-nodeset 14 name "face_yneg"
-
-# ----------------------------------------------------------------------
-# Create nodeset for -z face
-# ----------------------------------------------------------------------
-group "face_zneg" add node in surface 12
-group "face_zneg" add node in surface 16
-nodeset 15 group face_zneg
-nodeset 15 name "face_zneg"
-
-# ----------------------------------------------------------------------
-# Create nodeset for +z face
-# ----------------------------------------------------------------------
-group "face_zpos" add node in surface 10
-group "face_zpos" add node in surface 17
-nodeset 16 group face_zpos
-nodeset 16 name "face_zpos"
-
-# ----------------------------------------------------------------------
-# Export exodus file
-# ----------------------------------------------------------------------
-export mesh "box_hex8_1000m.exo" dimension 3 overwrite
diff --git a/examples/greensfns/hex8/pylithapp.cfg b/examples/greensfns/hex8/pylithapp.cfg
deleted file mode 100644
index cdd4159..0000000
--- a/examples/greensfns/hex8/pylithapp.cfg
+++ /dev/null
@@ -1,139 +0,0 @@
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-# Turn on some journals to show progress.
-[pylithapp.journal.info]
-timedependent = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshiocubit = 1
-implicitelasticity = 1
-faultcohesivekin = 1
-fiatlagrange = 1
-#quadrature3d = 1
-
-[pylithapp.journal.debug]
-pylithapp = 1
-problem = 1
-implicit = 1
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-#debug = 1   ; uncomment to get very verbose mesh information
-
-# Change the default mesh importer to the CUBIT importer.
-reader = pylith.meshio.MeshIOCubit
-
-[pylithapp.mesh_generator.reader]
-# Set filename of mesh to import.
-filename = box_hex8_1000m.exo
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-#normalizer = spatialdata.units.NondimElasticQuasistatic
-# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
-bc = [x_pos,x_neg,z_neg]
-
-# Set interfaces to an array of 1 fault: 'fault'.
-interfaces = [fault]
-
-[pylithapp.timedependent.implicit]
-# Set the output to an array of 2 output managers.
-# We will output the solution over the domain and the ground surface.
-output = [domain,subdomain]
-
-# Set subdomain component to OutputSolnSubset (subset of domain).
-output.subdomain = pylith.meshio.OutputSolnSubset
-
-[pylithapp.timedependent.formulation.time_step]
-# Define the total time for the simulation and the default time step size.
-total_time = 0.0*s ; total time of simulation
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-# We use the default ZeroDispDB for all faces
-[pylithapp.timedependent.bc.x_pos]
-bc_dof = [0, 1]
-label = face_xpos
-db_initial.label = Dirichlet BC on +x
-
-[pylithapp.timedependent.bc.x_neg]
-bc_dof = [0, 1]
-label = face_xneg
-db_initial.label = Dirichlet BC on -x
-
-[pylithapp.timedependent.bc.z_neg]
-bc_dof = [2]
-label = face_zneg
-db_initial.label = Dirichlet BC on -z
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-
-# Set materials to an array of 2 materials:
-#   'elastic' and 'viscoelastic'
-materials = [elastic_upper,elastic_lower]
-
-[pylithapp.timedependent.materials.elastic_upper]
-label = Upper elastic material
-id = 1
-db_properties.label = Properties for upper crust
-db_properties.iohandler.filename = mat_elastic.spatialdb
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 3
-
-[pylithapp.timedependent.materials.elastic_lower]
-label = Lower elastic material
-id = 2
-db_properties.label = Properties for lower crust
-db_properties.iohandler.filename = mat_elastic.spatialdb
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 3
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
-fault = pylith.faults.FaultCohesiveKin
-
-# Set the parameters for the fault interface conditions.
-[pylithapp.timedependent.interfaces.fault]
-label = fault
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 2
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-# Set the solver options.
-
-[pylithapp.petsc]
-# Preconditioner settings.
-pc_type = asm
-sub_pc_factor_shift_type = nonzero
-
-# Convergence parameters.
-ksp_rtol = 1.0e-8
-ksp_atol = 1.0e-12
-ksp_max_it = 100
-ksp_gmres_restart = 50
-
-# Linear solver monitoring options.
-ksp_monitor = true
-ksp_view = true
-ksp_converged_reason = true
-ksp_error_if_not_converged = true
-
-# PETSc log summary.
-log_summary = true
-# start_in_debugger = true
diff --git a/examples/greensfns/hex8/sliptime.spatialdb b/examples/greensfns/hex8/sliptime.spatialdb
deleted file mode 100644
index b6fc5db..0000000
--- a/examples/greensfns/hex8/sliptime.spatialdb
+++ /dev/null
@@ -1,26 +0,0 @@
-// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
-//
-// This spatial database specifies the distribution of the slip
-// initiation time over the fault surface for the kinematic fault
-// rupture. We specify a slip time of 0.0 s so that the slip occurs at
-// the origin time of the earthquake rupture.
-//
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 1
-  value-names =  slip-time
-  value-units =  s
-  num-locs = 1
-  data-dim = 0 // data is uniform (1 location)
-  space-dim = 3
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 3
-  }
-}
-// Columns are
-// (1) x coordinate (m)
-// (2) y coordinate (m)
-// (3) z coordinate (m)
-// (4) Slip initiation time (s)
-0.0  0.0  0.0   0.0



More information about the CIG-COMMITS mailing list