mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-17 02:41:43 +02:00
Optimizations in polynomials
This commit is contained in:
parent
abc0e6b5ab
commit
8147ad22a7
5
TODO.org
5
TODO.org
@ -10,3 +10,8 @@ qmckl_malloc, where the domain id is something obtained from the
|
||||
context.
|
||||
|
||||
|
||||
* TRANSA, TRANSB
|
||||
* Performance info
|
||||
* Benchmark interpolation of basis functions
|
||||
* Complex numbers
|
||||
|
||||
|
@ -261,6 +261,7 @@ integer function qmckl_ao_polynomial_vgl_f(context, X, R, lmax, n, L, ldl, VGL,
|
||||
real*8 :: pows(-2:lmax,3)
|
||||
integer, external :: qmckl_ao_powers_f
|
||||
double precision :: xy, yz, xz
|
||||
double precision :: da, db, dc, dd
|
||||
|
||||
info = 0
|
||||
|
||||
@ -300,11 +301,14 @@ integer function qmckl_ao_polynomial_vgl_f(context, X, R, lmax, n, L, ldl, VGL,
|
||||
vgl(1:5,1:n) = 0.d0
|
||||
l(1:3,n) = 0
|
||||
vgl(1,n) = 1.d0
|
||||
dd = 1.d0
|
||||
do d=1,lmax
|
||||
da = 0.d0
|
||||
do a=0,d
|
||||
do b=0,d
|
||||
do c=0,d
|
||||
if (a+b+c == d) then
|
||||
db = 0.d0
|
||||
do b=0,d-a
|
||||
c = d - a - b
|
||||
dc = dd - da - db
|
||||
n = n+1
|
||||
l(1,n) = a
|
||||
l(2,n) = b
|
||||
@ -316,23 +320,24 @@ integer function qmckl_ao_polynomial_vgl_f(context, X, R, lmax, n, L, ldl, VGL,
|
||||
|
||||
vgl(1,n) = xy * pows(c,3)
|
||||
|
||||
xy = dble(c) * xy
|
||||
xz = dble(b) * xz
|
||||
yz = dble(a) * yz
|
||||
xy = dc * xy
|
||||
xz = db * xz
|
||||
yz = da * yz
|
||||
|
||||
vgl(2,n) = pows(a-1,1) * yz
|
||||
vgl(3,n) = pows(b-1,2) * xz
|
||||
vgl(4,n) = pows(c-1,3) * xy
|
||||
|
||||
vgl(5,n) = &
|
||||
dble(a-1) * pows(a-2,1) * yz + &
|
||||
dble(b-1) * pows(b-2,2) * xz + &
|
||||
dble(c-1) * pows(c-2,3) * xy
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
(da-1.d0) * pows(a-2,1) * yz + &
|
||||
(db-1.d0) * pows(b-2,2) * xz + &
|
||||
(dc-1.d0) * pows(c-2,3) * xy
|
||||
|
||||
db = db + 1.d0
|
||||
end do
|
||||
da = da + 1.d0
|
||||
end do
|
||||
dd = dd + 1.d0
|
||||
end do
|
||||
|
||||
end function qmckl_ao_polynomial_vgl_f
|
||||
|
Loading…
Reference in New Issue
Block a user