[cig-commits] [commit] master: Fixed some typos for adjusting fault surface geometry. (828eb75)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Apr 9 03:05:14 PDT 2014


Repository : ssh://geoshell/pylith_benchmarks

On branch  : master
Link       : https://github.com/geodynamics/pylith_benchmarks/compare/b18768a541005fcf437aa50bdb2cd57e8e8adc11...c4e103232bf76f6fbf78b6524c8603d2d9b9a577

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

commit 828eb75bc1569360d6dab3c5a6cdaca40c549c8b
Author: Brad Aagaard <baagaard at usgs.gov>
Date:   Mon Mar 10 16:52:52 2014 -0700

    Fixed some typos for adjusting fault surface geometry.


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

828eb75bc1569360d6dab3c5a6cdaca40c549c8b
 dynamic/scecdynrup/tpv28/adjust_faultgeom.py | 6 +++---
 dynamic/scecdynrup/tpv28/create_faultsurf.py | 2 --
 dynamic/scecdynrup/tpv28/pylithapp.cfg       | 4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/dynamic/scecdynrup/tpv28/adjust_faultgeom.py b/dynamic/scecdynrup/tpv28/adjust_faultgeom.py
index fef7987..4751ae0 100755
--- a/dynamic/scecdynrup/tpv28/adjust_faultgeom.py
+++ b/dynamic/scecdynrup/tpv28/adjust_faultgeom.py
@@ -32,13 +32,13 @@ coordz = exodus.variables['coordz'][:]
 nodesetNames = exodus.variables['ns_names']
 for i in range(nodesetNames.shape[0]):
     if netCDF4.chartostring(nodesetNames[i,:]) == "fault":
-        indices = exodus.variables['node_ns%d' % i][:]
+        indices = exodus.variables['node_ns%d' % (i+1)][:]-1
+        break
 
 faulty = coordy[indices]
 faultz = coordz[indices]
 faultx = bump(faulty, faultz)
-coordx[indices] = faultx
-exodus.variables['coordx'][:] = coordx
+exodus.variables['coordx'][indices] = faultx
 
 exodus.close()
 
diff --git a/dynamic/scecdynrup/tpv28/create_faultsurf.py b/dynamic/scecdynrup/tpv28/create_faultsurf.py
index 05c2f13..09543c7 100755
--- a/dynamic/scecdynrup/tpv28/create_faultsurf.py
+++ b/dynamic/scecdynrup/tpv28/create_faultsurf.py
@@ -43,8 +43,6 @@ from netCDF4 import Dataset
 
 # ----------------------------------------------------------------------
 def bump(y, z):
-    y = yz[:,0]
-    z = yz[:,1]
     r1 = ((y+bumpY)**2 + (z-bumpZ)**2)**0.5
     r2 = ((y-bumpY)**2 + (z-bumpZ)**2)**0.5
     mask1 = r1 <= 3.0e+3
diff --git a/dynamic/scecdynrup/tpv28/pylithapp.cfg b/dynamic/scecdynrup/tpv28/pylithapp.cfg
index bd20140..d993308 100644
--- a/dynamic/scecdynrup/tpv28/pylithapp.cfg
+++ b/dynamic/scecdynrup/tpv28/pylithapp.cfg
@@ -67,7 +67,7 @@ db_properties.iohandler.filename = matprops.spatialdb
 
 db_initial_stress = spatialdata.spatialdb.UniformDB
 db_initial_stress.label = Initial stress tensor
-db_initial_stress.values = [stress-xx,stress-yy,stress-zz,stress-xy,stress-yz,stress-yz]
+db_initial_stress.values = [stress-xx,stress-yy,stress-zz,stress-xy,stress-yz,stress-xz]
 db_initial_stress.data = [-60.0*MPa,-60.0*MPa,0.0,-29.38*MPa,0.0*MPa,0.0*MPa]
 
 # ----------------------------------------------------------------------
@@ -149,7 +149,7 @@ time_step = 0.04999*s
 writer = pylith.meshio.DataWriterHDF5Ext
 
 [pylithapp.timedependent.interfaces.fault.output]
-vertex_info_fields = [traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,time_weakening_time,time_weakening_parameter]
+vertex_info_fields = [traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter]
 vertex_data_fields = [slip,slip_rate,traction]
 output_freq = time_step
 time_step = 0.04999*s



More information about the CIG-COMMITS mailing list