[cig-commits] r22499 - in seismo/3D/SPECFEM3D_GLOBE: branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D trunk/setup trunk/src/meshfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Tue Jul 2 17:25:28 PDT 2013


Author: dkomati1
Date: 2013-07-02 17:25:28 -0700 (Tue, 02 Jul 2013)
New Revision: 22499

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/setup/constants.h.in
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/calc_jacobian.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_chunk_buffers.f90
Log:
fixed a small bug related to the "DEBUG" flag that I had introduced when merging some simple changes from the GPU branch back into the trunk


Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90	2013-07-02 22:17:44 UTC (rev 22498)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/meshfem3D/calc_jacobian.f90	2013-07-03 00:25:28 UTC (rev 22499)
@@ -331,7 +331,7 @@
            call exit_MPI(myrank,'error derivative eta in recalc_jacobian_gll2D')
         endif
 
-        ! calculates j2D acobian
+        ! calculates 2D Jacobian
         unx = yxi*zeta - yeta*zxi
         uny = zxi*xeta - zeta*xxi
         unz = xxi*yeta - xeta*yxi

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/setup/constants.h.in
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/setup/constants.h.in	2013-07-02 22:17:44 UTC (rev 22498)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/setup/constants.h.in	2013-07-03 00:25:28 UTC (rev 22499)
@@ -490,16 +490,6 @@
   integer, parameter :: THREE_D_MODEL_S40RTS = 11
   integer, parameter :: THREE_D_MODEL_GAPP2  = 12
 
-! define flag for regions of the global Earth for attenuation
-  integer, parameter :: NUM_REGIONS_ATTENUATION = 5
-
-  integer, parameter :: IREGION_ATTENUATION_INNER_CORE = 1
-  integer, parameter :: IREGION_ATTENUATION_CMB_670 = 2
-  integer, parameter :: IREGION_ATTENUATION_670_220 = 3
-  integer, parameter :: IREGION_ATTENUATION_220_80 = 4
-  integer, parameter :: IREGION_ATTENUATION_80_SURFACE = 5
-  integer, parameter :: IREGION_ATTENUATION_UNDEFINED = 6
-
 ! number of standard linear solids for attenuation
   integer, parameter :: N_SLS = 3
 
@@ -509,10 +499,6 @@
   integer, parameter :: ATTENUATION_COMP_RESOLUTION = 1
   integer, parameter :: ATTENUATION_COMP_MAXIMUM    = 5000
 
-! for lookup table for attenuation every 100 m in radial direction of Earth model
-  integer, parameter          :: NRAD_ATTENUATION  = 70000
-  double precision, parameter :: TABLE_ATTENUATION = R_EARTH_KM * 10.0d0
-
 ! for determination of the attenuation period range
 ! if this is set to .true. then the hardcoded values will be used
 ! otherwise they are computed automatically from the Number of elements

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/calc_jacobian.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/calc_jacobian.f90	2013-07-02 22:17:44 UTC (rev 22498)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/calc_jacobian.f90	2013-07-03 00:25:28 UTC (rev 22499)
@@ -336,7 +336,7 @@
            call exit_MPI(myrank,'error derivative eta in recalc_jacobian_gll2D')
         endif
 
-        ! calculates j2D acobian
+        ! calculates 2D Jacobian
         unx = yxi*zeta - yeta*zxi
         uny = zxi*xeta - zeta*xxi
         unz = xxi*yeta - xeta*yxi
@@ -364,152 +364,3 @@
   enddo
 
   end subroutine recalc_jacobian_gll2D
-
-!
-!-------------------------------------------------------------------------------------------------
-!
-! deprecated...
-!
-!  subroutine calc_jacobian(myrank,xixstore,xiystore,xizstore, &
-!     etaxstore,etaystore,etazstore, &
-!     gammaxstore,gammaystore,gammazstore, &
-!     xstore,ystore,zstore, &
-!     xelm,yelm,zelm,shape3D,dershape3D,ispec,nspec,ACTUALLY_STORE_ARRAYS)
-!
-!  implicit none
-!
-!  include "constants.h"
-!
-!  integer ispec,nspec,myrank
-!
-!  logical ACTUALLY_STORE_ARRAYS
-!
-!  double precision shape3D(NGNOD,NGLLX,NGLLY,NGLLZ)
-!  double precision dershape3D(NDIM,NGNOD,NGLLX,NGLLY,NGLLZ)
-!
-!  double precision xelm(NGNOD)
-!  double precision yelm(NGNOD)
-!  double precision zelm(NGNOD)
-!
-!  real(kind=CUSTOM_REAL) xixstore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         xiystore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         xizstore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         etaxstore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         etaystore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         etazstore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         gammaxstore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         gammaystore(NGLLX,NGLLY,NGLLZ,nspec), &
-!                         gammazstore(NGLLX,NGLLY,NGLLZ,nspec)
-!
-!  double precision xstore(NGLLX,NGLLY,NGLLZ,nspec)
-!  double precision ystore(NGLLX,NGLLY,NGLLZ,nspec)
-!  double precision zstore(NGLLX,NGLLY,NGLLZ,nspec)
-!
-!  integer i,j,k,ia
-!
-!  double precision xxi,xeta,xgamma,yxi,yeta,ygamma,zxi,zeta,zgamma
-!  double precision xmesh,ymesh,zmesh
-!  double precision xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz
-!  double precision jacobian
-!
-!  do k=1,NGLLZ
-!    do j=1,NGLLY
-!      do i=1,NGLLX
-!
-!      xxi = ZERO
-!      xeta = ZERO
-!      xgamma = ZERO
-!      yxi = ZERO
-!      yeta = ZERO
-!      ygamma = ZERO
-!      zxi = ZERO
-!      zeta = ZERO
-!      zgamma = ZERO
-!      xmesh = ZERO
-!      ymesh = ZERO
-!      zmesh = ZERO
-!
-!      do ia=1,NGNOD
-!        xxi = xxi + dershape3D(1,ia,i,j,k)*xelm(ia)
-!        xeta = xeta + dershape3D(2,ia,i,j,k)*xelm(ia)
-!        xgamma = xgamma + dershape3D(3,ia,i,j,k)*xelm(ia)
-!        yxi = yxi + dershape3D(1,ia,i,j,k)*yelm(ia)
-!        yeta = yeta + dershape3D(2,ia,i,j,k)*yelm(ia)
-!        ygamma = ygamma + dershape3D(3,ia,i,j,k)*yelm(ia)
-!        zxi = zxi + dershape3D(1,ia,i,j,k)*zelm(ia)
-!        zeta = zeta + dershape3D(2,ia,i,j,k)*zelm(ia)
-!        zgamma = zgamma + dershape3D(3,ia,i,j,k)*zelm(ia)
-!        xmesh = xmesh + shape3D(ia,i,j,k)*xelm(ia)
-!        ymesh = ymesh + shape3D(ia,i,j,k)*yelm(ia)
-!        zmesh = zmesh + shape3D(ia,i,j,k)*zelm(ia)
-!      enddo
-!
-!      jacobian = xxi*(yeta*zgamma-ygamma*zeta) - &
-!             xeta*(yxi*zgamma-ygamma*zxi) + &
-!             xgamma*(yxi*zeta-yeta*zxi)
-!
-!      if(jacobian <= ZERO) then
-!        print*,'jacobian error:',myrank
-!        print*,'  point ijk:',i,j,k,ispec
-!        print*,'  xyz:',xmesh,ymesh,zmesh
-!        call xyz_2_rthetaphi_dble(xmesh,ymesh,zmesh,xxi,xeta,xgamma)
-!        print*,'  r/lat/lon:',xxi*R_EARTH_KM,90.0-xeta*180./PI,xgamma*180./PI
-!        print*,'  nodes:'
-!        do ia=1,NGNOD
-!          print*,xelm(ia),yelm(ia),zelm(ia)
-!        enddo
-!        print*
-!        print*,'maybe check with CAP smoothing'
-!        call exit_MPI(myrank,'3D Jacobian undefined')
-!      endif
-!
-!! invert the relation (Fletcher p. 50 vol. 2)
-!      xix = (yeta*zgamma-ygamma*zeta) / jacobian
-!      xiy = (xgamma*zeta-xeta*zgamma) / jacobian
-!      xiz = (xeta*ygamma-xgamma*yeta) / jacobian
-!      etax = (ygamma*zxi-yxi*zgamma) / jacobian
-!      etay = (xxi*zgamma-xgamma*zxi) / jacobian
-!      etaz = (xgamma*yxi-xxi*ygamma) / jacobian
-!      gammax = (yxi*zeta-yeta*zxi) / jacobian
-!      gammay = (xeta*zxi-xxi*zeta) / jacobian
-!      gammaz = (xxi*yeta-xeta*yxi) / jacobian
-!
-!! save the derivatives and the jacobian
-!! distinguish between single and double precision for reals
-!      if(ACTUALLY_STORE_ARRAYS) then
-!        if(CUSTOM_REAL == SIZE_REAL) then
-!          xixstore(i,j,k,ispec) = sngl(xix)
-!          xiystore(i,j,k,ispec) = sngl(xiy)
-!          xizstore(i,j,k,ispec) = sngl(xiz)
-!          etaxstore(i,j,k,ispec) = sngl(etax)
-!          etaystore(i,j,k,ispec) = sngl(etay)
-!          etazstore(i,j,k,ispec) = sngl(etaz)
-!          gammaxstore(i,j,k,ispec) = sngl(gammax)
-!          gammaystore(i,j,k,ispec) = sngl(gammay)
-!          gammazstore(i,j,k,ispec) = sngl(gammaz)
-!        else
-!          xixstore(i,j,k,ispec) = xix
-!          xiystore(i,j,k,ispec) = xiy
-!          xizstore(i,j,k,ispec) = xiz
-!          etaxstore(i,j,k,ispec) = etax
-!          etaystore(i,j,k,ispec) = etay
-!          etazstore(i,j,k,ispec) = etaz
-!          gammaxstore(i,j,k,ispec) = gammax
-!          gammaystore(i,j,k,ispec) = gammay
-!          gammazstore(i,j,k,ispec) = gammaz
-!        endif
-!      endif
-!
-!! store mesh coordinates
-!!      xstore(i,j,k,ispec) = xmesh
-!!      ystore(i,j,k,ispec) = ymesh
-!!      zstore(i,j,k,ispec) = zmesh
-!
-!      enddo
-!    enddo
-!  enddo
-!
-!  end subroutine calc_jacobian
-!
-
-

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_chunk_buffers.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_chunk_buffers.f90	2013-07-02 22:17:44 UTC (rev 22498)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/meshfem3D/create_chunk_buffers.f90	2013-07-03 00:25:28 UTC (rev 22499)
@@ -737,22 +737,15 @@
             if(nglob /= npoin2D) call exit_MPI(myrank,'duplicates detected in buffer')
 
             ! write list of selected points to output buffer
+            write(IOUT_BUFFERS,*) npoin2D
 
-            ! debug file output
-            if( DEBUG ) then
-              write(IOUT_BUFFERS,*) npoin2D
-            endif
-
             ! stores face infos
             do ipoin2D = 1,npoin2D
                 write(IOUT_BUFFERS,*) ibool_selected(ipoin2D), &
                   xstore_selected(ipoin2D),ystore_selected(ipoin2D),zstore_selected(ipoin2D)
             enddo
 
-            ! debug file output
-            if( DEBUG ) then
-              close(IOUT_BUFFERS)
-            endif
+            close(IOUT_BUFFERS)
 
             ! store result to compare number of points for sender and for receiver
             if(imode_comm == 1) then
@@ -772,10 +765,7 @@
     enddo
   enddo
 
-  ! debug file output
-  if( DEBUG ) then
-    if(myrank == 0) close(IOUT)
-  endif
+  if(myrank == 0) close(IOUT)
 
   ! check that total number of messages is correct
   if(imsg /= NUMMSGS_FACES) call exit_MPI(myrank,'incorrect total number of messages')
@@ -905,12 +895,9 @@
 
   endif
 
-  ! debug file output
-  if( DEBUG ) then
     ! file to store the list of processors for each message for corners
     if(myrank == 0) &
       open(unit=IOUT,file=trim(OUTPUT_FILES)//'/list_messages_corners.txt',status='unknown')
-  endif
 
   ! loop over all the messages to create the addressing
   do imsg = 1,NCORNERSCHUNKS
@@ -985,10 +972,7 @@
 
   enddo
 
-  ! debug file output
-  if( DEBUG ) then
-    if(myrank == 0) close(IOUT)
-  endif
+  if(myrank == 0) close(IOUT)
 
   ! deallocate arrays
   deallocate(iproc_sender)



More information about the CIG-COMMITS mailing list