[cig-commits] r20812 - seismo/3D/SPECFEM3D/trunk/src/specfem3D

joseph.charles at geodynamics.org joseph.charles at geodynamics.org
Tue Oct 9 08:26:49 PDT 2012


Author: joseph.charles
Date: 2012-10-09 08:26:48 -0700 (Tue, 09 Oct 2012)
New Revision: 20812

Modified:
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_acoustic.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_elastic.f90
Log:
fixes one small bug when using a FORCESOLUTION file


Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_acoustic.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_acoustic.f90	2012-10-08 21:03:20 UTC (rev 20811)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_acoustic.f90	2012-10-09 15:26:48 UTC (rev 20812)
@@ -165,7 +165,7 @@
                                nint(gamma_source(isource)), &
                                ispec)
 
-                f0 = hdur(isource) !! using hdur as a FREQUENCY just to avoid changing CMTSOLUTION file format
+                f0 = hdur(isource) !! using hdur as a FREQUENCY just to avoid changing FORCESOLUTION file format
 
                 !if (it == 1 .and. myrank == 0) then
                 !  write(IMAIN,*) 'using a source of dominant frequency ',f0
@@ -173,15 +173,10 @@
                 !  write(IMAIN,*) 'lambda_S at highest significant frequency = ',3000./sqrt(3.)/(2.5*f0)
                 !endif
 
-                ! we use nu_source(:,3) here because we want a source normal to the surface.
                 ! This is the expression of a Ricker; should be changed according maybe to the Par_file.
                 stf_used = factor_force_source(isource) * &
                            comp_source_time_function_rickr(dble(it-1)*DT-t0-tshift_cmt(isource),f0)
 
-
-                ! source encoding
-                stf_used = stf_used * pm1_source_encoding(isource)
-
                 ! beware, for acoustic medium, source is: pressure divided by Kappa of the fluid
                 ! the sign is negative because pressure p = - Chi_dot_dot therefore we need
                 ! to add minus the source to Chi_dot_dot to get plus the source in pressure:
@@ -475,9 +470,6 @@
                 stf_used = factor_force_source(isource) * comp_source_time_function_rickr( &
                                         dble(NSTEP-it)*DT-t0-tshift_cmt(isource),f0)
 
-                ! source encoding
-                stf_used = stf_used * pm1_source_encoding(isource)
-
                 ! beware, for acoustic medium, source is: pressure divided by Kappa of the fluid
                 ! the sign is negative because pressure p = - Chi_dot_dot therefore we need
                 ! to add minus the source to Chi_dot_dot to get plus the source in pressure:

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_elastic.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_elastic.f90	2012-10-08 21:03:20 UTC (rev 20811)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/compute_add_sources_elastic.f90	2012-10-09 15:26:48 UTC (rev 20812)
@@ -166,7 +166,7 @@
                           nint(gamma_source(isource)), &
                           ispec_selected_source(isource))
 
-                    f0 = hdur(isource) !! using hdur as a FREQUENCY just to avoid changing CMTSOLUTION file format
+                    f0 = hdur(isource) !! using hdur as a FREQUENCY just to avoid changing FORCESOLUTION file format
 
                     !if (it == 1 .and. myrank == 0) then
                     !  write(IMAIN,*) 'using a source of dominant frequency ',f0
@@ -189,7 +189,7 @@
                        do j=1,NGLLY
                           do i=1,NGLLX
                              iglob = ibool(i,j,k,ispec)
-                             accel(:,iglob) = accel(:,iglob) + sourcearrays(isource,:,i,j,k) * stf_used
+                             accel(:,iglob) = accel(:,iglob) + sourcearrays(isource,:,i,j,k)*stf_used
                           enddo
                        enddo
                     enddo



More information about the CIG-COMMITS mailing list