10
0
mirror of https://gitlab.com/scemama/eplf synced 2024-10-31 19:23:55 +01:00

Optimizations

This commit is contained in:
Anthony Scemama 2012-06-01 00:19:08 +02:00
parent 40ad59efa8
commit b43bc90498

View File

@ -56,11 +56,8 @@ BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_num,mo_num) ]
END_DOC
integer :: i, j, k, l, kmo, kao
double precision :: t, moki
do i=1,mo_num
do j=i,mo_num
mo_eplf_integral_matrix(j,i) = 0.d0
enddo
enddo
!DEC$ VECTOR ALIGNED
mo_eplf_integral_matrix = 0.d0
do k=1,ao_num
do kmo=1,mo_coef_transp_non_zero_idx(0,k)
@ -77,8 +74,30 @@ BEGIN_PROVIDER [ double precision, mo_eplf_integral_matrix, (mo_num,mo_num) ]
enddo
do i=1,mo_num
do j=i+1,mo_num
!do j=1,mo_num
! do i=1,j-1
! mo_eplf_integral_matrix(i,j) = mo_eplf_integral_matrix(j,i)
! enddo
!enddo
moki = mo_num - mod(mo_num,4)
do j=1,moki,4
do i=1,j-1
mo_eplf_integral_matrix(i,j ) = mo_eplf_integral_matrix(j ,i)
mo_eplf_integral_matrix(i,j+1) = mo_eplf_integral_matrix(j+1,i)
mo_eplf_integral_matrix(i,j+2) = mo_eplf_integral_matrix(j+2,i)
mo_eplf_integral_matrix(i,j+3) = mo_eplf_integral_matrix(j+3,i)
enddo
mo_eplf_integral_matrix(j ,j+1) = mo_eplf_integral_matrix(j+1,j)
mo_eplf_integral_matrix(j ,j+2) = mo_eplf_integral_matrix(j+2,j)
mo_eplf_integral_matrix(j ,j+3) = mo_eplf_integral_matrix(j+3,j)
mo_eplf_integral_matrix(j+1,j+2) = mo_eplf_integral_matrix(j+2,j+1)
mo_eplf_integral_matrix(j+1,j+3) = mo_eplf_integral_matrix(j+3,j+1)
mo_eplf_integral_matrix(j+2,j+3) = mo_eplf_integral_matrix(j+3,j+2)
enddo
do j=moki+1,mo_num
do i=1,j-1
mo_eplf_integral_matrix(i,j) = mo_eplf_integral_matrix(j,i)
enddo
enddo
@ -332,7 +351,6 @@ double precision function ao_eplf_integral(i,j,gmma,center)
integer :: p,q,k
double precision :: integral
double precision :: ao_eplf_integral_primitive_oneD
double precision :: buffer(100)
ASSERT(i>0)
@ -399,7 +417,7 @@ double precision function mo_eplf_integral(i,j)
if (mo_coef(k,i) /= 0.) then
do l=1,ao_num
mo_eplf_integral += &
mo_coef(k,i)*mo_coef(l,j)*ao_eplf_integral_matrix(k,l)
mo_coef(k,i)*mo_coef(l,j)*ao_eplf_integral_matrix(l,k)
enddo
endif
enddo