2005-05-17 03:19:04 +08:00
|
|
|
!
|
|
|
|
! Copyright (C) 2002-2005 FPMD-CPV groups
|
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
|
|
|
|
|
|
|
subroutine qqberry2( gqq,gqqm, ipol)
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
! this subroutine computes the array gqq and gqqm
|
|
|
|
! gqq=int_dr qq(r)exp(iGr)=<Beta_r|exp(iGr)|Beta_r'>
|
|
|
|
! gqqm=int_dr qq(r)exp(-iGr)=<Beta_r|exp(-iGr)|Beta_r'>
|
|
|
|
|
|
|
|
! gqq output: as defined above
|
|
|
|
|
|
|
|
use smallbox_grid_dimensions, only: nr1b, nr2b, nr3b, &
|
|
|
|
nr1bx, nr2bx, nr3bx, nnrb => nnrbx
|
2006-03-06 18:39:38 +08:00
|
|
|
use uspp_param, only: lmaxq, nqlc, kkbeta, nbeta, nbetam, nh, nhm, oldvan
|
2005-10-21 23:37:47 +08:00
|
|
|
use uspp, only: indv, lpx, lpl, ap,nhtolm
|
2004-12-21 23:48:19 +08:00
|
|
|
use atom, only: r, rab
|
|
|
|
use core
|
|
|
|
use gvecw, only: ngw
|
|
|
|
use reciprocal_vectors, only: mill_l
|
|
|
|
use constants
|
2006-03-06 18:39:38 +08:00
|
|
|
use cvan, only: nvb
|
2004-12-21 23:48:19 +08:00
|
|
|
use ions_base
|
|
|
|
use ions_base, only : nas => nax
|
|
|
|
use cell_base, only: a1, a2, a3
|
2005-05-09 05:10:20 +08:00
|
|
|
use reciprocal_vectors, only: ng0 => gstart, gx, g
|
2005-10-21 23:37:47 +08:00
|
|
|
use mp, only: mp_sum
|
2006-03-11 00:02:42 +08:00
|
|
|
use pseudopotential, only: fill_qrl
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
2005-08-28 22:09:42 +08:00
|
|
|
complex(8) gqq(nhm,nhm,nas,nsp)
|
|
|
|
complex(8) gqqm(nhm,nhm,nas,nsp)
|
|
|
|
real(8) gmes
|
2006-03-03 22:17:46 +08:00
|
|
|
integer :: ipol
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
! local variables
|
|
|
|
|
2006-03-03 22:17:46 +08:00
|
|
|
integer :: ndm, ig, is, iv, jv, i, istart, il,l,ir, igi,ia
|
2005-08-28 22:09:42 +08:00
|
|
|
real(8), allocatable:: fint(:),jl(:)
|
2006-01-13 21:53:35 +08:00
|
|
|
real(8), allocatable:: qrl(:,:,:), qradb2(:,:,:,:)
|
2005-08-28 22:09:42 +08:00
|
|
|
real(8) c, xg
|
|
|
|
complex(8) qgbs,sig
|
2006-03-03 22:17:46 +08:00
|
|
|
integer :: ivs, jvs, ivl, jvl, lp, ijv
|
2005-08-28 22:09:42 +08:00
|
|
|
real(8), allocatable:: ylm(:,:)
|
2004-12-21 23:48:19 +08:00
|
|
|
|
2006-03-03 22:17:46 +08:00
|
|
|
ndm = MAXVAL (kkbeta(1:nsp))
|
|
|
|
allocate( fint( ndm), jl(ndm))
|
|
|
|
allocate( qradb2(nbetam,nbetam,lmaxq,nsp))
|
|
|
|
allocate( ylm(ngw, lmaxq*lmaxq))
|
2004-12-21 23:48:19 +08:00
|
|
|
|
2006-03-03 22:17:46 +08:00
|
|
|
CALL ylmr2( lmaxq*lmaxq, ngw, gx, g, ylm )
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
qradb2 = 0.0d0
|
|
|
|
|
|
|
|
do is=1,nsp
|
|
|
|
do ia=1,nas
|
|
|
|
do jv=1,nhm
|
|
|
|
do iv=1,nhm
|
|
|
|
gqq(iv,jv,ia,is)=(0.,0.)
|
|
|
|
gqqm(iv,jv,ia,is)=(0.,0.)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
if(ipol.eq.1) then
|
|
|
|
gmes=a1(1)**2+a1(2)**2+a1(3)**2
|
|
|
|
gmes=2*pi/SQRT(gmes)
|
|
|
|
endif
|
|
|
|
if(ipol.eq.2) then
|
|
|
|
gmes=a2(1)**2+a2(2)**2+a2(3)**2
|
|
|
|
gmes=2*pi/SQRT(gmes)
|
|
|
|
endif
|
|
|
|
if(ipol.eq.3) then
|
|
|
|
gmes=a3(1)**2+a3(2)**2+a3(3)**2
|
|
|
|
gmes=2*pi/SQRT(gmes)
|
|
|
|
endif
|
2006-01-10 19:20:56 +08:00
|
|
|
! only for Vanderbilt species
|
|
|
|
do is=1,nvb
|
2004-12-21 23:48:19 +08:00
|
|
|
c=fpi !/omegab
|
2006-01-10 19:20:56 +08:00
|
|
|
!
|
2006-01-13 21:53:35 +08:00
|
|
|
ALLOCATE ( qrl(kkbeta(is), nbeta(is)*(nbeta(is)+1)/2, nqlc(is)) )
|
|
|
|
!
|
2006-03-11 00:02:42 +08:00
|
|
|
call fill_qrl ( is, qrl )
|
2006-01-10 19:20:56 +08:00
|
|
|
! now the radial part
|
2004-12-21 23:48:19 +08:00
|
|
|
do l=1,nqlc(is)
|
2005-10-26 05:41:44 +08:00
|
|
|
xg= gmes !only orthorombic cells
|
2004-12-21 23:48:19 +08:00
|
|
|
call bess(xg,l,kkbeta(is),r(1,is),jl)
|
|
|
|
do iv= 1,nbeta(is)
|
2006-03-15 19:23:03 +08:00
|
|
|
do jv=iv,nbeta(is)
|
|
|
|
ijv = (jv-1)*jv/2 + iv
|
2004-12-21 23:48:19 +08:00
|
|
|
!
|
|
|
|
! note qrl(r)=r^2*q(r)
|
|
|
|
!
|
|
|
|
do ir=1,kkbeta(is)
|
2006-01-10 19:20:56 +08:00
|
|
|
fint(ir)=qrl(ir,ijv,l)*jl(ir)
|
2004-12-21 23:48:19 +08:00
|
|
|
end do
|
2005-03-28 04:05:06 +08:00
|
|
|
if (oldvan(is)) then
|
2004-12-21 23:48:19 +08:00
|
|
|
call herman_skillman_int &
|
2005-12-02 01:25:22 +08:00
|
|
|
& (kkbeta(is),fint,rab(1,is),qradb2(iv,jv,l,is))
|
2004-12-21 23:48:19 +08:00
|
|
|
else
|
2005-12-02 01:25:22 +08:00
|
|
|
call simpson (kkbeta(is),fint,rab(1,is),qradb2(iv,jv,l,is))
|
2004-12-21 23:48:19 +08:00
|
|
|
endif
|
|
|
|
qradb2(iv,jv,l,is)= c*qradb2(iv,jv,l,is)
|
2006-03-15 19:23:03 +08:00
|
|
|
if ( iv /= jv ) qradb2(jv,iv,l,is)= qradb2(iv,jv,l,is)
|
2004-12-21 23:48:19 +08:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2006-01-13 21:53:35 +08:00
|
|
|
DEALLOCATE ( qrl )
|
2004-12-21 23:48:19 +08:00
|
|
|
enddo
|
2006-01-13 21:53:35 +08:00
|
|
|
|
2004-12-21 23:48:19 +08:00
|
|
|
igi=-1
|
|
|
|
do ig=1,ngw
|
|
|
|
if(ipol.eq.1 ) then
|
|
|
|
if(mill_l(1,ig).eq.1 .and. mill_l(2,ig).eq.0 .and. mill_l(3,ig).eq. 0) igi=ig
|
|
|
|
endif
|
|
|
|
if(ipol.eq.2 ) then
|
|
|
|
if(mill_l(1,ig).eq.0 .and. mill_l(2,ig).eq.1 .and. mill_l(3,ig).eq. 0) igi=ig
|
|
|
|
endif
|
|
|
|
if(ipol.eq.3 ) then
|
|
|
|
if(mill_l(1,ig).eq.0 .and. mill_l(2,ig).eq.0 .and. mill_l(3,ig).eq. 1) igi=ig
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
if( igi.ne.-1) then
|
|
|
|
|
|
|
|
!setting array beigr
|
|
|
|
|
|
|
|
do is=1,nvb
|
|
|
|
do iv= 1,nh(is)
|
|
|
|
do jv=iv,nh(is)
|
|
|
|
ivs=indv(iv,is)
|
|
|
|
jvs=indv(jv,is)
|
2005-10-21 23:37:47 +08:00
|
|
|
ivl=nhtolm(iv,is)
|
|
|
|
jvl=nhtolm(jv,is)
|
2004-12-21 23:48:19 +08:00
|
|
|
!
|
|
|
|
! lpx = max number of allowed y_lm
|
|
|
|
! lp = composite lm to indentify them
|
|
|
|
!
|
|
|
|
qgbs=(0.,0.)
|
|
|
|
do i=1,lpx(ivl,jvl)
|
|
|
|
lp=lpl(ivl,jvl,i)
|
|
|
|
!
|
|
|
|
! extraction of angular momentum l from lp:
|
|
|
|
!
|
|
|
|
if (lp.eq.1) then
|
|
|
|
l=1
|
|
|
|
else if ((lp.ge.2) .and. (lp.le.4)) then
|
|
|
|
l=2
|
|
|
|
else if ((lp.ge.5) .and. (lp.le.9)) then
|
|
|
|
l=3
|
|
|
|
else if ((lp.ge.10).and.(lp.le.16)) then
|
|
|
|
l=4
|
|
|
|
else if ((lp.ge.17).and.(lp.le.25)) then
|
|
|
|
l=5
|
|
|
|
else if (lp.ge.26) then
|
|
|
|
call errore(' qvanb ',' lp.ge.26 ',lp)
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
! sig= (-i)^l
|
|
|
|
!
|
|
|
|
sig=(0.,-1.)**(l-1)
|
|
|
|
|
|
|
|
sig=sig*ap(lp,ivl,jvl)
|
2005-05-09 05:10:20 +08:00
|
|
|
qgbs=qgbs+sig*ylm(igi,lp)*qradb2(ivs,jvs,l,is)
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
do ia=1,na(is)
|
|
|
|
|
|
|
|
gqqm(iv,jv,ia,is)=qgbs
|
|
|
|
gqqm(jv,iv,ia,is)=qgbs
|
General cleanup of intrinsic functions:
conversion to real => DBLE
(including real part of a complex number)
conversion to complex => CMPLX
complex conjugate => CONJG
imaginary part => AIMAG
All functions are uppercase.
CMPLX is preprocessed by f_defs.h and performs an explicit cast:
#define CMPLX(a,b) cmplx(a,b,kind=DP)
This implies that 1) f_defs.h must be included whenever a CMPLX is present,
2) CMPLX should stay in a single line, 3) DP must be defined.
All occurrences of real, float, dreal, dfloat, dconjg, dimag, dcmplx
removed - please do not reintroduce any of them.
Tested only with ifc7 and g95 - beware unintended side effects
Maybe not the best solution (explicit casts everywhere would be better)
but it can be easily changed with a script if the need arises.
The following code might be used to test for possible trouble:
program test_intrinsic
implicit none
integer, parameter :: dp = selected_real_kind(14,200)
real (kind=dp) :: a = 0.123456789012345_dp
real (kind=dp) :: b = 0.987654321098765_dp
complex (kind=dp) :: c = ( 0.123456789012345_dp, 0.987654321098765_dp)
print *, ' A = ', a
print *, ' DBLE(A)= ', DBLE(a)
print *, ' C = ', c
print *, 'CONJG(C)= ', CONJG(c)
print *, 'DBLE(c),AIMAG(C) = ', DBLE(c), AIMAG(c)
print *, 'CMPLX(A,B,kind=dp)= ', CMPLX( a, b, kind=dp)
end program test_intrinsic
Note that CMPLX and REAL without a cast yield single precision numbers on
ifc7 and g95 !!!
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2133 c92efa57-630b-4861-b058-cf58834340f0
2005-08-27 01:44:42 +08:00
|
|
|
gqq(iv,jv,ia,is)=CONJG(gqqm(iv,jv,ia,is))
|
|
|
|
gqq(jv,iv,ia,is)=CONJG(gqqm(iv,jv,ia,is))
|
2004-12-21 23:48:19 +08:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
endif
|
|
|
|
|
2005-10-21 23:37:47 +08:00
|
|
|
call mp_sum(gqq(:,:,:,:))
|
|
|
|
call mp_sum(gqqm(:,:,:,:))
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
deallocate( fint)
|
|
|
|
deallocate( jl)
|
|
|
|
deallocate(qradb2)
|
|
|
|
deallocate(ylm)
|
|
|
|
|
|
|
|
return
|
|
|
|
end subroutine qqberry2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! this subroutine updates gqq and gqqm to the
|
|
|
|
! (new) atomic position
|
|
|
|
|
|
|
|
|
|
|
|
subroutine qqupdate(eigr, gqqm0, gqq, gqqm, ipol)
|
|
|
|
|
|
|
|
! gqq output: as defined above
|
|
|
|
|
|
|
|
use cvan
|
|
|
|
use gvecw, only: ngw
|
2005-04-15 05:08:53 +08:00
|
|
|
use ions_base, only : nas => nax, nat, na, nsp
|
2004-12-21 23:48:19 +08:00
|
|
|
use reciprocal_vectors, only: mill_l
|
|
|
|
use uspp_param, only: nh, nhm
|
2005-10-21 23:37:47 +08:00
|
|
|
use mp, only: mp_sum
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
2005-08-28 22:09:42 +08:00
|
|
|
complex(8) eigr(ngw,nat)
|
|
|
|
complex(8) gqq(nhm,nhm,nas,nsp)
|
|
|
|
complex(8) gqqm(nhm,nhm,nas,nsp)
|
|
|
|
complex(8) gqqm0(nhm,nhm,nas,nsp)
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
integer ipol
|
|
|
|
|
2005-04-15 05:08:53 +08:00
|
|
|
integer igi,ig,is,iv,jv,ia,isa
|
2004-12-21 23:48:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
do is=1,nsp
|
|
|
|
do ia=1,nas
|
|
|
|
do jv=1,nhm
|
|
|
|
do iv=1,nhm
|
|
|
|
gqq(iv,jv,ia,is)=(0.,0.)
|
|
|
|
gqqm(iv,jv,ia,is)=(0.,0.)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
igi=-1
|
|
|
|
do ig=1,ngw
|
|
|
|
if(ipol.eq.1 ) then
|
|
|
|
if(mill_l(1,ig).eq.1 .and. mill_l(2,ig).eq.0 .and. mill_l(3,ig).eq. 0) igi=ig
|
|
|
|
endif
|
|
|
|
if(ipol.eq.2 ) then
|
|
|
|
if(mill_l(1,ig).eq.0 .and. mill_l(2,ig).eq.1 .and. mill_l(3,ig).eq. 0) igi=ig
|
|
|
|
endif
|
|
|
|
if(ipol.eq.3 ) then
|
|
|
|
if(mill_l(1,ig).eq.0 .and. mill_l(2,ig).eq.0 .and. mill_l(3,ig).eq. 1) igi=ig
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
if( igi.ne.-1) then
|
|
|
|
|
|
|
|
|
2005-04-15 05:08:53 +08:00
|
|
|
isa = 1
|
2004-12-21 23:48:19 +08:00
|
|
|
do is=1,nvb
|
|
|
|
do ia=1,na(is)
|
|
|
|
do iv= 1,nh(is)
|
|
|
|
do jv=iv,nh(is)
|
2005-04-15 05:08:53 +08:00
|
|
|
gqqm(iv,jv,ia,is)= gqqm0(iv,jv,ia,is)*eigr(igi,isa)
|
|
|
|
gqqm(jv,iv,ia,is)= gqqm0(iv,jv,ia,is)*eigr(igi,isa)
|
General cleanup of intrinsic functions:
conversion to real => DBLE
(including real part of a complex number)
conversion to complex => CMPLX
complex conjugate => CONJG
imaginary part => AIMAG
All functions are uppercase.
CMPLX is preprocessed by f_defs.h and performs an explicit cast:
#define CMPLX(a,b) cmplx(a,b,kind=DP)
This implies that 1) f_defs.h must be included whenever a CMPLX is present,
2) CMPLX should stay in a single line, 3) DP must be defined.
All occurrences of real, float, dreal, dfloat, dconjg, dimag, dcmplx
removed - please do not reintroduce any of them.
Tested only with ifc7 and g95 - beware unintended side effects
Maybe not the best solution (explicit casts everywhere would be better)
but it can be easily changed with a script if the need arises.
The following code might be used to test for possible trouble:
program test_intrinsic
implicit none
integer, parameter :: dp = selected_real_kind(14,200)
real (kind=dp) :: a = 0.123456789012345_dp
real (kind=dp) :: b = 0.987654321098765_dp
complex (kind=dp) :: c = ( 0.123456789012345_dp, 0.987654321098765_dp)
print *, ' A = ', a
print *, ' DBLE(A)= ', DBLE(a)
print *, ' C = ', c
print *, 'CONJG(C)= ', CONJG(c)
print *, 'DBLE(c),AIMAG(C) = ', DBLE(c), AIMAG(c)
print *, 'CMPLX(A,B,kind=dp)= ', CMPLX( a, b, kind=dp)
end program test_intrinsic
Note that CMPLX and REAL without a cast yield single precision numbers on
ifc7 and g95 !!!
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2133 c92efa57-630b-4861-b058-cf58834340f0
2005-08-27 01:44:42 +08:00
|
|
|
gqq(iv,jv,ia,is)=CONJG(gqqm(iv,jv,ia,is))
|
|
|
|
gqq(jv,iv,ia,is)=CONJG(gqqm(iv,jv,ia,is))
|
2004-12-21 23:48:19 +08:00
|
|
|
enddo
|
|
|
|
enddo
|
2005-04-15 05:08:53 +08:00
|
|
|
isa = isa + 1
|
2004-12-21 23:48:19 +08:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
endif
|
2005-10-21 23:37:47 +08:00
|
|
|
call mp_sum(gqq(:,:,:,:))
|
|
|
|
call mp_sum(gqqm(:,:,:,:))
|
2004-12-21 23:48:19 +08:00
|
|
|
return
|
|
|
|
end subroutine qqupdate
|
|
|
|
|
|
|
|
!-----------------------------------------------------------------------
|
|
|
|
subroutine bess(xg,l,mmax,r,jl)
|
|
|
|
!-----------------------------------------------------------------------
|
|
|
|
! calculates spherical bessel functions j_l(qr)
|
|
|
|
! NOTA BENE: it is assumed that r(1)=0 always
|
|
|
|
!
|
|
|
|
implicit none
|
|
|
|
integer l, mmax
|
2005-08-28 22:09:42 +08:00
|
|
|
real(8) xg, jl(mmax), r(mmax)
|
2004-12-21 23:48:19 +08:00
|
|
|
! local variables
|
2005-08-28 22:09:42 +08:00
|
|
|
real(8) eps, xrg, xrg2
|
2004-12-21 23:48:19 +08:00
|
|
|
parameter(eps=1.e-8)
|
|
|
|
integer i, ir
|
|
|
|
!
|
|
|
|
! l=-1 (for derivative calculations)
|
|
|
|
!
|
|
|
|
if(l.eq.0) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=0.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=0.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
jl(ir)=cos(xrg)/xrg
|
|
|
|
end do
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
!
|
|
|
|
! s part
|
|
|
|
!
|
|
|
|
if(l.eq.1) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=1.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=1.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
jl(ir)=sin(xrg)/xrg
|
|
|
|
end do
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
! p-part
|
|
|
|
!
|
|
|
|
if(l.eq.2) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=0.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=0.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
jl(ir)=(sin(xrg)/xrg-cos(xrg))/xrg
|
|
|
|
end do
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
! d part
|
|
|
|
!
|
|
|
|
if(l.eq.3) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=0.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=0.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
jl(ir)=(sin(xrg)*(3./(xrg*xrg)-1.) &
|
|
|
|
& -3.*cos(xrg)/xrg) /xrg
|
|
|
|
end do
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
! f part
|
|
|
|
!
|
|
|
|
if(l.eq.4) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=0.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=0.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
xrg2=xrg*xrg
|
|
|
|
jl(ir)=( sin(xrg)*(15./(xrg2*xrg)-6./xrg) &
|
|
|
|
& +cos(xrg)*(1.-15./xrg2) )/xrg
|
|
|
|
end do
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
! g part
|
|
|
|
!
|
|
|
|
if(l.eq.5) then
|
|
|
|
if(xg.lt.eps) then
|
|
|
|
do i=1,mmax
|
|
|
|
jl(i)=0.0
|
|
|
|
end do
|
|
|
|
else
|
|
|
|
jl(1)=0.
|
|
|
|
do ir=2,mmax
|
|
|
|
xrg=r(ir)*xg
|
|
|
|
xrg2=xrg*xrg
|
|
|
|
jl(ir)=( sin(xrg)*(105./(xrg2*xrg2)-45./xrg2+1.) &
|
|
|
|
& +cos(xrg)*(10./xrg-105./(xrg2*xrg)) )/xrg
|
|
|
|
end do
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
!
|
|
|
|
return
|
|
|
|
end subroutine bess
|