[cig-commits] r5945 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest
willic3 at geodynamics.org
willic3 at geodynamics.org
Thu Feb 1 08:11:45 PST 2007
Author: willic3
Date: 2007-02-01 08:11:45 -0800 (Thu, 01 Feb 2007)
New Revision: 5945
Added:
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertestESF.prop
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3d.cfg
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3dESF.cfg
Removed:
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex-debug.py
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex.py
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.prop
short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.time
Log:
Removed old run scripts and replaced them with *.cfg files.
Fixed time stepping and added option for running power-law example
using older ESF-based solution method.
At present, PyLith is no longer able to parse the material properties
files correctly. I'm not sure why.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.prop
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.prop 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.prop 2007-02-01 16:11:45 UTC (rev 5945)
@@ -10,10 +10,10 @@
# first letter is capitalized.
#
# Material number 1
-materialType = 'IsotropicPowerLawMaxwellViscoelastic'
-density = 3000.0*kg/m**3 # Density
-youngsModulus = 7.5e10*Pa # Young's modulus
-poissonsRatio = 0.25 # Poisson's ratio
-powerLawExponent= 3.50 # Exponent
-viscosityCoefficient= 1.42746527e12*s*Pa^powerLawExponent # EMHU
-endMaterial = True
+materialType = 'IsotropicPowerLawMaxwellViscoelastic'
+density = 3000.0*kg/m**3 # Density
+youngsModulus = 7.5e10*Pa # Young's modulus
+poissonsRatio = 0.25 # Poisson's ratio
+powerLawExponent = 3.50 # Exponent
+viscosityCoefficient = 1.42746527e12*s*Pa^3.5 # EMHU
+endMaterial = True
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.time
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.time 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertest.time 2007-02-01 16:11:45 UTC (rev 5945)
@@ -60,5 +60,5 @@
#
# 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
- 1 100 0.1 5.e-1 1 1 0 1.0e-12 1.0e-10 1.0e-15 30
+ 0 1 0.0d0 5.c-1 1001 4 0 1.0d+00 1.0d+0 1.0d+00 1
+ 1 100 0.1d0 5.c-1 1 1 0 1.0d-06 1.0d-06 1.0d-10 10
Added: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertestESF.prop
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertestESF.prop 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/powertestESF.prop 2007-02-01 16:11:45 UTC (rev 5945)
@@ -0,0 +1,19 @@
+# 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 = 'IsotropicPowerLawMaxwellViscoelasticESF'
+density = 3000.0*kg/m**3 # Density
+youngsModulus = 7.5e10*Pa # Young's modulus
+poissonsRatio = 0.25 # Poisson's ratio
+powerLawExponent= 3.50 # Exponent
+viscosityCoefficient= 1.42746527e12*s*Pa^3.5 # EMHU
+endMaterial = True
Added: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3d.cfg 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3d.cfg 2007-02-01 16:11:45 UTC (rev 5945)
@@ -0,0 +1,14 @@
+[pylith3d]
+# scanner (pylith3d) options
+scanner.fileRoot = powertest
+scanner.asciiOutput = full
+scanner.ucdOutput = ascii
+# PETSc options
+log_summary = true
+pc_type = bjacobi
+sub_pc_type = ilu
+ksp_monitor = true
+ksp_view = true
+ksp_rtol = 1.0e-9
+# start_in_debugger = true
+# debugger_pause = 100
Added: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3dESF.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3dESF.cfg 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/pylith3dESF.cfg 2007-02-01 16:11:45 UTC (rev 5945)
@@ -0,0 +1,16 @@
+[pylith3d]
+# scanner (pylith3d) options
+scanner.fileRoot = powertest
+scanner.materialPropertiesInputFile = powertestESF.prop
+scanner.outputFileRoot = powertestESF
+scanner.asciiOutput = full
+scanner.ucdOutput = ascii
+# PETSc options
+log_summary = true
+pc_type = bjacobi
+sub_pc_type = ilu
+ksp_monitor = true
+ksp_view = true
+ksp_rtol = 1.0e-9
+# start_in_debugger = true
+# debugger_pause = 100
Deleted: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex-debug.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex-debug.py 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex-debug.py 2007-02-01 16:11:45 UTC (rev 5945)
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-root="powertest"
-
-# ----------------------------------------------------------------------
-def setupInput(nprocs):
- dupext = [".fuldat", ".prop", ".statevar", ".time"]
- sinext = [".coord", ".connect", ".bc", ".split", ".traction"]
-
- 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 " \
- "-start_in_debugger " \
- "-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
Deleted: short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex.py
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex.py 2007-01-31 20:58:23 UTC (rev 5944)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/examples/lintet/powertest/runex.py 2007-02-01 16:11:45 UTC (rev 5945)
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-root="powertest"
-
-# ----------------------------------------------------------------------
-def setupInput(nprocs):
- dupext = [".fuldat", ".prop", ".statevar", ".time"]
- sinext = [".coord", ".connect", ".bc", ".split", ".traction"]
-
- 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 " \
- "-distribute 0 " \
- "-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
More information about the cig-commits
mailing list