[cig-commits] r17201 - seismo/3D/SPECFEM3D/trunk

yangl at geodynamics.org yangl at geodynamics.org
Mon Sep 20 07:47:08 PDT 2010


Author: yangl
Date: 2010-09-20 07:47:07 -0700 (Mon, 20 Sep 2010)
New Revision: 17201

Modified:
   seismo/3D/SPECFEM3D/trunk/save_adjoint_kernels.f90
Log:
output integration weights for benchmark kernel calculations

Modified: seismo/3D/SPECFEM3D/trunk/save_adjoint_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/save_adjoint_kernels.f90	2010-09-16 23:25:53 UTC (rev 17200)
+++ seismo/3D/SPECFEM3D/trunk/save_adjoint_kernels.f90	2010-09-20 14:47:07 UTC (rev 17201)
@@ -34,7 +34,8 @@
   implicit none
   integer:: ispec,i,j,k,iglob
   real(kind=CUSTOM_REAL) :: rhol,mul,kappal
-  
+  real(kind=CUSTOM_REAL), dimension(:,:,:,:), allocatable :: weights_kernel
+
   ! finalizes calculation of rhop, beta, alpha kernels
   do ispec = 1, NSPEC_AB
   
@@ -144,4 +145,23 @@
 
   endif
 
+!<YANGL
+  ! save weights for volume integration, in order to benchmark the kernels with analytical expressions
+  allocate(weights_kernel(NGLLX,NGLLY,NGLLZ,NSPEC_AB))
+  do ispec = 1, NSPEC_AB
+  
+      do k = 1, NGLLZ
+        do j = 1, NGLLY
+          do i = 1, NGLLX
+            weights_kernel(i,j,k,ispec) = wxgll(i) * wygll(j) * wzgll(k) * jacobian(i,j,k,ispec)
+          enddo ! i
+        enddo ! j
+      enddo ! k
+
+  enddo ! ispec
+  open(unit=27,file=prname(1:len_trim(prname))//'weights_kernel.bin',status='unknown',form='unformatted')
+  write(27) weights_kernel
+  close(27)
+!>YANGL
+
   end subroutine save_adjoint_kernels



More information about the CIG-COMMITS mailing list