2023-07-20 14:59:02 +02:00
|
|
|
subroutine GTpp_static_kernel_Aph(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,Omega2,rho2,KA)
|
2021-10-15 13:51:04 +02:00
|
|
|
|
2022-09-09 21:48:50 +02:00
|
|
|
! Compute the OOVV block of the static T-matrix
|
2021-10-15 13:51:04 +02:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2022-01-05 12:46:59 +01:00
|
|
|
double precision,intent(in) :: eta
|
2021-10-15 13:51:04 +02:00
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nC
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nV
|
|
|
|
integer,intent(in) :: nR
|
|
|
|
integer,intent(in) :: nS
|
|
|
|
integer,intent(in) :: nOO
|
|
|
|
integer,intent(in) :: nVV
|
|
|
|
double precision,intent(in) :: lambda
|
|
|
|
double precision,intent(in) :: Omega1(nVV)
|
2021-10-16 15:34:34 +02:00
|
|
|
double precision,intent(in) :: rho1(nBas,nBas,nVV)
|
2021-10-15 13:51:04 +02:00
|
|
|
double precision,intent(in) :: Omega2(nOO)
|
2021-10-16 15:34:34 +02:00
|
|
|
double precision,intent(in) :: rho2(nBas,nBas,nOO)
|
2021-10-15 13:51:04 +02:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
double precision :: chi
|
2021-12-21 13:49:41 +01:00
|
|
|
double precision :: eps
|
2022-02-15 20:14:01 +01:00
|
|
|
integer :: i,j,a,b,ia,jb,kl,cd,c,d
|
2021-10-15 13:51:04 +02:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2023-07-20 14:59:02 +02:00
|
|
|
double precision,intent(out) :: KA(nS,nS)
|
2021-10-15 13:51:04 +02:00
|
|
|
|
2023-07-20 14:59:02 +02:00
|
|
|
KA(:,:) = 0d0
|
2022-01-07 15:14:00 +01:00
|
|
|
|
2023-07-10 11:53:42 +02:00
|
|
|
jb = 0
|
2023-07-20 14:59:02 +02:00
|
|
|
!$omp parallel do default(private) shared(KA,Omega1,Omega2,rho1,rho2,nO,nBas,nVV,nOO,chi,eps,eta,nC,nR,lambda)
|
2023-07-10 11:53:42 +02:00
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = (b-nO) + (j-1)*(nBas-nO)
|
|
|
|
|
|
|
|
ia = 0
|
|
|
|
do i=nC+1,nO
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
ia = (a-nO) + (i-1)*(nBas-nO)
|
2021-10-15 13:51:04 +02:00
|
|
|
|
|
|
|
chi = 0d0
|
|
|
|
|
|
|
|
do cd=1,nVV
|
2022-01-24 10:29:27 +01:00
|
|
|
eps = + Omega1(cd)
|
2022-01-05 12:46:59 +01:00
|
|
|
chi = chi + rho1(i,b,cd)*rho1(a,j,cd)*eps/(eps**2 + eta**2)
|
2022-02-15 20:14:01 +01:00
|
|
|
|
2021-10-15 13:51:04 +02:00
|
|
|
enddo
|
|
|
|
|
|
|
|
do kl=1,nOO
|
2022-01-24 10:29:27 +01:00
|
|
|
eps = - Omega2(kl)
|
2022-01-05 12:46:59 +01:00
|
|
|
chi = chi + rho2(i,b,kl)*rho2(a,j,kl)*eps/(eps**2 + eta**2)
|
2021-10-15 13:51:04 +02:00
|
|
|
enddo
|
|
|
|
|
2023-07-20 14:59:02 +02:00
|
|
|
KA(ia,jb) = lambda*chi
|
2021-10-15 13:51:04 +02:00
|
|
|
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
2023-07-10 11:53:42 +02:00
|
|
|
!$omp end parallel do
|
|
|
|
|
2023-07-20 14:59:02 +02:00
|
|
|
end subroutine
|