[cig-commits] r16262 - in seismo/2D/SPECFEM2D/trunk: . DATA

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Mon Feb 15 04:36:52 PST 2010


Author: dkomati1
Date: 2010-02-15 04:36:51 -0800 (Mon, 15 Feb 2010)
New Revision: 16262

Modified:
   seismo/2D/SPECFEM2D/trunk/DATA/Par_file
   seismo/2D/SPECFEM2D/trunk/specfem2D.F90
Log:
removed two useless lines


Modified: seismo/2D/SPECFEM2D/trunk/DATA/Par_file
===================================================================
--- seismo/2D/SPECFEM2D/trunk/DATA/Par_file	2010-02-14 03:31:34 UTC (rev 16261)
+++ seismo/2D/SPECFEM2D/trunk/DATA/Par_file	2010-02-15 12:36:51 UTC (rev 16262)
@@ -62,7 +62,7 @@
 generate_STATIONS               = .true.         # creates a STATION file in ./DATA
 nreceiverlines                  = 1              # number of receiver lines
 anglerec                        = 0.d0           # angle to rotate components at receivers
-rec_normal_to_surface           = .false.        # base anglerec normal to surface (external mesh and curve file needed)
+rec_normal_to_surface           = .false.        # replace anglerec with the normal to the surface (external mesh and curve file needed, anglerec above ignored)
 
 # first receiver line
 nrec                            = 100             # number of receivers

Modified: seismo/2D/SPECFEM2D/trunk/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2010-02-14 03:31:34 UTC (rev 16261)
+++ seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2010-02-15 12:36:51 UTC (rev 16262)
@@ -256,7 +256,7 @@
 
   integer :: i,j,k,l,it,irec,ipoin,ip,id,n,ispec,npoin,npgeo,iglob
   logical :: anyabs
-  double precision :: dxd,dyd,dzd,dcurld,valux,valuy,valuz,valcurl,hlagrange,rhol,cosrot,sinrot,xi,gamma,x,z
+  double precision :: dxd,dyd,dzd,dcurld,valux,valuy,valuz,valcurl,hlagrange,rhol,xi,gamma,x,z
 
 ! coefficients of the explicit Newmark time scheme
   integer NSTEP
@@ -1901,7 +1901,7 @@
        rec_tangential_detection_curve(irecloc) = n1_tangential_detection_curve
        call tri_quad(n_tangential_detection_curve, n1_tangential_detection_curve, nnodes_tangential_curve)
 
-       call calcul_normale( anglerec_irec(irecloc), nodes_tangential_curve(1,n_tangential_detection_curve(1)), &
+       call compute_normal_vector( anglerec_irec(irecloc), nodes_tangential_curve(1,n_tangential_detection_curve(1)), &
          nodes_tangential_curve(1,n_tangential_detection_curve(2)), &
          nodes_tangential_curve(1,n_tangential_detection_curve(3)), &
          nodes_tangential_curve(1,n_tangential_detection_curve(4)), &
@@ -1915,6 +1915,7 @@
     cosrot_irec(:) = cos(anglerec_irec(:))
     sinrot_irec(:) = sin(anglerec_irec(:))
   endif
+
 ! for the source
   if (force_normal_to_surface) then
 
@@ -1933,7 +1934,7 @@
 
     call tri_quad(n_tangential_detection_curve, n1_tangential_detection_curve, nnodes_tangential_curve)
 
-    call calcul_normale( angleforce(i_source), nodes_tangential_curve(1,n_tangential_detection_curve(1)), &
+    call compute_normal_vector( angleforce(i_source), nodes_tangential_curve(1,n_tangential_detection_curve(1)), &
       nodes_tangential_curve(1,n_tangential_detection_curve(2)), &
       nodes_tangential_curve(1,n_tangential_detection_curve(3)), &
       nodes_tangential_curve(1,n_tangential_detection_curve(4)), &
@@ -2866,9 +2867,6 @@
   sisux = ZERO
   sisuz = ZERO
 
-  cosrot = cos(anglerec)
-  sinrot = sin(anglerec)
-
 ! initialize arrays to zero
   displ_elastic = ZERO
   veloc_elastic = ZERO
@@ -6738,11 +6736,11 @@
 ! rotate seismogram components if needed, except if recording pressure, which is a scalar
     if(seismotype /= 4 .and. seismotype /= 6) then
       if(p_sv) then
-      sisux(seismo_current,irecloc) =   cosrot_irec(irecloc)*valux + sinrot_irec(irecloc)*valuz
-      sisuz(seismo_current,irecloc) = - sinrot_irec(irecloc)*valux + cosrot_irec(irecloc)*valuz
+        sisux(seismo_current,irecloc) =   cosrot_irec(irecloc)*valux + sinrot_irec(irecloc)*valuz
+        sisuz(seismo_current,irecloc) = - sinrot_irec(irecloc)*valux + cosrot_irec(irecloc)*valuz
       else
-      sisux(seismo_current,irecloc) = valuy
-      sisuz(seismo_current,irecloc) = ZERO
+        sisux(seismo_current,irecloc) = valuy
+        sisuz(seismo_current,irecloc) = ZERO
       endif
     else
       sisux(seismo_current,irecloc) = valux
@@ -7615,7 +7613,7 @@
 end subroutine tri_quad
 
 
-subroutine calcul_normale( angle, n1_x, n2_x, n3_x, n4_x, n1_z, n2_z, n3_z, n4_z )
+subroutine compute_normal_vector( angle, n1_x, n2_x, n3_x, n4_x, n1_z, n2_z, n3_z, n4_z )
 
       implicit none
 
@@ -7647,8 +7645,7 @@
       theta2 = - sign(1.d0,n3_x - n2_x) * acos(costheta2)
       theta3 = - sign(1.d0,n4_x - n3_x) * acos(costheta3)
 
+      angle = (theta1 + theta2 + theta3) / 3.d0 + PI/2.d0
 
-      angle = angle + ( theta1 + theta2 + theta3 ) / 3.d0 + PI/2.d0
-      !angle = theta2
+end subroutine compute_normal_vector
 
-end subroutine calcul_normale



More information about the CIG-COMMITS mailing list