-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoverdi.f90
71 lines (67 loc) · 1.89 KB
/
overdi.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
! File created at Fri Jun 5 21:58:57 PDT 2020
! Original source code: overdi.f
subroutine overdi (rhoa,cva,rhob,cvb,ilev,jlev,klev,s,ia)
implicit double precision (a-h,o-z)
!
! -----------------------------------------------------------------
! This subroutine fills in the matrix elements of the setor-
! to-sector overlap matrix s within arrangement ia.
! Compare with subroutine direct.
! -----------------------------------------------------------------
!
! common blocks
!
common /arrays/ mro,mvi,nvi,n
common /ranges/ rmin,rmax,smax
common /rotors/ jtot,ipar,jpar,jmax,kmin,kmax
!
! input arrays
!
dimension cva(nvi,n),cvb(nvi,n)
dimension ilev(n),jlev(n),klev(n)
dimension s(n,n)
!
! local arrays
!
! dimension wvi(mvi),xvi(mvi)
allocatable wvi(:),xvi(:)
! dimension pva(mvi,n),pvb(mvi,n)
allocatable pva(:,:),pvb(:,:)
allocate (wvi(mvi),xvi(mvi))
allocate (pva(mvi,n),pvb(mvi,n))
!
! arrangement indices
!
call arrang (ilev,n,jpar,ia,nla,nha,na)
if (na .lt. 1) return
!
! vibrational quadrature rule
!
tmin = 0.d0
tamax = asin(min(1.d0,smax/rhoa))
tbmax = asin(min(1.d0,smax/rhob))
call qvib (tmin,tamax,mvi,wvi,xvi)
!
! vibrational basis functions
!
call pvibv (tmin,xvi,tamax,cva(1,nla),nvi,na,pva(1,nla),mvi,0)
call pvibv (tmin,xvi,tbmax,cvb(1,nla),nvi,na,pvb(1,nla),mvi,0)
!
! vibrational integrals
!
do kvi = 1,mvi
tb = xvi(kvi)
sab = wvi(kvi)
if (tb .lt. tbmax) then
do j = nla,nha
svb = sab*pvb(kvi,j)
do i = nla,nha
if (jlev(i).eq.jlev(j) .and. klev(i).eq.klev(j)) then
s(i,j) = s(i,j)+pva(kvi,i)*svb
endif
enddo
enddo
endif
enddo
return
end