10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 12:56:14 +01:00

Add a return condition for kmax=1, lmax=1 and v_kl=0.d0 in vpseudo

This commit is contained in:
Thomas Applencourt 2015-04-28 17:17:34 +02:00
parent be4db7c56d
commit 1938425cfe
2 changed files with 15 additions and 12 deletions

View File

@ -275,6 +275,13 @@ if __name__ == "__main__":
# ~#~#~#~#~ # # ~#~#~#~#~ #
ezfio.pseudo_klocmax = len(v_k[0]) ezfio.pseudo_klocmax = len(v_k[0])
# Change all the array 'cause EZFIO
# v_kl (v, l) => v_kl(l,v)
# v_kl => zip(*_v_kl)
# [[7.0, 79.74474797, -49.45159098], [1.0, 5.41040609, -4.60151975]]
# [(7.0, 1.0), (79.74474797, 5.41040609), (-49.45159098, -4.60151975)]
ezfio.pseudo_v_k = zip(*v_k) ezfio.pseudo_v_k = zip(*v_k)
ezfio.pseudo_n_k = zip(*n_k) ezfio.pseudo_n_k = zip(*n_k)
ezfio.pseudo_dz_k = zip(*dz_k) ezfio.pseudo_dz_k = zip(*dz_k)

View File

@ -219,24 +219,21 @@ double precision, allocatable :: array_I_B(:,:,:,:,:)
! \_ (_| | (_ |_| | ! \_ (_| | (_ |_| |
! !
if (kmax.eq.1.and.lmax.eq.0.and.v_kl(1,0).eq.0.d0) then
print*, "lmax",lmax Vpseudo=0.d0
print*, "kmax",kmax return
print*, "n_kl",n_kl end if
print*, "n_a",n_a
print*, "n_b",n_b
print*, "v_kl",v_kl
print*, "dz_kl",dz_kl
fourpi=4.d0*dacos(-1.d0) fourpi=4.d0*dacos(-1.d0)
ac=dsqrt((a(1)-c(1))**2+(a(2)-c(2))**2+(a(3)-c(3))**2) ac=dsqrt((a(1)-c(1))**2+(a(2)-c(2))**2+(a(3)-c(3))**2)
bc=dsqrt((b(1)-c(1))**2+(b(2)-c(2))**2+(b(3)-c(3))**2) bc=dsqrt((b(1)-c(1))**2+(b(2)-c(2))**2+(b(3)-c(3))**2)
arg=g_a*ac**2+g_b*bc**2 arg=g_a*ac**2+g_b*bc**2
if(arg.gt.-dlog(1.d-20))then if(arg.gt.-dlog(1.d-20))then
Vpseudo=0.d0 Vpseudo=0.d0
return return
endif endif
freal=dexp(-arg) freal=dexp(-arg)
areal=2.d0*g_a*ac areal=2.d0*g_a*ac
@ -259,7 +256,6 @@ allocate (array_I_A(0:lmax+ntot,-(lmax+ntot):lmax+ntot,0:ntot,0:ntot,0:ntot))
allocate (array_I_B(0:lmax+ntot,-(lmax+ntot):lmax+ntot,0:ntot,0:ntot,0:ntot)) allocate (array_I_B(0:lmax+ntot,-(lmax+ntot):lmax+ntot,0:ntot,0:ntot,0:ntot))
print*, ac,bc
if(ac.eq.0.d0.and.bc.eq.0.d0)then if(ac.eq.0.d0.and.bc.eq.0.d0)then