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

41 lines
715 B
Fortran
Raw Normal View History

2019-02-07 22:49:12 +01:00
subroutine CalcOm(maxm,ExpPQi,NormPQSq,Om)
! Comute the 0^m: (00|00)^m
implicit none
! Input variables
integer,intent(in) :: maxm
double precision,intent(in) :: ExpPQi,NormPQSq
! Local variables
integer :: m
double precision :: pi,dm,t
double precision,allocatable :: Fm(:)
! Output variables
double precision,intent(inout):: Om (0:maxm)
allocate(Fm(0:maxm))
pi = 4d0*atan(1d0)
! Campute generalized Boys functions
t = NormPQSq/ExpPQi
call CalcBoysF(maxm,t,Fm)
! Compute (00|00)^m
do m=0,maxm
dm =dble(m)
Om(m) = (2d0/sqrt(pi))*(-1d0)**dm*(1d0/ExpPQi)**(dm+0.5d0)*Fm(m)
2019-03-20 13:38:42 +01:00
end do
2019-02-07 22:49:12 +01:00
deallocate(Fm)
end subroutine CalcOm