[cig-commits] r22483 - in seismo/3D/SPECFEM3D_GLOBE: branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D trunk/src/specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Mon Jul 1 17:47:50 PDT 2013


Author: dkomati1
Date: 2013-07-01 17:47:49 -0700 (Mon, 01 Jul 2013)
New Revision: 22483

Modified:
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_scalar.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_vector.f90
   seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_kernels.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/assemble_MPI_scalar.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/check_simulation_stability.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_kernels.f90
Log:
made a few easy merges in src/specfem3D


Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_scalar.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_scalar.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_scalar.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -30,7 +30,7 @@
 !----
 
 
-  subroutine assemble_MPI_scalar(NPROC,NGLOB_AB,array_val, &
+  subroutine assemble_MPI_scalar(NPROC,nglob,array_val, &
                         num_interfaces,max_nibool_interfaces, &
                         nibool_interfaces,ibool_interfaces, &
                         my_neighbours)
@@ -42,10 +42,10 @@
   include "constants.h"
 
   integer :: NPROC
-  integer :: NGLOB_AB
+  integer :: nglob
 
   ! array to assemble
-  real(kind=CUSTOM_REAL), dimension(NGLOB_AB) :: array_val
+  real(kind=CUSTOM_REAL), dimension(nglob), intent(inout) :: array_val
 
   integer :: num_interfaces,max_nibool_interfaces
   integer, dimension(num_interfaces) :: nibool_interfaces,my_neighbours
@@ -57,7 +57,6 @@
   integer, dimension(:), allocatable :: request_send_scalar
   integer, dimension(:), allocatable :: request_recv_scalar
 
-
   integer ipoin,iinterface,ier
 
 ! here we have to assemble all the contributions between partitions using MPI
@@ -124,9 +123,7 @@
 !-------------------------------------------------------------------------------------------------
 !
 
-
-
-  subroutine assemble_MPI_scalar_s(NPROC,NGLOB_AB,array_val, &
+  subroutine assemble_MPI_scalar_s(NPROC,nglob,array_val, &
                         buffer_send_scalar,buffer_recv_scalar, &
                         num_interfaces,max_nibool_interfaces, &
                         nibool_interfaces,ibool_interfaces, &
@@ -140,11 +137,11 @@
   include "constants.h"
 
   integer :: NPROC
-  integer :: NGLOB_AB
+  integer :: nglob
   integer :: num_interfaces,max_nibool_interfaces
 
 ! array to send
-  real(kind=CUSTOM_REAL), dimension(NGLOB_AB) :: array_val
+  real(kind=CUSTOM_REAL), dimension(nglob) :: array_val
 
 
   real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces,num_interfaces) :: &
@@ -188,7 +185,7 @@
 !-------------------------------------------------------------------------------------------------
 !
 
-  subroutine assemble_MPI_scalar_w(NPROC,NGLOB_AB,array_val, &
+  subroutine assemble_MPI_scalar_w(NPROC,nglob,array_val, &
                         buffer_recv_scalar,num_interfaces, &
                         max_nibool_interfaces, &
                         nibool_interfaces,ibool_interfaces, &
@@ -201,10 +198,10 @@
   include "constants.h"
 
   integer :: NPROC
-  integer :: NGLOB_AB
+  integer :: nglob
   integer :: num_interfaces,max_nibool_interfaces
 ! array to assemble
-  real(kind=CUSTOM_REAL), dimension(NGLOB_AB) :: array_val
+  real(kind=CUSTOM_REAL), dimension(nglob) :: array_val
 
 
   real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces,num_interfaces) :: &

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_vector.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_vector.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/assemble_MPI_vector.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -31,7 +31,7 @@
 
 ! non-blocking routines
 
-  subroutine assemble_MPI_vector_s(NPROC,NGLOB_AB, &
+  subroutine assemble_MPI_vector_s(NPROC,nglob, &
                                            array_val, &
                                            buffer_send_vector,buffer_recv_vector, &
                                            num_interfaces,max_nibool_interfaces, &
@@ -46,10 +46,10 @@
   include "constants.h"
 
   integer :: NPROC
-  integer :: NGLOB_AB
+  integer :: nglob
 
   ! array to assemble
-  real(kind=CUSTOM_REAL), dimension(NDIM,NGLOB_AB) :: array_val
+  real(kind=CUSTOM_REAL), dimension(NDIM,nglob) :: array_val
 
   integer :: num_interfaces,max_nibool_interfaces
 
@@ -170,7 +170,7 @@
 !-------------------------------------------------------------------------------------------------
 !
 
-  subroutine assemble_MPI_vector_w(NPROC,NGLOB_AB, &
+  subroutine assemble_MPI_vector_w(NPROC,nglob, &
                                            array_val, &
                                            buffer_recv_vector, &
                                            num_interfaces,max_nibool_interfaces, &
@@ -184,10 +184,10 @@
   include "constants.h"
 
   integer :: NPROC
-  integer :: NGLOB_AB
+  integer :: nglob
 
   ! array to assemble
-  real(kind=CUSTOM_REAL), dimension(NDIM,NGLOB_AB) :: array_val
+  real(kind=CUSTOM_REAL), dimension(NDIM,nglob) :: array_val
 
   integer :: num_interfaces,max_nibool_interfaces
 

Modified: seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_kernels.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/SPECFEM3D_GLOBE_SUNFLOWER/src/specfem3D/save_kernels.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -25,7 +25,6 @@
 !
 !=====================================================================
 
-
   subroutine save_kernels_crust_mantle()
 
   use specfem_par
@@ -439,6 +438,7 @@
 
   use specfem_par
   use specfem_par_outercore
+
   implicit none
 
   ! local parameters
@@ -499,6 +499,7 @@
 
   use specfem_par
   use specfem_par_innercore
+
   implicit none
 
   ! local parameters
@@ -552,6 +553,7 @@
   use specfem_par
   use specfem_par_crustmantle
   use specfem_par_innercore
+
   implicit none
 
   ! local parameters
@@ -604,6 +606,7 @@
   subroutine save_kernels_source_derivatives()
 
   use specfem_par
+
   implicit none
 
   ! local parameters
@@ -664,6 +667,7 @@
 
   use specfem_par
   use specfem_par_crustmantle
+
   implicit none
 
   ! local parameters
@@ -725,7 +729,6 @@
   double precision :: sintwophisq,sintwothetasq
   double precision :: costhreetheta,sinthreetheta,costhreephi,sinthreephi
 
-
    if (CUSTOM_REAL == SIZE_REAL) then
       theta = dble(theta_in)
       phi = dble(phi_in)

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/assemble_MPI_scalar.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/assemble_MPI_scalar.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/assemble_MPI_scalar.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -43,6 +43,8 @@
             NGLOB2DMAX_XMIN_XMAX,NGLOB2DMAX_YMIN_YMAX, &
             NGLOB2DMAX_XY,NCHUNKS,iphase)
 
+! blocking send/receive
+
   implicit none
 
 ! standard include of the MPI library
@@ -51,9 +53,10 @@
   include "constants.h"
   include "precision.h"
 
-  integer myrank,nglob,NCHUNKS,iphase
+  integer myrank,NCHUNKS,iphase
+  integer :: nglob
 
-! array to assemble
+  ! array to assemble
   real(kind=CUSTOM_REAL), dimension(nglob), intent(inout) :: array_val
 
   integer, intent(in) :: iproc_xi,iproc_eta,ichunk

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/check_simulation_stability.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/check_simulation_stability.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/check_simulation_stability.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -37,7 +37,7 @@
   include "OUTPUT_FILES/values_from_mesher.h"
 
   ! time step
-  integer it,it_begin,it_end,NUMBER_OF_THIS_RUN,NUMBER_OF_RUNS,NSTEP,myrank
+  integer it,NSTEP,myrank,it_begin,it_end,NUMBER_OF_THIS_RUN,NUMBER_OF_RUNS
 
   ! displacement
   real(kind=CUSTOM_REAL), dimension(NDIM,NGLOB_CRUST_MANTLE) :: displ_crust_mantle
@@ -109,7 +109,7 @@
       write(IMAIN,*) 'Max non-dimensional potential Ufluid in fluid in all slices for back prop.= ',Ufluidnorm_all
     endif
 
-!! DK DK UNDO_ATTENUATION
+!! DK DK for UNDO_ATTENUATION
 
     ! information about the current run only
     SHOW_SEPARATE_RUN_INFORMATION = NUMBER_OF_RUNS > 1 .and. NUMBER_OF_THIS_RUN < NUMBER_OF_RUNS
@@ -140,6 +140,7 @@
     iminutes_total = (int_t_total - 3600*ihours_total) / 60
     iseconds_total = int_t_total - 3600*ihours_total - 60*iminutes_total
 
+    ! this is in the case of restart files, when a given run consists of several partial runs
     ! calculate times for the *current* run
     if (SHOW_SEPARATE_RUN_INFORMATION) then
       ! compute estimated remaining simulation time

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_kernels.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_kernels.f90	2013-07-01 20:51:09 UTC (rev 22482)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/save_kernels.f90	2013-07-02 00:47:49 UTC (rev 22483)
@@ -25,7 +25,6 @@
 !
 !=====================================================================
 
-
   subroutine save_kernels_crust_mantle(myrank,scale_t,scale_displ, &
                   cijkl_kl_crust_mantle,rho_kl_crust_mantle, &
                   alpha_kl_crust_mantle,beta_kl_crust_mantle, &
@@ -104,22 +103,22 @@
   if( SAVE_TRANSVERSE_KL ) then
     ! transverse isotropic kernel arrays for file output
     allocate(alphav_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      alphah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      betav_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      betah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      eta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
+            alphah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
+            betav_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
+            betah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
+            eta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
 
     ! isotropic kernel arrays for file output
     allocate(bulk_c_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      bulk_betav_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      bulk_betah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      bulk_beta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
+            bulk_betav_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
+            bulk_betah_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
+            bulk_beta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
   endif
 
   if( .not. ANISOTROPIC_KL ) then
     ! allocates temporary isotropic kernel arrays for file output
     allocate(bulk_c_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT), &
-      bulk_beta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
+            bulk_beta_kl_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ADJOINT))
   endif
 
   ! crust_mantle
@@ -561,6 +560,7 @@
                           rho_kl_inner_core,beta_kl_inner_core,alpha_kl_inner_core, &
                           rhostore_inner_core,muvstore_inner_core,kappavstore_inner_core, &
                           LOCAL_PATH)
+
   implicit none
 
   include "constants.h"
@@ -584,7 +584,6 @@
   integer :: ispec,i,j,k
   character(len=150) prname
 
-
   scale_kl = scale_t/scale_displ * 1.d9
 
   ! inner_core
@@ -652,7 +651,6 @@
   real(kind=CUSTOM_REAL):: scale_kl
   character(len=150) prname
 
-
   scale_kl = scale_t/scale_displ * 1.d9
 
   ! scale the boundary kernels properly: *scale_kl gives s/km^3 and 1.d3 gives
@@ -802,3 +800,380 @@
   close(27)
 
   end subroutine save_kernels_hessian
+
+!
+!-------------------------------------------------------------------------------------------------
+!
+
+  subroutine rotate_kernels_dble(cij_kl,cij_kll,theta_in,phi_in)
+
+! Purpose : compute the kernels in r,theta,phi (cij_kll)
+! from the kernels in x,y,z (cij_kl) (x,y,z <-> r,theta,phi)
+! At r,theta,phi fixed
+! theta and phi are in radians
+
+! Coeff from Min's routine rotate_anisotropic_tensor
+! with the help of Collect[Expand[cij],{dij}] in Mathematica
+
+! Definition of the output array cij_kll :
+! cij_kll(1) = C11 ; cij_kll(2) = C12 ; cij_kll(3) = C13
+! cij_kll(4) = C14 ; cij_kll(5) = C15 ; cij_kll(6) = C16
+! cij_kll(7) = C22 ; cij_kll(8) = C23 ; cij_kll(9) = C24
+! cij_kll(10) = C25 ; cij_kll(11) = C26 ; cij_kll(12) = C33
+! cij_kll(13) = C34 ; cij_kll(14) = C35 ; cij_kll(15) = C36
+! cij_kll(16) = C44 ; cij_kll(17) = C45 ; cij_kll(18) = C46
+! cij_kll(19) = C55 ; cij_kll(20) = C56 ; cij_kll(21) = C66
+! where the Cij (Voigt's notation) are defined as function of
+! the components of the elastic tensor in spherical coordinates
+! by eq. (A.1) of Chen & Tromp, GJI 168 (2007)
+
+  implicit none
+  include  "constants.h"
+
+  real(kind=CUSTOM_REAL) :: theta_in,phi_in
+  real(kind=CUSTOM_REAL),dimension(21) :: cij_kll,cij_kl
+
+  double precision :: theta,phi
+  double precision :: costheta,sintheta,cosphi,sinphi
+  double precision :: costhetasq,sinthetasq,cosphisq,sinphisq
+  double precision :: costwotheta,sintwotheta,costwophi,sintwophi
+  double precision :: cosfourtheta,sinfourtheta,cosfourphi,sinfourphi
+  double precision :: costhetafour,sinthetafour,cosphifour,sinphifour
+  double precision :: sintwophisq,sintwothetasq
+  double precision :: costhreetheta,sinthreetheta,costhreephi,sinthreephi
+
+   if (CUSTOM_REAL == SIZE_REAL) then
+      theta = dble(theta_in)
+      phi = dble(phi_in)
+    else
+      theta = theta_in
+      phi = phi_in
+    endif
+
+  costheta = dcos(theta)
+  sintheta = dsin(theta)
+  cosphi = dcos(phi)
+  sinphi = dsin(phi)
+
+  costhetasq = costheta * costheta
+  sinthetasq = sintheta * sintheta
+  cosphisq = cosphi * cosphi
+  sinphisq = sinphi * sinphi
+
+  costhetafour = costhetasq * costhetasq
+  sinthetafour = sinthetasq * sinthetasq
+  cosphifour = cosphisq * cosphisq
+  sinphifour = sinphisq * sinphisq
+
+  costwotheta = dcos(2.d0*theta)
+  sintwotheta = dsin(2.d0*theta)
+  costwophi = dcos(2.d0*phi)
+  sintwophi = dsin(2.d0*phi)
+
+  costhreetheta=dcos(3.d0*theta)
+  sinthreetheta=dsin(3.d0*theta)
+  costhreephi=dcos(3.d0*phi)
+  sinthreephi=dsin(3.d0*phi)
+
+  cosfourtheta = dcos(4.d0*theta)
+  sinfourtheta = dsin(4.d0*theta)
+  cosfourphi = dcos(4.d0*phi)
+  sinfourphi = dsin(4.d0*phi)
+  sintwothetasq = sintwotheta * sintwotheta
+  sintwophisq = sintwophi * sintwophi
+
+
+  cij_kll(1) = 1.d0/16.d0* (cij_kl(16) - cij_kl(16)* costwophi + &
+     16.d0* cosphi*cosphisq* costhetafour* (cij_kl(1)* cosphi + cij_kl(6)* sinphi) + &
+     2.d0* (cij_kl(15) + cij_kl(17))* sintwophi* sintwothetasq - &
+     2.d0* (cij_kl(16)* cosfourtheta* sinphisq + &
+     2.d0* costhetafour* (-4* cij_kl(7)* sinphifour - &
+     (cij_kl(2) + cij_kl(21))* sintwophisq) + &
+     8.d0* cij_kl(5)* cosphi*cosphisq* costheta*costhetasq* sintheta - &
+     8.d0* cij_kl(8)* costhetasq* sinphisq* sinthetasq - &
+     8.d0* cij_kl(12)* sinthetafour + &
+     8.d0* cosphisq* costhetasq* sintheta* ((cij_kl(4) + &
+     cij_kl(20))* costheta* sinphi - &
+     (cij_kl(3) + cij_kl(19))*sintheta) + &
+     8.d0* cosphi* costheta* (-cij_kl(11)* costheta*costhetasq* &
+     sinphi*sinphisq + (cij_kl(10) + cij_kl(18))* costhetasq* sinphisq* sintheta + &
+     cij_kl(14)* sintheta*sinthetasq) + 2.d0* sinphi* (cij_kl(13) + &
+     cij_kl(9)* sinphisq)* sintwotheta + &
+     sinphi* (-cij_kl(13) + cij_kl(9)* sinphisq)* sinfourtheta))
+
+  cij_kll(2) = 1.d0/4.d0* (costhetasq* (cij_kl(1) + 3.d0* cij_kl(2) + cij_kl(7) - &
+      cij_kl(21) + (-cij_kl(1) + cij_kl(2) - cij_kl(7) + &
+      cij_kl(21))* cosfourphi + (-cij_kl(6) + cij_kl(11))* sinfourphi) + &
+      4.d0* (cij_kl(8)* cosphisq - cij_kl(15)* cosphi* sinphi + &
+      cij_kl(3)* sinphisq)* sinthetasq - &
+      2.d0* (cij_kl(10)* cosphisq*cosphi + &
+      (cij_kl(9) - cij_kl(20))* cosphisq* sinphi + &
+      (cij_kl(5) - cij_kl(18))* cosphi* sinphisq + &
+      cij_kl(4)* sinphisq*sinphi)* sintwotheta)
+
+  cij_kll(3) = 1.d0/8.d0* (sintwophi* (3.d0* cij_kl(15) - cij_kl(17) + &
+     4.d0* (cij_kl(2) + cij_kl(21))* costhetasq* sintwophi* sinthetasq) + &
+     4.d0* cij_kl(12)* sintwothetasq + 4.d0* cij_kl(1)* cosphifour* sintwothetasq + &
+     2.d0* cosphi*cosphisq* (8.d0* cij_kl(6)* costhetasq* sinphi* sinthetasq + &
+     cij_kl(5)* sinfourtheta) + 2.d0* cosphisq* (3.d0* cij_kl(3) -  cij_kl(19) + &
+     (cij_kl(3) + cij_kl(19))* cosfourtheta + &
+     (cij_kl(4) + cij_kl(20))* sinphi* sinfourtheta) + &
+     2.d0* sinphi* (sinphi* (3.d0* cij_kl(8) - &
+     cij_kl(16) + (cij_kl(8) + cij_kl(16))* cosfourtheta + &
+     2.d0* cij_kl(7)* sinphisq* sintwothetasq)+ &
+     (-cij_kl(13) + cij_kl(9)* sinphisq)* sinfourtheta)+ &
+     2.d0* cosphi* ((cij_kl(15) + cij_kl(17))* cosfourtheta* sinphi + &
+     8.d0* cij_kl(11)* costhetasq* sinphi*sinphisq* sinthetasq + &
+     (-cij_kl(14) + (cij_kl(10) + cij_kl(18))* sinphisq)*sinfourtheta))
+
+  cij_kll(4) = 1.d0/8.d0* (cosphi* costheta *(5.d0* cij_kl(4) - &
+     cij_kl(9) + 4.d0* cij_kl(13) - &
+     3.d0* cij_kl(20) + (cij_kl(4) + 3.d0* cij_kl(9) - &
+     4.d0* cij_kl(13) + cij_kl(20))* costwotheta) + &
+     1.d0/2.d0* (cij_kl(4) - cij_kl(9) + &
+     cij_kl(20))* costhreephi * (costheta + 3.d0* costhreetheta) - &
+     costheta* (-cij_kl(5) + 5.d0* cij_kl(10) + &
+     4.d0* cij_kl(14) - 3.d0* cij_kl(18) + &
+     (3.d0* cij_kl(5) + cij_kl(10) - &
+     4.d0* cij_kl(14) + cij_kl(18))* costwotheta)* sinphi - &
+     1.d0/2.d0* (cij_kl(5) - cij_kl(10) - cij_kl(18))* (costheta + &
+     3.d0* costhreetheta)* sinthreephi + &
+     4.d0* (cij_kl(6) - cij_kl(11))* cosfourphi* costhetasq* sintheta - &
+     4.d0* (cij_kl(1) + cij_kl(3) - cij_kl(7) - cij_kl(8) + cij_kl(16) - cij_kl(19) + &
+     (cij_kl(1) - cij_kl(3) - cij_kl(7) + cij_kl(8) + &
+     cij_kl(16) - cij_kl(19))* costwotheta)* sintwophi* sintheta - &
+     4.d0* (cij_kl(1) - cij_kl(2) + cij_kl(7) - &
+     cij_kl(21))* costhetasq* sinfourphi* sintheta + &
+     costwophi* ((cij_kl(6) + cij_kl(11) + 6.d0* cij_kl(15) - &
+     2.d0* cij_kl(17))* sintheta + &
+     (cij_kl(6) + cij_kl(11) - 2.d0* (cij_kl(15) + cij_kl(17)))* sinthreetheta))
+
+  cij_kll(5) = 1.d0/4.d0* (2.d0* (cij_kl(4) + &
+     cij_kl(20))* cosphisq* (costwotheta + cosfourtheta)* sinphi + &
+     2.d0* cij_kl(9)* (costwotheta + cosfourtheta)* sinphi*sinphisq + &
+     16.d0* cij_kl(1)* cosphifour* costheta*costhetasq* sintheta + &
+     4.d0* costheta*costhetasq* (-2.d0* cij_kl(8)* sinphisq + &
+     4.d0* cij_kl(7)* sinphifour + &
+     (cij_kl(2) + cij_kl(21))* sintwophisq)* sintheta + &
+     4.d0* cij_kl(13)* (1.d0 + 2.d0* costwotheta)* sinphi* sinthetasq + &
+     8.d0* costheta* (-2.d0* cij_kl(12) + cij_kl(8)* sinphisq)* sintheta*sinthetasq + &
+     2.d0* cosphi*cosphisq* (cij_kl(5)* (costwotheta + cosfourtheta) + &
+     8.d0* cij_kl(6)* costheta*costhetasq* sinphi* sintheta) + &
+     2.d0* cosphi* (cosfourtheta* (-cij_kl(14) + (cij_kl(10) + cij_kl(18))* sinphisq) + &
+     costwotheta* (cij_kl(14) + (cij_kl(10) + cij_kl(18))* sinphisq) + &
+     8.d0* cij_kl(11)* costheta*costhetasq* sinphi*sinphisq* sintheta) - &
+     (cij_kl(3) + cij_kl(16) + cij_kl(19) + &
+     (cij_kl(3) - cij_kl(16) + cij_kl(19))* costwophi + &
+     (cij_kl(15) + cij_kl(17))* sintwophi)* sinfourtheta)
+
+  cij_kll(6) = 1.d0/2.d0* costheta*costhetasq* ((cij_kl(6) + cij_kl(11))* costwophi + &
+      (cij_kl(6) - cij_kl(11))* cosfourphi + 2.d0* (-cij_kl(1) + cij_kl(7))* sintwophi + &
+      (-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(21))* sinfourphi) + &
+      1.d0/4.d0* costhetasq* (-(cij_kl(4) + 3* cij_kl(9) + cij_kl(20))* cosphi - &
+      3.d0* (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi + &
+      (3.d0* cij_kl(5) + cij_kl(10) + cij_kl(18))* sinphi + &
+      3.d0* (cij_kl(5) - cij_kl(10) - cij_kl(18))* sinthreephi)* sintheta + &
+      costheta* ((cij_kl(15) + cij_kl(17))* costwophi + &
+      (-cij_kl(3) + cij_kl(8) + cij_kl(16) - cij_kl(19))* sintwophi)* sinthetasq + &
+      (-cij_kl(13)* cosphi + cij_kl(14)* sinphi)* sintheta*sinthetasq
+
+  cij_kll(7) = cij_kl(7)* cosphifour - cij_kl(11)* cosphi*cosphisq* sinphi + &
+      (cij_kl(2) + cij_kl(21))* cosphisq* sinphisq - &
+      cij_kl(6)* cosphi* sinphi*sinphisq + &
+      cij_kl(1)* sinphifour
+
+  cij_kll(8) = 1.d0/2.d0* (2.d0* costhetasq* sinphi* (-cij_kl(15)* cosphi + &
+      cij_kl(3)* sinphi) + 2.d0* cij_kl(2)* cosphifour* sinthetasq + &
+      (2.d0* cij_kl(2)* sinphifour + &
+      (cij_kl(1) + cij_kl(7) - cij_kl(21))* sintwophisq)* sinthetasq + &
+      cij_kl(4)* sinphi*sinphisq* sintwotheta + &
+      cosphi*cosphisq* (2.d0* (-cij_kl(6) + cij_kl(11))* sinphi* sinthetasq + &
+      cij_kl(10)* sintwotheta) + cosphi* sinphisq* (2.d0* (cij_kl(6) - &
+      cij_kl(11))* sinphi* sinthetasq + &
+      (cij_kl(5) - cij_kl(18))* sintwotheta) + &
+      cosphisq* (2.d0* cij_kl(8)* costhetasq + &
+      (cij_kl(9) - cij_kl(20))* sinphi* sintwotheta))
+
+  cij_kll(9) = cij_kl(11)* cosphifour* sintheta - sinphi*sinphisq* (cij_kl(5)* costheta + &
+      cij_kl(6)* sinphi* sintheta) +  cosphisq* sinphi* (-(cij_kl(10) + &
+      cij_kl(18))* costheta + &
+      3.d0* (cij_kl(6) - cij_kl(11))* sinphi* sintheta) + &
+      cosphi* sinphisq* ((cij_kl(4) + cij_kl(20))* costheta + &
+      2.d0* (-2.d0* cij_kl(1) + cij_kl(2) + cij_kl(21))* sinphi* sintheta) + &
+      cosphi*cosphisq* (cij_kl(9)* costheta - 2.d0* (cij_kl(2) - 2.d0* cij_kl(7) + &
+      cij_kl(21))* sinphi* sintheta)
+
+  cij_kll(10) = 1.d0/4.d0* (4.d0* costwotheta* (cij_kl(10)* cosphi*cosphisq + &
+      (cij_kl(9) - cij_kl(20))* cosphisq* sinphi + &
+      (cij_kl(5) - cij_kl(18))* cosphi* sinphisq + &
+      cij_kl(4)* sinphi*sinphisq) + (cij_kl(1) + 3.d0* cij_kl(2) - &
+      2.d0* cij_kl(3) + cij_kl(7) - &
+      2.d0* cij_kl(8) - cij_kl(21) + 2.d0* (cij_kl(3) - cij_kl(8))* costwophi + &
+      (-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(21))* cosfourphi + &
+      2.d0* cij_kl(15)* sintwophi + &
+      (-cij_kl(6) + cij_kl(11))* sinfourphi)* sintwotheta)
+
+  cij_kll(11) = 1.d0/4.d0* (2.d0* costheta* ((cij_kl(6) + cij_kl(11))* costwophi + &
+      (-cij_kl(6) + cij_kl(11))* cosfourphi + &
+      2.d0* (-cij_kl(1) + cij_kl(7))* sintwophi + &
+      (cij_kl(1) - cij_kl(2) + cij_kl(7) - cij_kl(21))* sinfourphi) + &
+      (-(cij_kl(4) + 3.d0* cij_kl(9) + cij_kl(20))* cosphi + &
+      (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi + &
+      (3.d0* cij_kl(5) + cij_kl(10) + cij_kl(18))* sinphi + &
+      (-cij_kl(5) + cij_kl(10) + cij_kl(18))* sinthreephi)* sintheta)
+
+  cij_kll(12) = 1.d0/16.d0* (cij_kl(16) - 2.d0* cij_kl(16)* cosfourtheta* sinphisq + &
+      costwophi* (-cij_kl(16) + 8.d0* costheta* sinthetasq* ((cij_kl(3) - &
+      cij_kl(8) + cij_kl(19))* costheta + &
+      (cij_kl(5) - cij_kl(10) - cij_kl(18))* cosphi* sintheta)) + &
+      2.d0* (cij_kl(15) + cij_kl(17))* sintwophi* sintwothetasq + &
+      2.d0* (8.d0* cij_kl(12)* costhetafour + &
+      8.d0* cij_kl(14)* cosphi* costheta*costhetasq* sintheta + &
+      4.d0* cosphi* costheta* (cij_kl(5) + cij_kl(10) + cij_kl(18) + &
+      (cij_kl(4) + cij_kl(20))* sintwophi)* &
+      sintheta*sinthetasq + 8.d0* cij_kl(1)* cosphifour* sinthetafour + &
+      8.d0* cij_kl(6)* cosphi*cosphisq* sinphi* sinthetafour + &
+      8.d0* cij_kl(11)* cosphi* sinphi*sinphisq* sinthetafour + &
+      8.d0* cij_kl(7)* sinphifour* sinthetafour + &
+      2.d0* cij_kl(2)* sintwophisq* sinthetafour + &
+      2.d0* cij_kl(21)* sintwophisq* sinthetafour + &
+      2.d0* cij_kl(13)* sinphi* sintwotheta + &
+      2.d0* cij_kl(9)* sinphi*sinphisq* sintwotheta + &
+      cij_kl(3)* sintwothetasq + cij_kl(8)* sintwothetasq + &
+      cij_kl(19)* sintwothetasq + cij_kl(13)* sinphi* sinfourtheta - &
+      cij_kl(9)* sinphi*sinphisq* sinfourtheta))
+
+  cij_kll(13) = 1.d0/8.d0* (cosphi* costheta* (cij_kl(4) + 3.d0* cij_kl(9) + &
+      4.d0* cij_kl(13) + cij_kl(20) - (cij_kl(4) + 3.d0* cij_kl(9) - &
+      4.d0* cij_kl(13) + cij_kl(20))* costwotheta) + 4.d0* (-cij_kl(1) - &
+      cij_kl(3) + cij_kl(7) + cij_kl(8) + cij_kl(16) - cij_kl(19) + &
+      (cij_kl(1) - cij_kl(3) - cij_kl(7) + cij_kl(8) + cij_kl(16) - &
+      cij_kl(19))* costwotheta)* sintwophi* sintheta + &
+      4.d0* (cij_kl(6) - cij_kl(11))* cosfourphi* sinthetasq*sintheta - &
+      4.d0* (cij_kl(1) - cij_kl(2) + cij_kl(7) - &
+      cij_kl(21))* sinfourphi* sinthetasq*sintheta + &
+      costheta* ((-3.d0* cij_kl(5) - cij_kl(10) - 4.d0* cij_kl(14) - &
+      cij_kl(18) + (3.d0* cij_kl(5) + cij_kl(10) - 4.d0* cij_kl(14) + &
+      cij_kl(18))* costwotheta)* sinphi + 6.d0* ((cij_kl(4) - cij_kl(9) + &
+      cij_kl(20))* costhreephi + (-cij_kl(5) + cij_kl(10) + &
+      cij_kl(18))* sinthreephi)* sinthetasq) + costwophi* ((3* cij_kl(6) + &
+      3.d0* cij_kl(11) + 2.d0* (cij_kl(15) + cij_kl(17)))* sintheta - &
+      (cij_kl(6) + cij_kl(11) - 2.d0* (cij_kl(15) + &
+      cij_kl(17)))* sinthreetheta))
+
+  cij_kll(14) = 1.d0/4.d0* (2.d0* cij_kl(13)* (costwotheta + cosfourtheta)* sinphi + &
+      8.d0* costheta*costhetasq* (-2.d0* cij_kl(12) + cij_kl(8)* sinphisq)* sintheta + &
+      4.d0* (cij_kl(4) + cij_kl(20))* cosphisq* (1.d0 + &
+      2.d0* costwotheta)* sinphi* sinthetasq + &
+      4.d0* cij_kl(9)* (1.d0 + 2.d0* costwotheta)* sinphi*sinphisq* sinthetasq + &
+      16.d0* cij_kl(1)* cosphifour* costheta* sintheta*sinthetasq + &
+      4.d0* costheta* (-2.d0* cij_kl(8)* sinphisq + 4.d0* cij_kl(7)* sinphifour + &
+      (cij_kl(2) + cij_kl(21))* sintwophisq)* sintheta*sinthetasq + &
+      4.d0* cosphi*cosphisq* sinthetasq* (cij_kl(5) + 2.d0* cij_kl(5)* costwotheta + &
+      4.d0* cij_kl(6)* costheta* sinphi* sintheta) + &
+      2.d0* cosphi* (cosfourtheta* (cij_kl(14) - (cij_kl(10) + cij_kl(18))* sinphisq) + &
+      costwotheta* (cij_kl(14) + (cij_kl(10) + cij_kl(18))* sinphisq) + &
+      8.d0* cij_kl(11)* costheta* sinphi*sinphisq* sintheta*sinthetasq) + &
+      (cij_kl(3) + cij_kl(16) + cij_kl(19) + (cij_kl(3) - cij_kl(16) + &
+      cij_kl(19))* costwophi + (cij_kl(15) + cij_kl(17))* sintwophi)* sinfourtheta)
+
+  cij_kll(15) = costwophi* costheta* (-cij_kl(17) + (cij_kl(15) + cij_kl(17))* costhetasq) + &
+       1.d0/16.d0* (-((11.d0* cij_kl(4) + cij_kl(9) + 4.d0* cij_kl(13) - &
+       5.d0* cij_kl(20))* cosphi + (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi - &
+       (cij_kl(5) + 11.d0* cij_kl(10) + 4.d0* cij_kl(14) - &
+       5.d0* cij_kl(18))* sinphi + (-cij_kl(5) + cij_kl(10) + &
+       cij_kl(18))* sinthreephi)* sintheta + &
+       8.d0* costheta* ((-cij_kl(1) - cij_kl(3) + cij_kl(7) + cij_kl(8) - cij_kl(16) +&
+       cij_kl(19) + (cij_kl(1) - cij_kl(3) - &
+       cij_kl(7) + cij_kl(8) + cij_kl(16) - cij_kl(19))* costwotheta)* sintwophi +&
+       ((cij_kl(6) + cij_kl(11))* costwophi + &
+       (cij_kl(6) - cij_kl(11))* cosfourphi + (-cij_kl(1) + cij_kl(2) - cij_kl(7) +&
+       cij_kl(21))* sinfourphi)* sinthetasq) +&
+       ((cij_kl(4) + 3.d0* cij_kl(9) - 4.d0* cij_kl(13) + cij_kl(20))* cosphi + &
+       3.d0* (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi - &
+       (3.d0* cij_kl(5) + cij_kl(10) - 4.d0* cij_kl(14) + cij_kl(18))* sinphi + &
+       3.d0* (-cij_kl(5) + cij_kl(10) + cij_kl(18))* sinthreephi)* sinthreetheta)
+
+  cij_kll(16) = 1.d0/4.d0*(cij_kl(1) - cij_kl(2) + cij_kl(7) + cij_kl(16) + &
+       cij_kl(19) + cij_kl(21) + 2.d0*(cij_kl(16) - cij_kl(19))*costwophi* costhetasq + &
+       (-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(16) + &
+       cij_kl(19) - cij_kl(21))*costwotheta - 2.d0* cij_kl(17)* costhetasq* sintwophi + &
+       2.d0* ((-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(21))* cosfourphi + &
+       (-cij_kl(6) + cij_kl(11))* sinfourphi)* sinthetasq + ((cij_kl(5) - cij_kl(10) +&
+       cij_kl(18))* cosphi + (-cij_kl(5) + cij_kl(10) + cij_kl(18))* costhreephi +&
+       (-cij_kl(4) + cij_kl(9) + cij_kl(20))* sinphi - &
+       (cij_kl(4) - cij_kl(9) + cij_kl(20))* sinthreephi)* sintwotheta)
+
+  cij_kll(17) = 1.d0/8.d0* (4.d0* costwophi* costheta* (cij_kl(6) + cij_kl(11) - &
+       2.d0* cij_kl(15) - (cij_kl(6) + cij_kl(11) - 2.d0* (cij_kl(15) + &
+       cij_kl(17)))* costwotheta) - (2.d0* cosphi* (-3.d0* cij_kl(4) +&
+       cij_kl(9) + 2.d0* cij_kl(13) + cij_kl(20) + (cij_kl(4) - cij_kl(9) + &
+       cij_kl(20))* costwophi) - (cij_kl(5) - 5.d0* cij_kl(10) + &
+       4.d0* cij_kl(14) + 3.d0* cij_kl(18))* sinphi + (-cij_kl(5) + cij_kl(10) + &
+       cij_kl(18))* sinthreephi)* sintheta + &
+       8.d0* costheta* ((-cij_kl(1) + cij_kl(3) + cij_kl(7) - cij_kl(8) + &
+       (cij_kl(1) - cij_kl(3) - cij_kl(7) + cij_kl(8) + cij_kl(16) - &
+       cij_kl(19))* costwotheta)* sintwophi + ((cij_kl(6) - cij_kl(11))* cosfourphi + &
+       (-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(21))* sinfourphi)* sinthetasq) +&
+       ((cij_kl(4) + 3.d0* cij_kl(9) - 4.d0* cij_kl(13) + cij_kl(20))* cosphi + &
+       3.d0* (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi - &
+       (3.d0* cij_kl(5) + cij_kl(10) - 4.d0* cij_kl(14) + cij_kl(18))* sinphi + &
+       3.d0* (-cij_kl(5) + cij_kl(10) + cij_kl(18))* sinthreephi)* sinthreetheta)
+
+  cij_kll(18) = 1.d0/2.d0* ((cij_kl(5) - cij_kl(10) + cij_kl(18))* cosphi* costwotheta - &
+       (cij_kl(5) - cij_kl(10) - cij_kl(18))* costhreephi* costwotheta - &
+       2.d0* (cij_kl(4) - cij_kl(9) + &
+       (cij_kl(4) - cij_kl(9) + cij_kl(20))* costwophi)* costwotheta* sinphi + &
+       (cij_kl(1) - cij_kl(2) + cij_kl(7) - cij_kl(16) - cij_kl(19) + cij_kl(21) + &
+       (-cij_kl(16) + cij_kl(19))* costwophi + &
+       (-cij_kl(1) + cij_kl(2) - cij_kl(7) + cij_kl(21))* cosfourphi + &
+       cij_kl(17)* sintwophi + &
+       (-cij_kl(6) + cij_kl(11))* sinfourphi)* sintwotheta)
+
+  cij_kll(19) = 1.d0/4.d0* (cij_kl(16) - cij_kl(16)* costwophi + &
+      (-cij_kl(15) + cij_kl(17))* sintwophi + &
+      4.d0* cij_kl(12)* sintwothetasq + &
+      2.d0* (2.d0* cij_kl(1)* cosphifour* sintwothetasq + &
+      cosphi*cosphisq* (8.d0* cij_kl(6)* costhetasq* sinphi* sinthetasq + &
+      cij_kl(5)* sinfourtheta) + cosphisq* (-cij_kl(3) + cij_kl(19) + (cij_kl(3) +&
+      cij_kl(19))* cosfourtheta + (cij_kl(4) + cij_kl(20))* sinphi* sinfourtheta) + &
+      sinphi* (cosfourtheta* ((cij_kl(15) + cij_kl(17))* cosphi + &
+      cij_kl(16)* sinphi) + (cij_kl(2) + cij_kl(7) - 2.d0* cij_kl(8) + cij_kl(21) + &
+      (cij_kl(2) - cij_kl(7) + cij_kl(21))* costwophi)* sinphi* sintwothetasq + &
+      (-cij_kl(13) + cij_kl(9)* sinphisq)* sinfourtheta) + &
+      cosphi* (8.d0* cij_kl(11)* costhetasq* sinphi*sinphisq* sinthetasq + &
+      (-cij_kl(14) + (cij_kl(10) + cij_kl(18))* sinphisq)* sinfourtheta)))
+
+  cij_kll(20) = 1.d0/8.d0* (2.d0* cosphi* costheta* (-3.d0* cij_kl(4) - cij_kl(9) + &
+      4.d0* cij_kl(13) + cij_kl(20) + (cij_kl(4) + 3.d0* cij_kl(9) - &
+      4.d0* cij_kl(13) + cij_kl(20))* costwotheta) + &
+      (cij_kl(4) - cij_kl(9) + cij_kl(20))* costhreephi* (costheta + &
+      3.d0* costhreetheta) - &
+      2.d0* costheta* (-cij_kl(5) - 3.d0* cij_kl(10) + 4.d0* cij_kl(14) + &
+      cij_kl(18) + (3.d0* cij_kl(5) + &
+      cij_kl(10) - 4.d0* cij_kl(14) + cij_kl(18))*costwotheta)* sinphi - &
+      (cij_kl(5) - cij_kl(10) - cij_kl(18))* &
+      (costheta + 3.d0* costhreetheta)* sinthreephi + 8.d0* (cij_kl(6) - &
+      cij_kl(11))* cosfourphi* costhetasq* sintheta - 8.d0* (cij_kl(1) - &
+      cij_kl(3) - cij_kl(7) + cij_kl(8) + &
+      (cij_kl(1) - cij_kl(3) - cij_kl(7) + cij_kl(8) + cij_kl(16) - &
+      cij_kl(19))* costwotheta)* sintwophi* sintheta - &
+      8.d0* (cij_kl(1) - cij_kl(2) + cij_kl(7) - &
+      cij_kl(21))* costhetasq* sinfourphi* sintheta + &
+      2.d0* costwophi* ((cij_kl(6) + cij_kl(11) - 2.d0* cij_kl(15) + &
+      2.d0* cij_kl(17))* sintheta + &
+      (cij_kl(6) + cij_kl(11) - 2.d0* (cij_kl(15) + cij_kl(17)))* sinthreetheta))
+
+  cij_kll(21) = 1.d0/4.d0* (cij_kl(1) - cij_kl(2) + cij_kl(7) + cij_kl(16) + &
+      cij_kl(19) + cij_kl(21) - 2.d0* (cij_kl(1) - cij_kl(2) + cij_kl(7) - &
+      cij_kl(21))* cosfourphi* costhetasq + &
+      (cij_kl(1) - cij_kl(2) + cij_kl(7) - cij_kl(16) - cij_kl(19) + &
+      cij_kl(21))* costwotheta + &
+      2.d0* (-cij_kl(6) + cij_kl(11))* costhetasq* sinfourphi - &
+      2.d0* ((-cij_kl(16) + cij_kl(19))* costwophi + cij_kl(17)* sintwophi)* sinthetasq - &
+      ((cij_kl(5) - cij_kl(10) + cij_kl(18))* cosphi + (-cij_kl(5) + cij_kl(10) +&
+      cij_kl(18))* costhreephi + &
+      (-cij_kl(4) + cij_kl(9) + cij_kl(20))* sinphi - (cij_kl(4) - cij_kl(9) + &
+      cij_kl(20))* sinthreephi)* sintwotheta)
+
+  end subroutine rotate_kernels_dble



More information about the CIG-COMMITS mailing list