[cig-commits] r18671 - in seismo/3D/FAULT_SOURCE/branches/new_fault_db: . EXAMPLES EXAMPLES/splay_faults EXAMPLES/splay_faults/DATA EXAMPLES/splay_faults/DATA/FAULT EXAMPLES/tpv5.crack EXAMPLES/tpv5.crack/DATA EXAMPLES/tpv5.crack/DATA/FAULT
percygalvez at geodynamics.org
percygalvez at geodynamics.org
Wed Jun 29 00:12:08 PDT 2011
Author: percygalvez
Date: 2011-06-29 00:12:08 -0700 (Wed, 29 Jun 2011)
New Revision: 18671
Added:
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/FAULT_STATIONS.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/Par_file_faults.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/save_fault_nodes_elements.py
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.jpg
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.py
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/FAULT_STATIONS.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/Par_file_faults.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS.in
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/tpv5.py
Log:
adding EXAMPLES
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,13 @@
+PDE 1999 01 01 00 00 00.00 1000000 1000000 -1000000 1 1 dynamic_rupture
+event name: dynamic_rupture
+time shift: 0.0000
+half duration: 1.0
+latitude: 1000000.0
+longitude: 1000000.0
+depth: -1000000.0
+Mrr: 1.258900e+0
+Mtt: 1.258900e+0
+Mpp: 1.258900e+0
+Mrt: 0.000000e0
+Mrp: 0.000000e0
+Mtp: 0.000000e0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/CMTSOLUTION.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,13 @@
+PDE 1999 01 01 00 00 00.00 1000000 1000000 -1000000 1 1 dynamic_rupture
+event name: dynamic_rupture
+time shift: 0.0000
+half duration: 1.0
+latitude: 1000000.0
+longitude: 1000000.0
+depth: -1000000.0
+Mrr: 1.258900e+0
+Mtt: 1.258900e+0
+Mpp: 1.258900e+0
+Mrt: 0.000000e0
+Mrp: 0.000000e0
+Mtp: 0.000000e0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/FAULT_STATIONS.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/FAULT_STATIONS.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/FAULT_STATIONS.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,4 @@
+3
+176521.863 128000.0 -7962.0977 splayfaultA 1
+ 43894.8822 120000.0 -22000.0 splayfaultB 2
+ 74411.5427 120000.0 -9000.0 splayfaultC 2
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/Par_file_faults.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/Par_file_faults.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/FAULT/Par_file_faults.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,32 @@
+2
+0.00134 ! #tag #eta(damping) FAULT A
+0.00134 ! #tag #eta(damping) FAULT BC
+1 ! 1 = dyn 2=kin
+100 ! NTOUT : Number of time steps
+1000 ! NTSNAP: time interation of snapshots
+-1.0e0 ! V_HEALING (-1 : Healing off)
+1e-3 ! V_RUPT
+&BEGIN_FAULT dummy_idfault=1 /
+&INIT_STRESS S1=0.0e6,S2=0.0e0,S3=-4.78e6,n1=0,n2=3,n3=3 /
+&DIST2D shape='rectangle', val = -2.16e6, valh =0.0e0, xc = 113.5e3, yc =120.0e3, zc= -19500.0e0, r=0e0, l=0e0, lx=227.0e3, ly=80.0e3, lz=30000.0e0 /
+&DIST2D shape='rectangle', val = -2.88e6, valh =0.0e0, xc = 166521.863e0, yc =148.0e3, zc= -7962.09773e0, r=0e0, l=0.0e0, lx=23794.68e0, ly=24.0e3, lz=3132.628e0 /
+&DIST2D shape='rectangle-taper', val = -2.16e6, valh =-0.216e6, xc = 226407.564e0, yc =120.0e3, zc= -4.50e3, r=0e0, l=0e0, lx=45574.5247e3, ly=80.0e3, lz=3.0e3 /
+&DIST2D shape='rectangle', val =-0.478e6, valh =0.0e0, xc = 113.5e3, yc =120.0e3, zc= -15000.0e0, r=0e0, l=0e0, lx=227.0e3, ly=80.0e3, lz=30000.0e0 /
+&DIST2D shape='rectangle', val = -4.78e6, valh =0.0e0, xc = 113.5e3, yc =120.0e3, zc= -19500.0e0, r=0e0, l=0e0, lx=227.0e3, ly=80.0e3, lz=30000.0e0 /
+&DIST2D shape='rectangle-taper', val = -4.78e6, valh=-0.478e6, xc = 226407.564e0, yc =120.0e3, zc= -4.5e3, r=0e0, l=0e0, lx=45574.5247e3, ly=80.0e3, lz=3.0e3 /
+&SWF mus=1000.0e0,mud=1000.0e0,dc=0.5e0,nmus=1,nmud=1,ndc=0 /
+&DIST2D shape='rectangle', val = 0.6e0, valh = 0.0e0, xc = 113.5e3, yc =140.0e3, zc= -15.0e3, r=0e0, l=0e0, lx=227.0e3, ly=40.0e3, lz=30000.0e0 /
+&DIST2D shape='rectangle', val = 0.2e0, valh = 0.0e0, xc = 113.5e3, yc =140.0e3, zc= -15.0e3, r=0e0, l=0e0, lx=227.0e3, ly=40.0e3, lz=30000.0e0 /
+&BEGIN_FAULT dummy_idfault=2 /
+&INIT_STRESS S1=0.0e6,S2=0.0e0,S3=-100.0e6,n1=0,n2=3,n3=4 /
+&DIST2D shape='rectangle', val = -5.69e6, valh=0.0e0, xc = 70514.4284e0, yc =120.0e3, zc=-11.25e3,r=0e0, l=0e0, lx=23382.6859e0, ly=80.0e3, lz=13.5e3 /
+&DIST2D shape='rectangle', val = -3.54e6, valh=0.0e0, xc = 43894.8822e0, yc =120.0e3, zc=-22.0e3, r=0e0, l=0e0, lx=29856.4065e0, ly=80.0e3, lz= 8.0e3 /
+&DIST2D shape='rectangle-taper', val = -5.69e6, valh=-0.569e6, xc = 55819.1065e0, yc =120.0e3, zc= -4.5e3, r=0e0, l=0e0, lx=45574.5247e3, ly=80.0e3, lz=3.0e3 /
+&DIST2D shape='rectangle', val =-1.238e6, valh=0.0e0, xc = 74411.5427e0, yc =120.0e3, zc= -9.0e3, r=0e0, l=0e0, lx=31176.9145e0, ly=80.0e3, lz=18.0e3 /
+&DIST2D shape='rectangle', val =-12.38e6, valh=0.0e0, xc = 70514.4284e0, yc =120.0e3, zc=-11.25e3,r=0e0, l=0e0, lx=23382.6859e0, ly=80.0e3, lz=13.5e3 /
+&DIST2D shape='rectangle-taper', val =-12.38e6, valh=-1.238e6, xc = 55819.1065e0, yc =120.0e3, zc= -4.5e3, r=0e0, l=0e0, lx=45574.5247e3, ly=80.0e3, lz=3.0e3 /
+&DIST2D shape='rectangle', val = -9.04e6, valh=0.0e0, xc = 43894.8822e0, yc =120.0e3, zc=-22.0e3, r=0e0, l=0e0, lx=29856.4065e0, ly=80.0e3, lz= 8.0e3 /
+&SWF mus=1000.e0,mud=1000.0e0,dc=0.5e0,nmus=1,nmud=1,ndc=0 /
+&DIST2D shape='rectangle', val = 0.6e0, valh=0.0e0, xc = 60.1915e3, yc =120.0e3, zc=-13.0e3,r=0e0, l=0e0, lx=59616.98e0, ly=80.0e3, lz=26.0e3 /
+&DIST2D shape='rectangle', val = 0.2e0, valh=0.0e0, xc = 60.1915e3, yc =120.0e3, zc=-13.0e3,r=0e0, l=0e0, lx=59616.98e0, ly=80.0e3, lz=26.0e3 /
+&KINPAR kindt=10.0e-3
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE = 11
+SUPPRESS_UTM_PROJECTION = .true.
+
+# number of MPI processors
+NPROC = 100
+
+# time step parameters
+NSTEP = 62000
+DT = 0.00325d0
+
+# parameters describing the model
+OCEANS = .false.
+ATTENUATION = .false.
+USE_OLSEN_ATTENUATION = .false.
+ANISOTROPY = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS = .true.
+ABSORB_FREE_SURFACE = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE = .true.
+MOVIE_VOLUME = .false.
+NTSTEP_BETWEEN_FRAMES = 16500
+CREATE_SHAKEMAP = .false.
+SAVE_DISPLACEMENT = .true.
+USE_HIGHRES_FOR_MOVIES = .false.
+HDUR_MOVIE = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH = /cluster/work/erdw/gpercy
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/Par_file.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE = 11
+SUPPRESS_UTM_PROJECTION = .true.
+
+# number of MPI processors
+NPROC = 100
+
+# time step parameters
+NSTEP = 62000
+DT = 0.00325d0
+
+# parameters describing the model
+OCEANS = .false.
+ATTENUATION = .false.
+USE_OLSEN_ATTENUATION = .false.
+ANISOTROPY = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS = .true.
+ABSORB_FREE_SURFACE = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE = .true.
+MOVIE_VOLUME = .false.
+NTSTEP_BETWEEN_FRAMES = 16500
+CREATE_SHAKEMAP = .false.
+SAVE_DISPLACEMENT = .true.
+USE_HIGHRES_FOR_MOVIES = .false.
+HDUR_MOVIE = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH = /cluster/work/erdw/gpercy
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,3 @@
+splayfaultA_surf SC 128000.0 176521.863 0.0 0.0
+splayfaultB_surf SC 120000.0 43894.8822 0.0 0.0
+splayfaultc_surf SC 120000.0 74411.5427 0.0 0.0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/DATA/STATIONS.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,3 @@
+splayfaultA_surf SC 128000.0 176521.863 0.0 0.0
+splayfaultB_surf SC 120000.0 43894.8822 0.0 0.0
+splayfaultc_surf SC 120000.0 74411.5427 0.0 0.0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/save_fault_nodes_elements.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/save_fault_nodes_elements.py (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/save_fault_nodes_elements.py 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,69 @@
+#!python
+# Opening fault cracks
+# Input : surface up and down.
+import cubit
+
+class fault_input:
+ def __init__(self,id,surface_u,surface_d):
+ self.id = id
+ self.surface_u = surface_u
+ self.surface_d = surface_d
+ self.name = 'MESH/fault_file_'+str(id)+'.dat'
+
+def save_cracks(name,list_surface_up,list_surface_down):
+ quads_fault_up = []
+ quads_fault_down = []
+ for surface in list_surface_up :
+ quads_fault = cubit.get_surface_quads(surface)
+ quads_fault_up.append(quads_fault)
+ for surface in list_surface_down :
+ quads_fault = cubit.get_surface_quads(surface)
+ quads_fault_down.append(quads_fault)
+ # TO DO : stop python properly in case fault nodes at both sides
+ # do not match.
+ # if len(quads_fault_u) != len(quads_fault_d): stop
+ #
+ # SAVING FAULT ELEMENTS AND NODES
+ return quads_fault_up,quads_fault_down
+
+def unpack_list(fault_list):
+ list_fault = []
+ for i in range(0,len(fault_list)):
+ el=list(fault_list[i])
+ for j in el:
+ list_fault.append(j)
+ return list_fault
+
+def save_elements_nodes(name,quads_fault_u,quads_fault_d):
+ fault_file = open(name,'w')
+ txt =''
+ list_hex=cubit.parse_cubit_list('hex','all')
+ txt='%10i %10i\n' % (len(quads_fault_u),len(quads_fault_d))
+ fault_file.write(txt)
+
+ dic_quads_fault_u = dict(zip(quads_fault_u,quads_fault_u))
+ dic_quads_fault_d = dict(zip(quads_fault_d,quads_fault_d))
+
+ # FAULT SIDE DOWN
+ for h in list_hex:
+ faces = cubit.get_sub_elements('hex',h,2)
+ for f in faces:
+ if dic_quads_fault_d.has_key(f):
+ nodes=cubit.get_connectivity('Face',f)
+ # print 'h,fault nodes side down :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+ txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+ nodes[1],nodes[2],nodes[3])
+ fault_file.write(txt)
+
+ # FAULT SIDE UP
+ for h in list_hex:
+ faces = cubit.get_sub_elements('hex',h,2)
+ for f in faces:
+ if dic_quads_fault_u.has_key(f):
+ nodes=cubit.get_connectivity('Face',f)
+ # print 'h,fault nodes side up :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+ txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+ nodes[1],nodes[2],nodes[3])
+ fault_file.write(txt)
+
+ fault_file.close()
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.jpg
===================================================================
(Binary files differ)
Property changes on: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.py (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/splay_faults.py 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,236 @@
+#!/usr/bin/env python
+
+import cubit
+import boundary_definition
+import cubit2specfem3d
+import math
+import os
+import sys
+import numarray
+from save_fault_nodes_elements import *
+
+cubit.cmd('reset')
+
+km = 1000
+y_vert=0*km
+h = 0.1#(h=0.1)
+h1 = 0.1#(h1=0.1)
+# dipping angle 1
+d = math.pi/180
+dip1=7.5*d
+# dipping angle 2
+dip2=15*d
+# L , D and W (bulk)
+L=230*km #230*km
+D=50*km #50*km
+W=160*km #160*km
+
+############# Domain size ############
+Dy = 80*km+W
+## redefine origin (input data)###
+
+#### initializing coordinates x,y,z
+x=[] # fault
+y=[]
+z=[]
+
+xbulk=[] # bulk
+ybulk=[]
+zbulk=[]
+
+# Bulk points ###
+xbulk.append(-10*km-L) #x1
+xbulk.append(250*km+L) #x2
+xbulk.append(250*km+L) #x3
+xbulk.append(-10*km-L) #x4
+
+zbulk.append(0*km) #y1
+zbulk.append(0*km) #y2
+zbulk.append(-50*km-D) #y3
+zbulk.append(-50*km-D) #y4
+
+ybulk=[y_vert]*4
+
+### CRACKS ##########
+x.append(0*km) #x5
+x.append(4*km/math.tan(dip1)) #x6 = x11 (triple joint)
+x.append(x[1]+8*km/math.tan(dip2)) #x7
+x.append(x[2]) #x8 = x7 (kink point)
+x.append(90*km-h1) #x9
+x.append(90*km+h1) #x10 = x9+h1 (surface point, fault C)
+x.append(x[1]) #x11
+x.append(227*km-h1) #x12
+x.append(227*km+h1) #x13 = x12+h1 (surface point, fault A)
+
+z.append(-30*km) #z5
+z.append(-26*km) #z6
+z.append(-18*km) #z7 (kink point)
+z.append(z[2]-h1) #z8 = z7-h1 (kink point)
+z.append(0) #z9
+z.append(0) #z10 = z9
+z.append(-26*km-h1) #z11 = z6-h1
+z.append(0) #z12
+z.append(0) #z13
+
+y=[y_vert]*9
+#####
+
+#################### bulk ###########################################
+for i in range(len(xbulk)):
+ vert="create vertex x "+str(xbulk[i])+" y "+str(ybulk[i])+" z "+str(zbulk[i])
+ cubit.cmd(vert)
+
+################ Loading fault points profile#############################
+for i in range(len(x)):
+ vert="create vertex x "+str(x[i])+" y "+str(y[i])+" z "+str(z[i])
+ cubit.cmd(vert)
+
+################ creating fault domains #################################
+
+bulk1="create curve vertex 1 9" #c1
+bulk2="create curve vertex 10 12" #c2
+bulk3="create curve vertex 13 2" #c3
+bulk4="create curve vertex 2 3" #c4
+bulk5="create curve vertex 3 4" #c5
+bulk6="create curve vertex 4 1" #c6
+
+cubit.cmd(bulk1)
+cubit.cmd(bulk2)
+cubit.cmd(bulk3)
+cubit.cmd(bulk4)
+cubit.cmd(bulk5)
+cubit.cmd(bulk6)
+
+fault_up_A1="create curve spline vertex 5 6" #c7
+fault_up_A2="create curve spline vertex 6 12" #c8
+
+fault_down_A1="create curve spline vertex 5 11" #c9
+fault_down_A2="create curve spline vertex 11 13" #c10
+
+fault_up_BC1="create curve vertex 9 7" #c11
+fault_up_BC2="create curve vertex 7 6" #c12
+fault_down_BC1="create curve vertex 10 8" #c13
+fault_down_BC2="create curve vertex 8 6" #c14
+
+cubit.cmd(fault_up_A1)
+cubit.cmd(fault_up_A2)
+cubit.cmd(fault_down_A1)
+cubit.cmd(fault_down_A2)
+
+cubit.cmd(fault_up_BC1)
+cubit.cmd(fault_up_BC2)
+cubit.cmd(fault_down_BC1)
+cubit.cmd(fault_down_BC2)
+
+surface="create surface curve 1 11 12 7 9 10 3 4 5 6"
+cubit.cmd(surface)
+
+surface="create surface curve 2 13 14 8"
+cubit.cmd(surface)
+
+cubit.cmd("sweep surface 1 vector 0 1 0 distance "+str(Dy))
+cubit.cmd("sweep surface 2 vector 0 1 0 distance "+str(Dy))
+
+### fault crack (Not necessary here) ###
+# FAULT A
+cubit.cmd('curve 8 7 9 10 merge off')
+# FAULT B
+cubit.cmd('curve 11 12 merge off')
+# FAULT C
+cubit.cmd('curve 13 14 merge off')
+#cubit.cmd('merge tolerance 1e-3')
+
+#####################################################
+elementsize = 2000 #(2500)
+
+# IMPRINTING
+cubit.cmd("imprint all")
+# MERGING
+cubit.cmd("merge all")
+
+# Meshing coincide fault_A upper boundaries .
+cubit.cmd('curve 8 10 7 9 size 2000')
+cubit.cmd('curve 8 10 7 9 scheme equal')
+cubit.cmd('mesh curve 8 10 7 9')
+cubit.cmd("surface 13 18 size "+str(elementsize))
+cubit.cmd("volume 1 2 3 size "+str(elementsize))
+cubit.cmd("surface 13 18 scheme pave")
+cubit.cmd("mesh surface 13 18 ")
+cubit.cmd("mesh volume 1 2 ")
+#cubit.cmd("unmerge surface 2 3")
+
+########## loading cracks #######
+#SAVING FAULT NODES AND ELEMENTS.
+os.system('mkdir -p MESH')
+########## FAULT A ##############################################################
+## NOTE : FACE FAULT REFERENCE : face_down.
+Au = [8,15] #face_up
+Ad = [6,7] #face_down
+faultA = fault_input(1,Au,Ad)
+quads_Aup,quads_Adp = save_cracks(faultA.name,faultA.surface_u,faultA.surface_d)
+#Unpacking list.
+quads_Au=unpack_list(quads_Aup)
+quads_Ad=unpack_list(quads_Adp)
+
+print 'len(Au):',len(quads_Au)
+print 'len(Ad):',len(quads_Ad)
+
+if not (len(quads_Au)==len(quads_Ad)):
+ print 'Number of elements for each fauld side up and down do not concide'
+ sys.exit('goodbye')
+
+save_elements_nodes(faultA.name,quads_Au,quads_Ad)
+
+########## FAULT BC ##############################################################
+BCu = [9,10] #face_up
+BCd = [14,17] #face_down
+faultBC = fault_input(2,BCu,BCd)
+quads_BCup,quads_BCdp = save_cracks(faultBC.name,faultBC.surface_u,faultBC.surface_d)
+#Unpacking list.
+quads_BCu=unpack_list(quads_BCup)
+quads_BCd=unpack_list(quads_BCdp)
+
+print 'len(BCu):',len(quads_BCu)
+print 'len(BCd):',len(quads_BCd)
+
+if not (len(quads_BCu)==len(quads_BCd)):
+ print 'Number of elements for each fauld side up and down do not concide'
+ sys.exit('goodbye')
+
+save_elements_nodes(faultBC.name,quads_BCu,quads_BCd)
+
+### Exporting the mesh to cubit.
+boundary_definition.entities=['face']
+boundary_definition.define_bc(boundary_definition.entities,parallel=True)
+
+#### Define material properties for the 2 volumes ################
+cubit.cmd('#### DEFINE MATERIAL PROPERTIES #######################')
+
+# Material properties in concordance with tpv5 benchmark.
+
+cubit.cmd('block 1 name "elastic 1" ') # material region
+cubit.cmd('block 1 attribute count 5')
+cubit.cmd('block 1 attribute index 1 1') # flag for fault domain 1
+cubit.cmd('block 1 attribute index 2 5477.2') # vp
+cubit.cmd('block 1 attribute index 3 3162.3') # vs
+cubit.cmd('block 1 attribute index 4 3000') # rho
+cubit.cmd('block 1 attribute index 5 13') # Q flag (see constants.h: IATTENUATION_ ... )
+
+# Material properties in concordance with tpv5 benchmark.
+
+cubit.cmd('block 2 name "elastic 2" ') # material region
+cubit.cmd('block 2 attribute count 5')
+cubit.cmd('block 2 attribute index 1 1') # flag for fault domain 2
+cubit.cmd('block 2 attribute index 2 5477.2') # vp
+cubit.cmd('block 2 attribute index 3 3162.3') # vs
+cubit.cmd('block 2 attribute index 4 3000') # rho
+cubit.cmd('block 2 attribute index 5 13') # Q flag (see constants.h: IATTENUATION_ ... )
+
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT
+
+cubit2specfem3d.export2SESAME('MESH')
+
+# all files needed by SCOTCH are now in directory MESH
+
+
+
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,13 @@
+PDE 1999 01 01 00 00 00.00 1000000 1000000 -1000000 1 1 dynamic_rupture
+event name: dynamic_rupture
+time shift: 0.0000
+half duration: 0.0
+latitude: 1000000.0
+longitude: 1000000.0
+depth: -1000000.0
+Mrr: 1.258900e+0
+Mtt: 1.258900e+0
+Mpp: 1.258900e+0
+Mrt: 0.000000e0
+Mrp: 0.000000e0
+Mtp: 0.000000e0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/CMTSOLUTION.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,13 @@
+PDE 1999 01 01 00 00 00.00 1000000 1000000 -1000000 1 1 dynamic_rupture
+event name: dynamic_rupture
+time shift: 0.0000
+half duration: 0.0
+latitude: 1000000.0
+longitude: 1000000.0
+depth: -1000000.0
+Mrr: 1.258900e+0
+Mtt: 1.258900e+0
+Mpp: 1.258900e+0
+Mrt: 0.000000e0
+Mrp: 0.000000e0
+Mtp: 0.000000e0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/FAULT_STATIONS.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/FAULT_STATIONS.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/FAULT_STATIONS.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,17 @@
+16
+ -4500.0 0.0 0.0 faultst-045dp000 1
+ -4500.0 0.0 -7500.0 faultst-045dp075 1
+ -7500.0 0.0 0.0 faultst-075dp000 1
+ -7500.0 0.0 -7500.0 faultst-075dp075 1
+-12000.0 0.0 0.0 faultst-120dp000 1
+-12000.0 0.0 -7500.0 faultst-120dp075 1
+ 0.0 0.0 0.0 faultst000dp000 1
+ 0.0 0.0 -4500.0 faultst000dp045 1
+ 0.0 0.0 -7500.0 faultst000dp075 1
+ 0.0 0.0 -12000.0 faultst000dp120 1
+ 4500.0 0.0 0.0 faultst045dp000 1
+ 4500.0 0.0 -7500.0 faultst045dp075 1
+ 7500.0 0.0 0.0 faultst075dp000 1
+ 7500.0 0.0 -7500.0 faultst075dp075 1
+ 12000.0 0.0 0.0 faultst120dp000 1
+ 12000.0 0.0 -7500.0 faultst120dp075 1
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/Par_file_faults.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/Par_file_faults.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/FAULT/Par_file_faults.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,15 @@
+1
+0.00134 ! #tag #eta(damping)
+2 ! 1 = dyn 2=kin
+1000 ! NTOUT : Number of time steps
+100 ! NTSNAP: time interation of snapshots
+-1.0e0 ! V_HEALING (-1 : Healing off)
+1e-3 ! V_RUPT
+&BEGIN_FAULT dummy_idfault=1 /
+&INIT_STRESS S1=70.0e6,S2=0.0e0,S3=-120.0e6,n1=3,n2=0,n3=0 /
+&DIST2D shape='square', val = 78.0e6, xc = -7500.0e0, yc =0e0, zc= -7500.0e0, r=0e0, l=3000.0e0, lx=0e0, ly=0e0, lz=0e0 /
+&DIST2D shape='square', val = 81.6e6, xc = 0e0, yc =0e0, zc= -7500.0e0, r=0e0, l=3000.0e0, lx=0e0, ly=0e0, lz=0e0 /
+&DIST2D shape='square', val = 62.0e6, xc = 7500.0e0, yc =0e0, zc= -7500.0e0, r=0e0, l=3000.0e0, lx=0e0, ly=0e0, lz=0e0 /
+&SWF mus=10000.0e0,mud=0.525e0,dc=0.4e0,nmus=1,nmud=0,ndc=0 /
+&DIST2D shape='rectangle', val = 0.677e0, xc = 0e0, yc =0e0, zc= -7500.0e0, r=0e0, l=0e0, lx=30000.0e0, ly=0.0e0, lz=15000.0e0 /
+&KINPAR kindt=10.0e-3
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE = 11
+SUPPRESS_UTM_PROJECTION = .true.
+
+# number of MPI processors
+NPROC = 100
+
+# time step parameters
+NSTEP = 12000
+DT = 0.001d0
+
+# parameters describing the model
+OCEANS = .false.
+ATTENUATION = .false.
+USE_OLSEN_ATTENUATION = .false.
+ANISOTROPY = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS = .true.
+ABSORB_FREE_SURFACE = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE = .false.
+MOVIE_VOLUME = .false.
+NTSTEP_BETWEEN_FRAMES = 200
+CREATE_SHAKEMAP = .false.
+SAVE_DISPLACEMENT = .false.
+USE_HIGHRES_FOR_MOVIES = .false.
+HDUR_MOVIE = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH = /home/galvez/FAULT_SOURCE/DATABASES_MPI
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/Par_file.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE = 1 # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE = 11
+SUPPRESS_UTM_PROJECTION = .true.
+
+# number of MPI processors
+NPROC = 100
+
+# time step parameters
+NSTEP = 12000
+DT = 0.001d0
+
+# parameters describing the model
+OCEANS = .false.
+ATTENUATION = .false.
+USE_OLSEN_ATTENUATION = .false.
+ANISOTROPY = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS = .true.
+ABSORB_FREE_SURFACE = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE = .false.
+MOVIE_VOLUME = .false.
+NTSTEP_BETWEEN_FRAMES = 200
+CREATE_SHAKEMAP = .false.
+SAVE_DISPLACEMENT = .false.
+USE_HIGHRES_FOR_MOVIES = .false.
+HDUR_MOVIE = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH = /home/galvez/FAULT_SOURCE/DATABASES_MPI
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,4 @@
+str12dp00 SC 3000.0 12000.00 0.0 0.0
+str-12dp00 SC 3000.0 -12000.00 0.0 0.0
+str12dp75 SC 3000.0 12000.00 0.0 7500.0
+str-12dp75 SC 3000.0 -12000.00 0.0 7500.0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS.in
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS.in (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/DATA/STATIONS.in 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,4 @@
+str12dp00 SC 3000.0 12000.00 0.0 0.0
+str-12dp00 SC 3000.0 -12000.00 0.0 0.0
+str12dp75 SC 3000.0 12000.00 0.0 7500.0
+str-12dp75 SC 3000.0 -12000.00 0.0 7500.0
Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/tpv5.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/tpv5.py (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv5.crack/tpv5.py 2011-06-29 07:12:08 UTC (rev 18671)
@@ -0,0 +1,175 @@
+#!/usr/bin/env python
+
+import cubit
+import boundary_definition
+import cubit2specfem3d
+import math
+import os
+import sys
+cubit.cmd('reset')
+
+km = 1000
+z_surf=0*km
+#### initializing coordinates x,y,z
+x=[] # fault
+y=[]
+z=[]
+
+xbulk=[] # bulk
+ybulk=[]
+zbulk=[]
+
+xbulk.append(-21*km) #x1
+xbulk.append(21*km) #x2
+xbulk.append(21*km) #x3
+xbulk.append(-21*km) #x4
+
+ybulk.append(-21*km) #y1
+ybulk.append(-21*km) #y2
+ybulk.append(21*km) #y3
+ybulk.append(21*km) #y4
+
+zbulk=[z_surf]*4
+
+x.append(-9*km) #x5
+x.append(0*km) #x6
+x.append(9*km) #x7
+x.append(0*km) #x8
+
+y.append(0.0) #y5
+y.append(0.1) #y6
+y.append(0.0) #y7
+y.append(-0.1) #y8
+
+
+z=[z_surf]*4
+
+#################### bulk ###########################################
+for i in range(len(xbulk)):
+ vert="create vertex x "+str(xbulk[i])+" y "+str(ybulk[i])+" z "+str(zbulk[i])
+ cubit.cmd(vert)
+
+################ Loading fault points profile#############################
+for i in range(len(x)):
+ vert="create vertex x "+str(x[i])+" y "+str(y[i])+" z "+str(z[i])
+ cubit.cmd(vert)
+
+
+################ creating fault domains #################################
+bulk1="create curve vertex 1 2"
+bulk2="create curve vertex 2 3"
+bulk3="create curve vertex 3 4"
+bulk4="create curve vertex 4 1"
+
+fault_up="create curve spline vertex 5 6 7"
+fault_down="create curve spline vertex 5 8 7"
+
+cubit.cmd(bulk1)
+cubit.cmd(bulk2)
+cubit.cmd(bulk3)
+cubit.cmd(bulk4)
+
+cubit.cmd(fault_up)
+cubit.cmd(fault_down)
+
+surface="create surface curve 1 2 3 4 5 6"
+cubit.cmd(surface)
+
+cubit.cmd("sweep surface 1 vector 0 0 -1 distance "+str(21*km))
+cubit.cmd("sweep curve 5 vector 0 0 -1 distance "+str(21*km))
+cubit.cmd("sweep curve 6 vector 0 0 -1 distance "+str(21*km))
+
+#####################################################
+elementsize = 1000
+cubit.cmd("imprint all")
+cubit.cmd("merge all")
+cubit.cmd("surface 1 size "+str(elementsize))
+cubit.cmd("volume 1 size "+str(elementsize))
+cubit.cmd("surface 1 scheme pave")
+cubit.cmd("mesh surface 1")
+cubit.cmd("mesh volume 1")
+#cubit.cmd("unmerge surface 2 3")
+
+########### SIDESETS (NOT USED ) ###############
+#fault_A_elements_up="sideset 200 surface 2"
+#fault_A_elements_down="sideset 201 surface 3"
+#cubit.cmd(fault_A_elements_up)
+#cubit.cmd(fault_A_elements_down)
+
+########### Fault elements and nodes ###############
+
+os.system('mkdir -p MESH')
+
+fault_u = 2 # fault surface up : surface 2
+fault_d = 3 # fault surface down : surface 3
+txt =''
+
+fault_file=open('MESH/fault_file_1.dat','w')
+list_hex=cubit.parse_cubit_list('hex','all')
+
+quads_fault_u = cubit.get_surface_quads(fault_u)
+quads_fault_d = cubit.get_surface_quads(fault_d)
+
+# TO DO : stop python properly in case fault nodes at both sides
+# do not match.
+if len(quads_fault_u) != len(quads_fault_d):
+ stop
+# Writting number of elements at both sides to make
+# double sure everything is going fine .
+txt='%10i %10i\n' % (len(quads_fault_u),len(quads_fault_d))
+fault_file.write(txt)
+
+dic_quads_fault_u = dict(zip(quads_fault_u,quads_fault_u))
+dic_quads_fault_d = dict(zip(quads_fault_d,quads_fault_d))
+
+# FAULT SIDE UP
+for h in list_hex:
+ faces = cubit.get_sub_elements('hex',h,2)
+ for f in faces:
+ if dic_quads_fault_u.has_key(f):
+ nodes=cubit.get_connectivity('Face',f)
+# print 'h,fault nodes side up :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+ txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+ nodes[1],nodes[2],nodes[3])
+ fault_file.write(txt)
+
+# FAULT SIDE DOWN
+for h in list_hex:
+ faces = cubit.get_sub_elements('hex',h,2)
+ for f in faces:
+ if dic_quads_fault_d.has_key(f):
+ nodes=cubit.get_connectivity('Face',f)
+# print 'h,fault nodes side down :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+ txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+ nodes[1],nodes[2],nodes[3])
+ fault_file.write(txt)
+
+# CLOSING FAULT FILE
+fault_file.close()
+
+# FOR THE BULK (Seismic wave propagation part for SESAME)
+
+###### This is boundary_definition.py of GEOCUBIT
+#..... which extracts the bounding faces and defines them into blocks
+boundary_definition.entities=['face']
+boundary_definition.define_bc(boundary_definition.entities,parallel=True)
+
+#### Define material properties for the 2 volumes ################
+cubit.cmd('#### DEFINE MATERIAL PROPERTIES #######################')
+
+# Material properties in concordance with tpv5 benchmark.
+
+cubit.cmd('block 1 name "elastic 1" ') # material region
+cubit.cmd('block 1 attribute count 5')
+cubit.cmd('block 1 attribute index 1 1') # flag for fault side 1
+cubit.cmd('block 1 attribute index 2 6000') # vp
+cubit.cmd('block 1 attribute index 3 3464') # vs
+cubit.cmd('block 1 attribute index 4 2670') # rho
+cubit.cmd('block 1 attribute index 5 13') # Q flag (see constants.h: IATTENUATION_ ... )
+
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT
+
+cubit2specfem3d.export2SESAME('MESH')
+
+# all files needed by SCOTCH are now in directory MESH
+
More information about the CIG-COMMITS
mailing list