Commit f11ad9de authored by Matthias Redies's avatar Matthias Redies

move max_indx_p_1 calc to mpdata_init

parent 273e86ec
...@@ -216,7 +216,7 @@ CONTAINS ...@@ -216,7 +216,7 @@ CONTAINS
allocate(basprod(atoms%jmtd), stat=ok) allocate(basprod(atoms%jmtd), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation basprod') IF (ok /= 0) call judft_error('eigen_hf: failure allocation basprod')
IF(ALLOCATED(hybdat%prodm)) DEALLOCATE(hybdat%prodm) IF(ALLOCATED(hybdat%prodm)) DEALLOCATE(hybdat%prodm)
allocate(hybdat%prodm(maxval(mpdata%num_radbasfn), hybdat%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok) allocate(hybdat%prodm(maxval(mpdata%num_radbasfn), mpdata%max_indx_p_1, 0:maxval(hybinp%lcutm1), atoms%ntype), stat=ok)
IF (ok /= 0) call judft_error('eigen_hf: failure allocation hybdat%prodm') IF (ok /= 0) call judft_error('eigen_hf: failure allocation hybdat%prodm')
basprod = 0; hybdat%prodm = 0; mpdata%l1 = 0; mpdata%l2 = 0 basprod = 0; hybdat%prodm = 0; mpdata%l1 = 0; mpdata%l2 = 0
......
...@@ -72,7 +72,7 @@ CONTAINS ...@@ -72,7 +72,7 @@ CONTAINS
! local scalars ! local scalars
INTEGER :: jspin, itype, l1, l2, l, n_radbasfn, full_n_radbasfn, n1, n2 INTEGER :: jspin, itype, l1, l2, l, n_radbasfn, full_n_radbasfn, n1, n2
INTEGER :: m, i_basfn, i, n_grid_pt,j INTEGER :: i_basfn, i, n_grid_pt,j
REAL :: rdum, rdum1, max_momentum, momentum REAL :: rdum, rdum1, max_momentum, momentum
! - local arrays - ! - local arrays -
...@@ -137,7 +137,6 @@ CONTAINS ...@@ -137,7 +137,6 @@ CONTAINS
! determine maximal indices of (radial) mixed-basis functions (->num_radbasfn) ! determine maximal indices of (radial) mixed-basis functions (->num_radbasfn)
! (will be reduced later-on due to overlap) ! (will be reduced later-on due to overlap)
hybdat%max_indx_p_1 = 0
DO itype = 1, atoms%ntype DO itype = 1, atoms%ntype
seleco = .FALSE. seleco = .FALSE.
selecu = .FALSE. selecu = .FALSE.
...@@ -154,7 +153,6 @@ CONTAINS ...@@ -154,7 +153,6 @@ CONTAINS
DO l = 0, hybinp%lcutm1(itype) DO l = 0, hybinp%lcutm1(itype)
n_radbasfn = 0 n_radbasfn = 0
M = 0
! !
! valence * valence ! valence * valence
...@@ -172,7 +170,6 @@ CONTAINS ...@@ -172,7 +170,6 @@ CONTAINS
IF (l >= ABS(l1 - l2) .AND. l <= l1 + l2) THEN IF (l >= ABS(l1 - l2) .AND. l <= l1 + l2) THEN
DO n1 = 1, mpdata%num_radfun_per_l(l1, itype) DO n1 = 1, mpdata%num_radfun_per_l(l1, itype)
DO n2 = 1, mpdata%num_radfun_per_l(l2, itype) DO n2 = 1, mpdata%num_radfun_per_l(l2, itype)
M = M + 1
IF (selecmat(n1, l1, n2, l2)) THEN IF (selecmat(n1, l1, n2, l2)) THEN
n_radbasfn = n_radbasfn + 1 n_radbasfn = n_radbasfn + 1
selecmat(n2, l2, n1, l1) = .FALSE. ! prevent double counting of products (a*b = b*a) selecmat(n2, l2, n1, l1) = .FALSE. ! prevent double counting of products (a*b = b*a)
...@@ -185,7 +182,6 @@ CONTAINS ...@@ -185,7 +182,6 @@ CONTAINS
IF (n_radbasfn == 0 .AND. mpi%irank == 0) & IF (n_radbasfn == 0 .AND. mpi%irank == 0) &
WRITE (6, '(A)') 'mixedbasis: Warning! No basis-function product of '//lchar(l)// & WRITE (6, '(A)') 'mixedbasis: Warning! No basis-function product of '//lchar(l)// &
'-angular momentum defined.' '-angular momentum defined.'
hybdat%max_indx_p_1 = MAX(hybdat%max_indx_p_1, M)
mpdata%num_radbasfn(l, itype) = n_radbasfn*input%jspins mpdata%num_radbasfn(l, itype) = n_radbasfn*input%jspins
END DO END DO
END DO END DO
......
...@@ -29,7 +29,6 @@ MODULE m_types_hybdat ...@@ -29,7 +29,6 @@ MODULE m_types_hybdat
INTEGER :: maxlmindx = -1 INTEGER :: maxlmindx = -1
COMPLEX, ALLOCATABLE :: stepfunc(:,:,:) COMPLEX, ALLOCATABLE :: stepfunc(:,:,:)
INTEGER :: nbasp = -1 INTEGER :: nbasp = -1
INTEGER :: max_indx_p_1 = -1
INTEGER :: maxbasm1 = -1 INTEGER :: maxbasm1 = -1
INTEGER, ALLOCATABLE :: nbasm(:) INTEGER, ALLOCATABLE :: nbasm(:)
contains contains
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment