[cig-commits] r19415 - in seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk: EXAMPLES/attenuation src/meshfem2D src/specfem2D

xie.zhinan at geodynamics.org xie.zhinan at geodynamics.org
Mon Jan 23 04:56:19 PST 2012


Author: xie.zhinan
Date: 2012-01-23 04:56:19 -0800 (Mon, 23 Jan 2012)
New Revision: 19415

Modified:
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/Par_file_attenuation_2D
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/process.sh
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_file.F90
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/read_databases.f90
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/specfem2D.F90
Log:
Adding a parameter for other time scheme in Par_file


Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/Par_file_attenuation_2D
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/Par_file_attenuation_2D	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/Par_file_attenuation_2D	2012-01-23 12:56:19 UTC (rev 19415)
@@ -24,8 +24,9 @@
 
 # time step parameters
 nt                              = 1500           # total number of time steps
-deltat                          = 7.5e-4          # duration of a time step
+deltat                          = 7.5e-4         # duration of a time step
 USER_T0                         = 0.0d0          # use this t0 as earliest starting time rather than the automatically calculated one
+time_stepping_scheme            = 1              # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical 4th-order 4-stage Runge-Kutta
 
 # source parameters
 NSOURCES                        = 1              # number of sources [source info read in CMTSOLUTION file]

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/process.sh
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/process.sh	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/EXAMPLES/attenuation/process.sh	2012-01-23 12:56:19 UTC (rev 19415)
@@ -53,12 +53,12 @@
 echo
 echo "  running solver..."
 echo
-./xspecfem2D > OUTPUT_FILES/output_solver.txt
+./xspecfem2D > OUTPUT_FILES/output_solver.txt  #xiezhinan
 
 # stores output
-cp DATA/SOURCE_xz.dat OUTPUT_FILES/
-cp DATA/STATIONS OUTPUT_FILES/
-cp DATA/STATIONS_target OUTPUT_FILES/
+cp DATA/SOURCE_xz.dat OUTPUT_FILES/            #xiezhinan
+cp DATA/STATIONS OUTPUT_FILES/                 #xiezhinan
+cp DATA/STATIONS_target OUTPUT_FILES/          #xiezhinan
 
 echo
 echo "see results in directory: OUTPUT_FILES/"

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_file.F90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_file.F90	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_file.F90	2012-01-23 12:56:19 UTC (rev 19415)
@@ -142,6 +142,11 @@
 !  simulation will start at t = - t0)
   double precision :: USER_T0
 
+! value of time_stepping_scheme to decide which time scheme will be used              !xiezhinan
+! # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta),!xiezhinan
+! 3 = classical 4th-order 4-stage Runge-Kutta 					      !xiezhinan
+  integer :: time_stepping_scheme						      !xiezhinan
+
 !! DK DK for horizontal periodic conditions: detect common points between left and right edges
   logical :: ADD_PERIODIC_CONDITIONS
 
@@ -234,6 +239,9 @@
   call read_value_double_precision_p(USER_T0, 'solver.USER_T0')
   if(err_occurred() /= 0) stop 'error reading parameter 17b in Par_file'
 
+  call read_value_integer_p(time_stepping_scheme, 'solver.time_stepping_scheme')  !xiezhinan
+  if(err_occurred() /= 0) stop 'error reading parameter 17c in Par_file' !xiezhinan
+
   ! read source infos
   call read_value_integer_p(NSOURCES, 'solver.NSOURCES')
   if(err_occurred() /= 0) stop 'error reading parameter 18 in Par_file'

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90	2012-01-23 12:56:19 UTC (rev 19415)
@@ -163,6 +163,9 @@
     write(15,*) 'USER_T0'
     write(15,*) USER_T0
 
+    write(15,*) 'time_stepping_scheme'  !xiezhinan
+    write(15,*) time_stepping_scheme    !xiezhinan
+
     write(15,*) 'ADD_PERIODIC_CONDITIONS'
     write(15,*) ADD_PERIODIC_CONDITIONS
 

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/read_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/read_databases.f90	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/read_databases.f90	2012-01-23 12:56:19 UTC (rev 19415)
@@ -55,7 +55,7 @@
                   ATTENUATION_PORO_FLUID_PART,Q0,freq0,p_sv, &
                   NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
                   factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
-                  POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, &
+                  POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, time_stepping_scheme,&  !xiezhinan
                   ADD_PERIODIC_CONDITIONS,PERIODIC_horiz_dist,PERIODIC_DETECT_TOL)
 
 ! starts reading in parameters from input Database file
@@ -109,6 +109,11 @@
 !  simulation will start at t = - t0)
   double precision :: USER_T0
 
+! value of time_stepping_scheme to decide which time scheme will be used              !xiezhinan
+! # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta),!xiezhinan
+! 3 = classical 4th-order 4-stage Runge-Kutta 					      !xiezhinan
+  integer :: time_stepping_scheme						      !xiezhinan
+
 !! DK DK for horizontal periodic conditions: detect common points between left and right edges
   logical :: ADD_PERIODIC_CONDITIONS
 
@@ -230,6 +235,9 @@
   read(IIN,*) USER_T0
 
   read(IIN,"(a80)") datlin
+  read(IIN,*) time_stepping_scheme
+
+  read(IIN,"(a80)") datlin
   read(IIN,*) ADD_PERIODIC_CONDITIONS
 
   read(IIN,"(a80)") datlin

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/specfem2D.F90	2012-01-23 06:11:00 UTC (rev 19414)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/specfem2D/specfem2D.F90	2012-01-23 12:56:19 UTC (rev 19415)
@@ -375,6 +375,11 @@
 !  simulation will start at t = - t0)
   double precision :: USER_T0
 
+! value of time_stepping_scheme to decide which time scheme will be used              !xiezhinan
+! # 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta),!xiezhinan
+! 3 = classical 4th-order 4-stage Runge-Kutta 					      !xiezhinan
+  integer :: time_stepping_scheme						      !xiezhinan
+
 ! receiver information
   integer :: nrec,ios
   integer, dimension(:), allocatable :: ispec_selected_rec
@@ -911,7 +916,7 @@
                   ATTENUATION_PORO_FLUID_PART,Q0,freq0,p_sv, &
                   NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
                   factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
-                  POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, &
+                  POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, time_stepping_scheme, &
                   ADD_PERIODIC_CONDITIONS,PERIODIC_horiz_dist,PERIODIC_DETECT_TOL)
   if(nproc_read_from_database < 1) stop 'should have nproc_read_from_database >= 1'
   if(nproc /= nproc_read_from_database) stop 'must always have nproc == nproc_read_from_database'
@@ -943,7 +948,7 @@
                       ATTENUATION_PORO_FLUID_PART,Q0,freq0,p_sv, &
                       NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
                       factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
-                      POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, &
+                      POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0, time_stepping_scheme, &
                       ADD_PERIODIC_CONDITIONS,PERIODIC_horiz_dist,PERIODIC_DETECT_TOL)
 
   !



More information about the CIG-COMMITS mailing list