[cig-commits] r4402 - in
short/3D/PyLith/branches/pylith-0.8/tutorials: . splitcube
splitcube/archive
baagaard at geodynamics.org
baagaard at geodynamics.org
Tue Aug 22 20:34:04 PDT 2006
Author: baagaard
Date: 2006-08-22 20:34:03 -0700 (Tue, 22 Aug 2006)
New Revision: 4402
Added:
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/runbm.py
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.bc
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.connect
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.coord
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.fuldat
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.geo
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.keyval
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.netgen
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.par
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.prop
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.split
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.statevar
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.time
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/tutor.py
short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/workarea/
Log:
Added files for splitsube tutorial.
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/runbm.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/runbm.py 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/runbm.py 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+root="splitcube"
+
+# ----------------------------------------------------------------------
+def setupInput(nprocs):
+ dupext = [".fuldat", ".prop", ".statevar", ".time"]
+ sinext = [".coord", ".connect", ".bc", ".split"]
+
+ print "Setting up symbolic links with prefix '%s_%d':" % (root, nprocs)
+ import os
+
+ dirFiles = os.listdir(os.getcwd())
+ for ext in sinext:
+ src = "%s%s" % (root, ext)
+ dest = "%s_%s%s" % (root, nprocs, ext)
+ if not dest in dirFiles:
+ print " %s -> %s... created" % (dest, src)
+ os.symlink(src, dest)
+ else:
+ print " %s -> %s... already exists" % (dest, src)
+
+ for ext in dupext:
+ src = "%s%s" % (root, ext)
+ for iproc in range(nprocs):
+ dest = "%s_%s.%d%s" % (root, nprocs, iproc, ext)
+ if not dest in dirFiles:
+ print " %s -> %s... created" % (dest, src)
+ os.symlink(src, dest)
+ else:
+ print " %s -> %s... already exists" % (dest, src)
+ return
+
+
+# ----------------------------------------------------------------------
+def run(nprocs):
+ print "Running PyLith..."
+
+ # TODO: Replace the use of launching via 'system' with use
+ # of Leif's architecture independent utility.
+
+ cmd = "mpirun -np %d `which pylith3dapp.py` " \
+ "--typos=relaxed " \
+ "--scanner.fileRoot=%s_%d " \
+ "--scanner.asciiOutput=full " \
+ "--scanner.ucdOutput=ascii " \
+ "-log_summary -pc_type bjacobi -sub_pc_type ilu " \
+ "-ksp_monitor -ksp_view -ksp_rtol 1e-09" % (nprocs, root, nprocs)
+ import os
+ print cmd
+ os.system(cmd)
+ return
+
+
+# ----------------------------------------------------------------------
+if __name__ == "__main__":
+ from optparse import OptionParser
+
+ parser = OptionParser()
+ parser.add_option("-n", "--numprocs", dest="nprocs",
+ type="int", metavar="NPROCS",
+ help="Set number of processors.")
+ (options, args) = parser.parse_args()
+ if len(args) != 0:
+ parser.error("Incorrent number of arguments.")
+
+ nprocs = 1
+ if not options.nprocs is None:
+ nprocs = options.nprocs
+
+ setupInput(nprocs)
+ run(nprocs)
+
+
+# End of file
Property changes on: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/runbm.py
___________________________________________________________________
Name: svn:executable
+ *
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.bc
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.bc 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.bc 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,14 @@
+# Boundary conditions for split block problem.
+#
+displacement_units = m
+velocity_units = m/s
+force_units = newton
+#
+ 3 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+ 4 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+ 5 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+ 6 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+ 7 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+ 9 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+10 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
+12 1 1 1 0.00000000e+00 0.00000000e+00 0.00000000e+00
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.connect
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.connect 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.connect 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,41 @@
+ 1 5 1 0 19 22 8 18
+ 2 5 1 0 17 22 19 18
+ 3 5 1 0 18 19 24 2
+ 4 5 1 0 18 2 24 21
+ 5 5 1 0 13 21 17 24
+ 6 5 1 0 23 14 17 15
+ 7 5 1 0 23 15 17 18
+ 8 5 1 0 18 21 24 17
+ 9 5 1 0 23 17 21 18
+ 10 5 1 0 21 13 17 23
+ 11 5 2 0 17 24 25 10
+ 12 5 1 0 11 22 17 14
+ 13 5 1 0 21 13 23 20
+ 14 5 1 0 17 22 15 14
+ 15 5 1 0 18 22 8 15
+ 16 5 1 0 2 1 19 24
+ 17 5 2 0 7 24 25 19
+ 18 5 1 0 15 16 8 18
+ 19 5 1 0 18 17 24 19
+ 20 5 2 0 17 4 10 25
+ 21 5 1 0 15 22 17 18
+ 22 5 2 0 6 22 4 5
+ 23 5 2 0 22 19 25 17
+ 24 5 2 0 6 25 22 19
+ 25 5 2 0 17 11 4 22
+ 26 5 2 0 4 17 10 12
+ 27 5 2 0 17 22 4 25
+ 28 5 2 0 12 17 10 9
+ 29 5 2 0 7 19 25 6
+ 30 5 2 0 8 22 19 6
+ 31 5 2 0 25 6 4 10
+ 32 5 2 0 8 22 6 5
+ 33 5 2 0 25 6 22 4
+ 34 5 2 0 7 6 25 10
+ 35 5 2 0 24 1 19 7
+ 36 5 2 0 17 12 4 11
+ 37 5 2 0 17 13 10 9
+ 38 5 2 0 10 13 17 24
+ 39 5 2 0 12 3 4 11
+ 40 5 2 0 7 10 25 24
+ 41 5 2 0 17 19 25 24
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.coord
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.coord 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.coord 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,26 @@
+coord_units = km
+ 1 5.00000000E+02 0.00000000E+00 0.00000000E+00
+ 2 1.00000000E+03 0.00000000E+00 0.00000000E+00
+ 3 0.00000000E+00 1.00000000E+03 1.00000000E+03
+ 4 0.00000000E+00 4.91304000E+02 1.00000000E+03
+ 5 0.00000000E+00 0.00000000E+00 1.00000000E+03
+ 6 0.00000000E+00 0.00000000E+00 5.27048000E+02
+ 7 0.00000000E+00 0.00000000E+00 0.00000000E+00
+ 8 5.00000000E+02 0.00000000E+00 1.00000000E+03
+ 9 0.00000000E+00 1.00000000E+03 0.00000000E+00
+ 10 0.00000000E+00 5.10836000E+02 0.00000000E+00
+ 11 5.00000000E+02 1.00000000E+03 1.00000000E+03
+ 12 0.00000000E+00 1.00000000E+03 5.08696000E+02
+ 13 5.00000000E+02 1.00000000E+03 0.00000000E+00
+ 14 1.00000000E+03 1.00000000E+03 1.00000000E+03
+ 15 1.00000000E+03 4.64850000E+02 1.00000000E+03
+ 16 1.00000000E+03 0.00000000E+00 1.00000000E+03
+ 17 5.00000000E+02 1.00000000E+03 5.01602000E+02
+ 18 1.00000000E+03 0.00000000E+00 5.02291000E+02
+ 19 5.00000000E+02 0.00000000E+00 5.01602000E+02
+ 20 1.00000000E+03 1.00000000E+03 0.00000000E+00
+ 21 1.00000000E+03 4.91304000E+02 0.00000000E+00
+ 22 5.00000000E+02 4.65848000E+02 1.00000000E+03
+ 23 1.00000000E+03 1.00000000E+03 4.72127000E+02
+ 24 5.00000000E+02 4.65848000E+02 0.00000000E+00
+ 25 2.50275000E+02 3.73858000E+02 4.12501000E+02
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.fuldat
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.fuldat 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.fuldat 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,5 @@
+# Time steps for which full output is desired for SCEC benchmark 5.
+#
+ 10
+ 50
+ 100
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.geo
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.geo 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.geo 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,11 @@
+# Create geometry for vertical strike-slip fault.
+algebraic3d
+
+solid cube = orthobrick (0, 0, 0; 1, 1, 1);
+solid fault = plane (0.5, 0.5, 0.5; -1., 0., 0.) -bc=1;
+
+solid mat1 = cube and fault;
+solid mat2 = cube and not fault;
+
+tlo mat1 -col=[0,0,1];
+tlo mat2 -col=[1,0,0];
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.keyval
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.keyval 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.keyval 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,98 @@
+# Example of a keyword=value file to be used with TECTON.
+# In this example, the default values are listed, but commented out.
+# To change a default value, uncomment the appropriate entry and
+# edit the value.
+# With the present implementation, there should not be any spaces
+# before the keyword.
+#
+# Non-default parameters to be used for SCEC BM 5.
+#
+# Scaling factors applied to Winkler forces. These factors may be
+# used as a quick and easy way of changing the density or gravitational
+# acceleration when Winkler forces are used to simulate gravity.
+#
+#winklerScaleX = 1.0
+#winklerScaleY = 1.0
+#winklerScaleZ = 1.0
+#
+#
+# Parameters controlling stress integration and numerical computation
+# of the tangent material matrix. These default values should be
+# reasonable for most cases.
+#
+#stressTolerance = 1.0e-12*Pa
+#minimumStrainPerturbation = 1.0e-7
+#initialStrainPerturbation = 1.0e-1
+#
+#
+# Parameters controlling the solution of the linear problem at each
+# iteration. This is now all controlled by PETSc command-line
+# arguments. The only option now specified in this file is whether to
+# use the solution from the previous time step as the starting guess
+# for the current time step.
+#
+#usePreviousDisplacementFlag = 0
+#
+#
+# Quadrature order for the problem. The options are:
+# Full: Quadrature order that should give the exact
+# element matrices when the elements are
+# geometrically undistorted.
+# Reduced: Quadrature order that is one order less than
+# full quadrature. This option should be used
+# with caution.
+# Selective: Uses Hughes' b-bar formulation to perform
+# reduced quadrature on the dilatational parts of
+# the strain-displacement matrix. This can be
+# useful in nearly-incompressible problems.
+#
+#quadratureOrder = Full
+#
+#
+# Gravitational acceleration in each direction.
+#
+#gravityX = 0.0*m/(s*s)
+#gravityY = 0.0*m/(s*s)
+#gravityZ = 0.0*m/(s*s)
+#
+#
+# Factors controlling computation of prestresses. When gravity is being
+# used, an automatic computation option may be used, with the option of
+# using alternative values for Poisson's ratio and Young's modulus.
+# Each prestress component may also be scaled. This option is only
+# useful if the prestresses are read from a file (and not automatically
+# computed).
+#
+#prestressAutoCompute = False
+#prestressAutoChangeElasticProperties = False
+#prestressAutoComputePoisson = 0.49
+#prestressAutoComputeYoungs = 1.0e30*Pa
+#
+#prestressScaleXx = 1.0
+#prestressScaleYy = 1.0
+#prestressScaleZz = 1.0
+#prestressScaleXy = 1.0
+#prestressScaleXz = 1.0
+#prestressScaleYz = 1.0
+#
+#
+# Scaling factors applied to differential Winkler forces. Differential
+# Winkler forces are those applied across a slippery node interface, and
+# are generally used to keep the fault locked at certain times. These
+# factors control the magnitudes and provide a simple way of scaling the
+# forces so the fault remains sufficiently 'locked'.
+#
+#winklerSlipScaleX = 1.0
+#winklerSlipScaleY = 1.0
+#winklerSlipScaleZ = 1.0
+#
+#
+# Unit numbers used by f77. These defaults should work for most Unix
+# systems, but may be altered if necessary.
+#
+#f77StandardInput = 5
+#f77StandardOutput = 6
+#f77FileInput = 10
+#f77AsciiOutput = 11
+#f77PlotOutput = 12
+#f77UcdOutput = 13
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.netgen
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.netgen 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.netgen 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,119 @@
+25
+ 0.500000 0.000000 0.000000
+ 1.000000 0.000000 0.000000
+ 0.000000 1.000000 1.000000
+ 0.000000 0.491304 1.000000
+ 0.000000 0.000000 1.000000
+ 0.000000 0.000000 0.527048
+ 0.000000 0.000000 0.000000
+ 0.500000 0.000000 1.000000
+ 0.000000 1.000000 0.000000
+ 0.000000 0.510836 0.000000
+ 0.500000 1.000000 1.000000
+ 0.000000 1.000000 0.508696
+ 0.500000 1.000000 0.000000
+ 1.000000 1.000000 1.000000
+ 1.000000 0.464850 1.000000
+ 1.000000 0.000000 1.000000
+ 0.500000 1.000000 0.501602
+ 1.000000 0.000000 0.502291
+ 0.500000 0.000000 0.501602
+ 1.000000 1.000000 0.000000
+ 1.000000 0.491304 0.000000
+ 0.500000 0.465848 1.000000
+ 1.000000 1.000000 0.472127
+ 0.500000 0.465848 0.000000
+ 0.250275 0.373858 0.412501
+41
+ 1 19 8 22 18
+ 1 17 19 22 18
+ 1 18 24 19 2
+ 1 18 24 2 21
+ 1 13 17 21 24
+ 1 23 17 14 15
+ 1 23 17 15 18
+ 1 18 24 21 17
+ 1 23 21 17 18
+ 1 21 17 13 23
+ 2 17 25 24 10
+ 1 11 17 22 14
+ 1 21 23 13 20
+ 1 17 15 22 14
+ 1 18 8 22 15
+ 1 2 19 1 24
+ 2 7 25 24 19
+ 1 15 8 16 18
+ 1 18 24 17 19
+ 2 17 10 4 25
+ 1 15 17 22 18
+ 2 6 4 22 5
+ 2 22 25 19 17
+ 2 6 22 25 19
+ 2 17 4 11 22
+ 2 4 10 17 12
+ 2 17 4 22 25
+ 2 12 10 17 9
+ 2 7 25 19 6
+ 2 8 19 22 6
+ 2 25 4 6 10
+ 2 8 6 22 5
+ 2 25 22 6 4
+ 2 7 25 6 10
+ 2 24 19 1 7
+ 2 17 4 12 11
+ 2 17 10 13 9
+ 2 10 17 13 24
+ 2 12 4 3 11
+ 2 7 25 10 24
+ 2 17 25 19 24
+50
+ 2 1 24 2
+ 2 20 21 13
+ 2 13 21 24
+ 2 21 2 24
+ 3 1 2 19
+ 3 18 16 8
+ 3 2 18 19
+ 3 8 19 18
+ 4 3 4 11
+ 4 4 5 22
+ 4 5 8 22
+ 4 4 22 11
+ 5 4 3 12
+ 5 5 4 6
+ 5 7 6 10
+ 5 9 10 12
+ 5 6 4 10
+ 5 12 10 4
+ 6 5 6 8
+ 6 6 7 19
+ 6 6 19 8
+ 6 7 1 19
+ 7 10 9 13
+ 7 7 10 24
+ 7 1 7 24
+ 7 13 24 10
+ 8 3 11 12
+ 8 9 12 17
+ 8 9 17 13
+ 8 11 17 12
+ 9 15 14 22
+ 9 16 15 8
+ 9 14 11 22
+ 9 22 8 15
+ 10 14 15 23
+ 10 15 16 18
+ 10 18 2 21
+ 10 21 20 23
+ 10 15 18 23
+ 10 21 23 18
+ 11 17 11 14
+ 11 13 17 23
+ 11 13 23 20
+ 11 14 23 17
+ 1 11 17 22
+ 1 17 13 24
+ 1 19 8 22
+ 1 1 19 24
+ 1 24 19 17
+ 1 22 17 19
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.par
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.par 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.par 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,191 @@
+#
+# Parameter file for use with program readucd.
+#
+# **********************************************************************
+#
+# Coordinate parameters:
+#
+# cscale = coordinate scaling factor.
+# ix = coordinate number corresponding to x.
+# iy = coordinate number corresponding to y.
+# iz = coordinate number corresponding to z.
+#
+# The integer parameters may be used to transpose coordinates if a
+# different coordinate system is desired.
+#
+# cscale ix iy iz
+#-----------------------------------------------------------------------
+ 1000.0d0 1 2 3
+#-----------------------------------------------------------------------
+#
+# Coordinate units:
+#
+# Give a string specifying the units used after scaling.
+#
+#-----------------------------------------------------------------------
+ 'km'
+#-----------------------------------------------------------------------
+#
+#
+# **********************************************************************
+#
+# Boundary condition information:
+# This information is used to determine the boundaries on which BC
+# will be applied, as well as the default BC.
+# Note: The boundaries will be determined after the mesh
+# coordinates have been scaled and permuted.
+#
+# nbc = number of boundary condition surfaces. Note that
+# each surface must be marked with a unique BC #.
+#
+# nbc
+#-----------------------------------------------------------------------
+ 0
+#-----------------------------------------------------------------------
+#
+# BC numbers and corresponding boundary conditions to be applied to
+# each boundary:
+# This input will consist of nbc lines, one for each mesh boundary.
+# The order is the same as for the mesh limits above.
+#
+# Each line will contain:
+# ibcode ibcx bcx ibcy bcy ibcz bcz
+#
+# where ibcode is the boundary condition code for a given surface,
+# each ibc value is the integer boundary condition code
+# (same as those for lithomop or tecton), and bc is the corresponding
+# boundary condition value.
+#
+# ibcode ibcx(i) bcx(i) ibcy(i) bcy(i) ibcz(i) bcz(i), i=1,nbc
+#-----------------------------------------------------------------------
+# 1 1 -999.0d0 1 -999.0d0 1 -999.0d0
+# 2 1 -999.0d0 1 -999.0d0 1 -999.0d0
+# 3 0 0.0d0 1 0.0d0 0 0.0d0
+# 4 1 -999.0d0 1 -999.0d0 1 -999.0d0
+# 5 1 -999.0d0 1 -999.0d0 1 -999.0d0
+#-----------------------------------------------------------------------
+#
+# Units used for boundary conditions:
+# You must specify the units to be used for displacement, velocity,
+# and force boundary conditions.
+#
+#-----------------------------------------------------------------------
+'m'
+# displacement_units
+'m/s'
+# velocity_units
+'newton'
+# force_units
+#-----------------------------------------------------------------------
+#
+# Connectivity order option:
+# This determines how the tetrahedral element connectivities are
+# ordered/determined.
+#
+# iconopt: 1 = assume connectivities are already in the proper
+# order (fastest, but frequently incorrect).
+# 2 = assume connectivities are in the wrong order. In
+# this case, the positions of nodes 2 and 3 are
+# reversed.
+# 3 = assume that the connectivities are in any order. In
+# this case, the element jacobian is first computed
+# using the original order. If a negative value is
+# obtained, the positions of nodes 2 and 3 are
+# reversed. This is probably the safest option.
+#
+# iconopt
+#-----------------------------------------------------------------------
+ 3
+#-----------------------------------------------------------------------
+#
+# Fault parameters:
+#
+# numflt = number of faults in the model
+# ibcflt = boundary condition code used to specify whether a node
+# lies on a fault
+#
+# numflt ibcflt
+#-----------------------------------------------------------------------
+ 1 1
+#-----------------------------------------------------------------------
+#
+# Fault specification:
+# Whether a node lies on a fault is determined by the attribute
+# information above. The fault to which a node belongs and the
+# side of the fault on which an element lies is determined by
+# material type. Thus, the two sides of a fault must always have
+# different material types, and if there is more than one fault,
+# a different material must lie along each side of a fault
+# boundary. For each fault, there are 3 lines of information:
+#
+# iftype(i), ifhist(i), nmatf(1,i), nmatf(2,i)
+# fsplit(j,1,i),j=1,nsd, ifmat(1,i,j),j=1,nmatf(1,i)
+# fsplit(j,2,i),j=1,nsd, ifmat(2,i,j),j=1,nmatf(2,i)
+#
+# The parameters are:
+#
+# iftype(i) = fault type (1=split node, 2=slippery node)
+# ifhist(i) = load history associated with the fault
+# (same type of specification as tecton/lithomop)
+# nmatf(1,i) = number of materials lying on side 1 of the fault
+# nmatf(2,i) = number of materials lying on side 2 of the fault
+# fsplit(j,1,i) = splitting parameter for each degree of freedom
+# on side 1 of the fault. If the fault is a split
+# node fault, this corresponds to an actual
+# dislocation value applied to this side of the
+# fault. If the fault is a slippery node fault,
+# the sign and magnitude are used to determine the
+# integer slip parameter (0 = no slip, -1 = slip
+# in negative local coordinate direction, 1 = slip
+# in positive local coordinate direction).
+# ifmat(1,i,j) = the list of material numbers lying on side 1 of
+# the fault.
+# fsplit(j,2,i) = same as fsplit(j,1,i) for side 2 of the fault.
+# ifmat(2,i,j) = same as ifmat(1,i,j) for side 2 of the fault.
+#
+# iftype(i), ifhist(i), nmatf(1,i), nmatf(2,i)
+# fsplit(j,1,i),j=1,nsd, ifmat(1,i,j),j=1,nmatf(1,i)
+# fsplit(j,2,i),j=1,nsd, ifmat(2,i,j),j=1,nmatf(2,i),i=1,numflt
+#-----------------------------------------------------------------------
+ 1 0 1 1
+ 0.0d0 0.5d0 0.0d0 1
+ 0.0d0 -0.5d0 0.0d0 2
+#-----------------------------------------------------------------------
+#
+# Winkler resoring force info:
+# In the present implementation, it is assumed that the Winkler BC
+# are being used to simulate gravity, although it would be easy to
+# adapt the BC to other uses. The user must first specify the
+# number of Winkler sets. If this number is zero, no additional
+# input is required.
+#
+# nwsets = number of Winkler restoring force sets.
+#
+# nwsets
+#-----------------------------------------------------------------------
+ 0
+#-----------------------------------------------------------------------
+#
+# Info describing each Winkler restoring force set. It is assumed
+# that Winkler BC for each set are applied in a single direction.
+# Enter one line for each Winkler BC set.
+#
+# The parameters are:
+#
+# iwcode(i) = The boundary condition code used to define this set.
+# iwdir(i) = The direction in which the force is to be applied.
+# 1 = X
+# 2 = Y
+# 3 = Z
+# modew(i) = Application mode code.
+# 0 = No restoring force (it would make no sense to
+# use this option).
+# 1 = Forces applied at all times.
+# -n = Forces applied according to load history n.
+# rhow(i) = Assumed density contrast.
+# gw(i) = Assumed graviational acceleration.
+#
+# iwcode(i) iwdir(i) modew(i) rhow(i) gw(i), i=1,nwsets
+#-----------------------------------------------------------------------
+ 6 3 1 3000.0 10.0
+#-----------------------------------------------------------------------
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.prop
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.prop 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.prop 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,23 @@
+# Sample material properties definition file.
+# The number of properties for each material model have been
+# previously defined.
+# At present, the materials are assumed to be listed in order, so that
+# material number is determined by position in this file. This may
+# change in the future.
+# Also, the end of each material description is signified by setting
+# the endMaterial flag to 'True'.
+# Also at present, the materialType corresponds to a class, so the
+# first letter is capitalized.
+#
+# Material number 1
+materialType = 'IsotropicLinearElastic'
+density = 3000.0*kg/m**3 # Density
+youngsModulus = 7.5e10*Pa # Young's modulus
+poissonsRatio = 0.25 # Poisson's ratio
+endMaterial = True
+# Material number 2
+materialType = 'IsotropicLinearElastic'
+density = 3000.0*kg/m**3 # Density
+youngsModulus = 7.5e10*Pa # Young's modulus
+poissonsRatio = 0.25 # Poisson's ratio
+endMaterial = True
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.split
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.split 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.split 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,76 @@
+ 16 1 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 1 8 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 15 8 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 18 8 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 12 11 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 5 13 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 10 13 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 13 13 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 2 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 5 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 6 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 7 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 8 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 9 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 10 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 12 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 14 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 19 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 21 17 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 1 19 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 2 19 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 3 19 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 16 19 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 19 19 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 1 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 2 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 12 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 14 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 15 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 21 22 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 3 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 4 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 5 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 8 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 16 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 19 24 0 0.00000000E+00 5.00000000E-01 0.00000000E+00
+ 35 1 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 30 8 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 32 8 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 25 11 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 36 11 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 39 11 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 37 13 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 38 13 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 11 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 20 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 23 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 25 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 26 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 27 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 28 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 36 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 37 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 38 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 41 17 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 17 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 23 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 24 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 29 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 30 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 35 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 41 19 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 22 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 23 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 24 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 25 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 27 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 30 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 32 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 33 22 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 11 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 17 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 35 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 38 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 40 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
+ 41 24 0 0.00000000E+00 -5.00000000E-01 0.00000000E+00
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.statevar
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.statevar 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.statevar 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,34 @@
+# Sample file defining which state variables are to be output for
+# the elastic and time dependent solutions.
+#
+# The istatout array specifies output options for each individual
+# state variable. At present there are a maximum of 24 possible
+# state variables, and this number may increase with the addition
+# of new material models. There are three types of state variable
+# output:
+#
+# 1 Total accumulated values for the current time step
+# 2 Incremental values from the previous step to the current
+# 3 Rates computed from the previous step to the current
+#
+# Present state variables occur in groups of 6, corresponding to
+# the number of stress/strain components, although this may change
+# in the future. The present groups are:
+#
+# 1-6: Cauchy stress
+# 7-12: Total strain
+# 13-18: Viscous strain
+# 18-24: Plastic strain
+#
+# Three lines of input are required, corresponding to the three
+# types of state variable output. For each line the user must
+# enter:
+# The number of state variables to output for this type (nstatout).
+# Note that the value of nstatout may be zero, in which case no
+# further output is needed for that line.
+# The state variables to output for this type (nstatout values).
+#
+#nstatout, istatout(i),i=1,nstatout
+ 12 1 2 3 4 5 6 7 8 9 10 11 12
+ 12 1 2 3 4 5 6 7 8 9 10 11 12
+ 0
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.time
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.time 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/splitcube.time 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,63 @@
+# Sample time step group definition file for TECTON. This file
+# contains several integer and real parameters that must be defined
+# for each group. Note that the elastic solution corresponds to
+# group number 0 and must always be defined. Some of the parameters
+# have no meaning for the elastic solution but they are defined
+# anyway. In the fortran code, each of the parameters (other than n)
+# is stored in a separate array of dimension nintg+1, where nintg
+# is the number of time step groups. The definitions are as follows:
+#
+# n = time step group number. The elastic solution
+# corresponds to group number 0, and must always be
+# defined.
+# maxstp = the number of steps in the group (this is always 1 for
+# the elastic solution).
+# delt = time step size. This is a real value with units of
+# time.
+# alfa = amount of implicitness. This is a real dimensionless
+# parameter with values that can range from 0.0 (fully
+# explicit) to 1.0 (fully implicit). The value is
+# generally set to 0.5.
+# maxit = maximum number of equilibrium iterations before stiffness
+# matrix is reformed.
+# ntdinit= number of time steps between initial reformation of
+# stiffness matrix (before any iterations). A negative
+# value indicates that reformation should occur only once
+# for the first step in the group. A value of zero indicates
+# that reformation should never occur.
+# lgdef = large deformation solution flag. This is an integer
+# parameter with 3 possible values:
+# 0: linear strain
+# 1: large strain, but use only the linear contribution
+# to the stiffness matrix. This sometimes gives
+# better convergence.
+# 2: large strain using the nonlinear contribution to the
+# stiffness matrix.
+#
+# Convergence criteria for the nonlinear iterative solution:
+#
+# utol = convergence tolerance for displacements. This is a
+# dimensionless real value.
+# ftol = convergence tolerance for forces. This is a
+# dimensionless real value.
+# etol = convergence tolerance for energy. This is a
+# dimensionless real value.
+# itmax = maximum number of equilibrium iterations. This is an
+# integer quantity.
+#
+# Note that the convergence criteria defined below are appropriate for
+# a linear elastic problem. The values would be much different for a
+# nonlinear or time-dependent problem.
+#
+# The only parameter in this list requiring units is the time step
+# size, with units of time. I generally make sure everything is
+# converted to seconds, although I frequently specify time in years.
+#
+# Time step information for SCEC benchmark 1.
+#
+#
+time_units = year # This should be converted to seconds.
+#
+# n maxstp delt alfa maxit ntdinit lgdef utol ftol etol itmax
+#
+ 0 1 0.e+0 5.e-1 1001 4 0 1.0e+00 1.0e+0 1.0e+00 1
Added: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/tutor.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/tutor.py 2006-08-22 21:44:40 UTC (rev 4401)
+++ short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/tutor.py 2006-08-23 03:34:03 UTC (rev 4402)
@@ -0,0 +1,200 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+archive_dir="../archive"
+root="splitcube"
+
+# ----------------------------------------------------------------------
+def assembleStrings(fragments):
+ """Assemble a list of strings from a list of list of fragments."""
+
+ values = fragments[0]
+ for fragset in fragments[1:]:
+ newvalues = []
+ for value in values:
+ for fragment in fragset:
+ newvalues.append(value + fragment)
+ values = newvalues
+ return values
+
+
+# ----------------------------------------------------------------------
+def getStepFiles(step):
+
+ files = {'input': [],
+ 'output': []}
+ if "mesh" == step:
+ fragments = [ [root], [".geo"] ]
+ files['input'] += assembleStrings(fragments)
+
+ fragments = [ [root], [".netgen" ] ]
+ files['output'] += assembleStrings(fragments)
+
+ elif "setup" == step:
+ fragments = [ [root], [".netgen", ".par"] ]
+ files['input'] += assembleStrings(fragments)
+
+ fragments = [ [root],
+ [".coord", ".connect", ".split", ".bc", ".w01.wink",
+ ".1.fcoord", ".1.fbc"] ]
+ files['output'] += assembleStrings(fragments)
+
+ elif "run1" == step:
+ fragments = [ [root], [".coord", ".connect", ".split", ".bc",
+ ".fuldat", ".prop", ".statevar", ".time"] ]
+ files['input'] += assembleStrings(fragments)
+ files['input'] += ["runbm.py"]
+
+ root1 = root + "_1"
+ fragments = [ [root1], [".coord", ".connect", ".split", ".bc"] ]
+ files['output'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0"],
+ [".coord", ".connect", ".split", ".bc",
+ ".ascii", ".vtk",
+ ".fuldat", ".prop", ".statevar", ".time"] ]
+ files['output'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0"],
+ [".gmesh", ".mesh", ".mesh.split"],
+ ["", \
+ ".time.00000", ".time.00010", ".time.00050", ".time.00100"],
+ [".inp"] ]
+ files['output'] += assembleStrings(fragments)
+ elif "viz1" == step:
+ root1 = root + "_1"
+ fragments = [ [root1], [".0"],
+ [".mesh", ".mesh.time.00010"], [".inp"] ]
+ files['input'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0"],
+ ["t00010"], [".inp"] ]
+ files['output'] += assembleStrings(fragments)
+ elif "run2" == step:
+ fragments = [ [root], [".coord", ".connect", ".split", ".bc",
+ ".fuldat", ".prop", ".statevar", ".time"] ]
+ files['input'] += assembleStrings(fragments)
+ files['input'] += ["runbm.py"]
+
+ root1 = root + "_2"
+ fragments = [ [root1], [".coord", ".connect", ".split", ".bc"] ]
+ files['output'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0", ".1"],
+ [".coord", ".connect", ".split", ".bc",
+ ".ascii", ".vtk",
+ ".fuldat", ".prop", ".statevar", ".time"] ]
+ files['output'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0", ".1"],
+ [".gmesh", ".mesh", ".mesh.split"],
+ ["", \
+ ".time.00000", ".time.00010", ".time.00050", ".time.00100"],
+ [".inp"] ]
+ files['output'] += assembleStrings(fragments)
+ elif "viz2" == step:
+ root1 = root + "_2"
+ fragments = [ [root1], [".0", ".1"],
+ [".mesh", ".mesh.time.00010"], [".inp"] ]
+ files['input'] += assembleStrings(fragments)
+
+ fragments = [ [root1], [".0", ".1"],
+ [".t00010"], [".inp"] ]
+ files['output'] += assembleStrings(fragments)
+ print files
+ else:
+ raise ValueError("Unknown tutor step: %s" % step)
+ return files
+
+
+# ----------------------------------------------------------------------
+def tutor(step, mode):
+ files = getStepFiles(step)
+
+ import os
+ dirFiles = os.listdir(os.getcwd())
+
+ if "check" == mode:
+ print "Checking to make sure you have the following input files " \
+ "for step '%s':" % step
+ for filename in files['input']:
+ if filename in dirFiles:
+ print " %s...found" % filename
+ else:
+ print " %s...MISSING" % filename
+ elif "clean" == mode:
+ print "Removing any old output files from step '%s':" % step
+ for filename in files['output']:
+ if filename in dirFiles:
+ os.remove(filename)
+ print " %s...removed" % filename
+ elif "retrieve" == mode:
+ import shutil
+ print "Retrieving input files from archive for step '%s':" % step
+ for filename in files['input']:
+ if filename in dirFiles:
+ print " %s...already present" % filename
+ else:
+ shutil.copyfile("../archive/%s" % filename,
+ "./%s" % filename)
+ print " %s...retrieved from archive" % filename
+ else:
+ raise ValueError("Unrecognized mode: %s" % mode)
+ return
+
+
+# ----------------------------------------------------------------------
+if __name__ == "__main__":
+ from optparse import OptionParser
+
+ usage = "usage: %prog -m MODE -s STEP\n\n" \
+ "Modes:\n" \
+ " check Check to make sure files necessary for step " \
+ "exist.\n" \
+ " clean Remove old files that will be overwritten in " \
+ "this step.\n" \
+ " retrieve Copy files (as needed) from archive needed in " \
+ "this step.\n" \
+ "Steps:\n" \
+ " mesh Generating the finite-element mesh.\n" \
+ " setup Setting up the PyLith input files.\n" \
+ " run1 Running the simulation on 1 processor.\n" \
+ " viz1 Visualizing the output from a simulation on " \
+ "1 processor.\n" \
+ " run2 Running the simulation on 2 processors.\n" \
+ " viz2 Visualizing the output from a simulation on " \
+ "2 processors.\n" \
+ " all Apply mode to each step in succession."
+
+ parser = OptionParser(usage=usage)
+ parser.add_option("-m", "--mode", dest="mode",
+ type="string", metavar="MODE",
+ help="Set tutor to MODE.")
+ parser.add_option("-s", "--step", dest="step",
+ type="string", metavar="STEP",
+ help="Perform mode operation for STEP.")
+ (options, args) = parser.parse_args()
+ if len(args) != 0:
+ parser.error("Incorrent number of arguments.")
+
+ if options.step is None or options.mode is None:
+ parser.error("Both step and mode are required options.")
+
+ allsteps = "mesh setup run1 viz1 run2 viz2"
+ if "all" == options.step:
+ for istep in allsteps.split():
+ tutor(istep, options.mode)
+ else:
+ tutor(options.step, options.mode)
+
+
+# End of file
Property changes on: short/3D/PyLith/branches/pylith-0.8/tutorials/splitcube/archive/tutor.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the cig-commits
mailing list