1
0
mirror of https://github.com/TREX-CoE/irpjast.git synced 2025-01-03 10:06:11 +01:00

Flattened array working.

This commit is contained in:
Panadestein 2020-12-04 15:33:20 +01:00
parent 66db010d0e
commit fac1c40693
4 changed files with 21 additions and 1823 deletions

View File

@ -45,12 +45,8 @@ BEGIN_PROVIDER [double precision, factor_een]
z = b z = b
endif endif
do l = iand(p - k, 1), lmax, 2 do l = iand(p - k, 1), lmax, 2
! factor_een = factor_een + cord_vect(l, k, p, alpha) * (y + z) * t cidx = 1 + l + (ncord + 1) * k + (ncord + 1) * (ncord + 1) * (p - 1) + &
! cidx = l + (ncord + 1) * k + (ncord + 1) * (ncord + 1) * p + & (ncord + 1) * (ncord + 1) * ncord * (alpha - 1)
! (ncord + 1) * (ncord + 1) * ncord * alpha
! here I try to use the flattened version of the array
cidx = l + 6 * k + 6 * 6 * p + 6 * 6 * 5 * alpha
print *, cidx
factor_een = factor_een + cord_vect(cidx) * (y + z) * t factor_een = factor_een + cord_vect(cidx) * (y + z) * t
t = t * c_inv t = t * c_inv
y = y * a2 y = y * a2

BIN
jastrow

Binary file not shown.

View File

@ -24,21 +24,23 @@ END_PROVIDER
BEGIN_PROVIDER [double precision, aord_vect, (naord)] BEGIN_PROVIDER [double precision, aord_vect, (naord)]
&BEGIN_PROVIDER [double precision, bord_vect, (nbord)] &BEGIN_PROVIDER [double precision, bord_vect, (nbord)]
&BEGIN_PROVIDER [double precision, cord_vect, (ncord * ncord * ncord * nnuc)] &BEGIN_PROVIDER [double precision, cord_vect, ((ncord + 1) * (ncord + 1) * ncord * nnuc)]
implicit none implicit none
PROVIDE naord
PROVIDE nbord
PROVIDE ncord
BEGIN_DOC BEGIN_DOC
! Read Jastow coefficients from file (NEEDS OPTIMIZATION!) ! Read Jastow coefficients from file (NEEDS OPTIMIZATION!)
END_DOC END_DOC
PROVIDE naord
PROVIDE nbord
PROVIDE ncord
character(len=*), parameter :: FILE_NAME = "orders_inp" character(len=*), parameter :: FILE_NAME = "orders_inp"
integer :: i, fu, rc integer :: i, fu, rc, maxord
double precision, dimension(naord + nbord + ncord * ncord * ncord * nnuc) :: allord_vect double precision, dimension((ncord + 1) * (ncord + 1) * ncord * nnuc + naord + nbord) :: allord_vect
maxord = (ncord + 1) * (ncord + 1) * ncord * nnuc + naord + nbord
open(action='read', file=FILE_NAME, iostat=rc, newunit=fu) open(action='read', file=FILE_NAME, iostat=rc, newunit=fu)
do i = 1, naord + nbord + ncord * ncord * ncord * nnuc do i = 1, maxord
read(fu, *) allord_vect(i) read(fu, *) allord_vect(i)
end do end do
@ -74,13 +76,13 @@ END_PROVIDER
! FREE seed ! FREE seed
! END_PROVIDER ! END_PROVIDER
! !
BEGIN_PROVIDER [double precision, cord_vect_0, (0:ncord,0:ncord,ncord,nnuc)] ! BEGIN_PROVIDER [double precision, cord_vect, (0:ncord,0:ncord,ncord,nnuc)]
implicit none ! implicit none
BEGIN_DOC ! BEGIN_DOC
! Vector of the `c' coefficients ! ! Vector of the `c' coefficients
END_DOC ! END_DOC
PROVIDE seed ! PROVIDE seed
call random_number(cord_vect_0) ! call random_number(cord_vect)
cord_vect_0 = cord_vect_0 * .1d-4 ! cord_vect_0 = cord_vect_0 * .1d-4
FREE seed ! FREE seed
END_PROVIDER ! END_PROVIDER

1800
tt

File diff suppressed because it is too large Load Diff