-
Notifications
You must be signed in to change notification settings - Fork 0
/
combin_p_q.f90
46 lines (41 loc) · 1.47 KB
/
combin_p_q.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
!------------_____-------------------------------------------------------------
! \ j
! |dph_i> = \ |ph_j> eta + Q |d_phi>
! / i
! /_____
!------------------------------------------------------------------------------
subroutine combin_p_q()
use global
use operator_spatial_space
use solver
implicit none
integer(4):: ip,iq,ix,idicp
complex(8):: cs ,here_temp
complex(8),dimension(system%nptot,system%nptot) :: CE
!-----------------------------------------------------------------------------
! after solve the p space, we get h - i eta = ce
! we need : i*(ce - h) = eta
!-----------------------------------------------------------------------------
! from haru
!---- redefine ce ----
do iq=1,system%nptot
do ip=1,system%nptot
here_temp = ham_onebody(ia(max(ip,iq)) + min(ip,iq))
if(ip<iq) here_temp = dconjg(here_temp)
cs=ci*(ch_dummy(ip,iq)-here_temp)
CE(ip,iq)=cs
enddo
enddo
!---- contribution from the p-space ----
do iq=1,system%nptot
do ix=1,fedvr3d%nb_r*fedvr3d%nb_angle
cs=zzero
do ip=1,system%nptot
cs=cs+phi(ix,ip)*CE(ip,iq)
enddo
kphi(ix,iq)=kphi(ix,iq)+cs !wenliang, ·½³Ì21 ¹±Ï×À´×ÔPºÍQ¿Õ¼ä
!! kphi(ix,iq) comes from solving space Q
enddo
enddo
return
end subroutine combin_p_q