4
1
mirror of https://github.com/pfloos/quack synced 2024-11-09 07:33:55 +01:00
quack/src/GT/static_Tmatrix_A.f90

67 lines
1.6 KiB
Fortran
Raw Normal View History

2022-01-12 09:17:39 +01:00
subroutine static_Tmatrix_A(eta,nBas,nC,nO,nV,nR,nS,nOO,nVV,lambda,Omega1,rho1,Omega2,rho2,TA)
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
double precision,intent(out) :: TA(nS,nS)
2022-01-07 15:14:00 +01:00
TA(:,:) = 0d0
2021-10-15 13:51:04 +02:00
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = ia + 1
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
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
2022-09-09 21:48:50 +02:00
TA(ia,jb) = lambda*chi
2021-10-15 13:51:04 +02:00
enddo
enddo
enddo
enddo
2022-01-02 10:24:30 +01:00
end subroutine static_Tmatrix_A