[cig-commits] r15500 - short/2.5D/benchmarks/savageprescott/utils
willic3 at geodynamics.org
willic3 at geodynamics.org
Sun Aug 2 21:14:13 PDT 2009
Author: willic3
Date: 2009-08-02 21:14:12 -0700 (Sun, 02 Aug 2009)
New Revision: 15500
Added:
short/2.5D/benchmarks/savageprescott/utils/ref_profiles_savpres_displ.cfg
Modified:
short/2.5D/benchmarks/savageprescott/utils/ref_profiles.cfg
short/2.5D/benchmarks/savageprescott/utils/ref_profiles.py
short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_graded_20km.cfg
short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_unif_20km.cfg
short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_graded_20km.cfg
short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_unif_20km.cfg
Log:
Updated code and .cfg files to reference profiles to the profile at the
beginning of a cycle, and added .cfg file for analytical results.
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles.cfg 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -3,6 +3,10 @@
# Top-level info
# Convert meters to cm.
-scale_factor = 100.0
+displ_scale_factor = 100.0
+
+# Convert meters to km.
+coord_scale_factor = 0.001
+
num_cycles = 10
steps_per_cycle = 20
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles.py
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles.py 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles.py 2009-08-03 04:14:12 UTC (rev 15500)
@@ -39,7 +39,8 @@
## \b Properties
## @li \b input_file Input file, consisting of tab-delimited values.
## @li \b output_root Root name for output file(s).
- ## @li \b scale_factor Scale factor to apply to results.
+ ## @li \b displ_scale_factor Scale factor to apply to displacements.
+ ## @li \b coord_scale_factor Scale factor to apply to coordinates.
## @li \b num_cycles Number of earthquake cycles.
## @li \b steps_per_cycle Number of steps per earthquake cycle.
## @li \b delimiter Column delimiter (use only if other than whitespace).
@@ -52,9 +53,12 @@
outputRoot = pyre.inventory.str("output_root", default="output.txt")
outputRoot.meta['tip'] = "Root output filename."
- scaleFactor = pyre.inventory.float("scale_factor", default=1.0)
- scaleFactor.meta['tip'] = "Scaling factor to apply to results."
+ displScaleFactor = pyre.inventory.float("displ_scale_factor", default=1.0)
+ displScaleFactor.meta['tip'] = "Scaling factor to apply to displacements."
+ coordScaleFactor = pyre.inventory.float("coord_scale_factor", default=1.0)
+ coordScaleFactor.meta['tip'] = "Scaling factor to apply to coordinates."
+
numCycles = pyre.inventory.int("num_cycles", default=10)
numCycles.meta['tip'] = "Number of earthquake cycles."
@@ -93,7 +97,8 @@
import os
# Set up info describing data
- self.scaleFactor = self.inventory.scaleFactor
+ self.displScaleFactor = self.inventory.displScaleFactor
+ self.coordScaleFactor = self.inventory.coordScaleFactor
self.numCycles = self.inventory.numCycles
self.stepsPerCycle = self.inventory.stepsPerCycle
self.delimiter = self.inventory.delimiter
@@ -114,18 +119,15 @@
os.mkdir(self.outputDir)
return
-
- return
-
def _refProfiles(self):
"""
Reference profiles to the first step in a cycle.
"""
import os
- col0 = self.data[:,0]
+ col0 = self.coordScaleFactor * self.data[:,0]
numRows = col0.shape[0]
col0Shaped = numpy.reshape(col0, (numRows, 1))
for cycle in range(self.numCycles):
@@ -134,7 +136,7 @@
cycleRef = numpy.copy(cycleData[:,0])
for step in range(self.stepsPerCycle):
cycleData[:,step] -= cycleRef
- cycleData *= self.scaleFactor
+ cycleData *= self.displScaleFactor
dataOut = numpy.concatenate((col0Shaped, cycleData), axis = 1)
outputFileName = self.outputRoot + repr(cycle) + ".txt"
outputFile = os.path.join(self.outputDir, outputFileName)
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_graded_20km.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_graded_20km.cfg 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_graded_20km.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -2,6 +2,5 @@
[ref_profiles]
# Top-level info
-# Convert meters to cm.
input_file = ../results/spbm_hex8_graded_20km/spbm_hex8_graded_20km-groundsurf.txt
output_root = ../results/spbm_hex8_graded_20km/spbm_hex8_graded_c
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_unif_20km.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_unif_20km.cfg 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles_hex8_unif_20km.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -2,6 +2,5 @@
[ref_profiles]
# Top-level info
-# Convert meters to cm.
input_file = ../results/spbm_hex8_unif_20km/spbm_hex8_unif_20km-groundsurf.txt
output_root = ../results/spbm_hex8_unif_20km/spbm_hex8_unif_c
Added: short/2.5D/benchmarks/savageprescott/utils/ref_profiles_savpres_displ.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles_savpres_displ.cfg (rev 0)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles_savpres_displ.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -0,0 +1,11 @@
+# -*- Python -*-
+[ref_profiles]
+
+# Top-level info
+displ_scale_factor = 1.0
+coord_scale_factor = 1.0
+num_cycles = 10
+steps_per_cycle = 41
+delimiter = ,
+input_file = savpres_displ.csv
+output_root = savpres_displ_c
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_graded_20km.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_graded_20km.cfg 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_graded_20km.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -2,6 +2,5 @@
[ref_profiles]
# Top-level info
-# Convert meters to cm.
input_file = ../results/spbm_tet4_graded_20km/spbm_tet4_graded_20km-groundsurf.txt
output_root = ../results/spbm_tet4_graded_20km/spbm_tet4_graded_c
Modified: short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_unif_20km.cfg
===================================================================
--- short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_unif_20km.cfg 2009-08-01 17:51:08 UTC (rev 15499)
+++ short/2.5D/benchmarks/savageprescott/utils/ref_profiles_tet4_unif_20km.cfg 2009-08-03 04:14:12 UTC (rev 15500)
@@ -2,6 +2,5 @@
[ref_profiles]
# Top-level info
-# Convert meters to cm.
input_file = ../results/spbm_tet4_unif_20km/spbm_tet4_unif_20km-groundsurf.txt
output_root = ../results/spbm_tet4_unif_20km/spbm_tet4_unif_c
More information about the CIG-COMMITS
mailing list