Commit 656bd716 authored by Gregor Michalicek's avatar Gregor Michalicek

Fixing some array sizes for potden%mmpMat type arrays

parent a0255726
......@@ -57,8 +57,8 @@ CONTAINS
! set up e-e- interaction matrix
ALLOCATE (u(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,&
-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
ALLOCATE (n_mmp(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
ALLOCATE (n_mmp(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
n_mmp(:,:,:,:) = inDen%mmpMat(:,:,:,:)
DO ispin = 1, 1 ! input%jspins
f0(:,1) = (f0(:,1) + f0(:,input%jspins) ) / 2
......
......@@ -133,11 +133,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
CALL prp_qfft_map(stars,sym, input, igq2_fft,igq_fft)
!LDA+U: initialise density-matrix if needed
IF (atoms%n_u.GT.0) THEN
ALLOCATE (outDen%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
ELSE
ALLOCATE (outDen%mmpMat(-lmaxU_const:-lmaxU_const,-lmaxU_const:-lmaxU_const,1,input%jspins))
END IF
ALLOCATE (outDen%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
outDen%mmpMat(:,:,:,:) = CMPLX(0.0,0.0)
......
......@@ -215,13 +215,8 @@ CONTAINS
CALL vCoul%init(stars,atoms,sphhar,vacuum,oneD,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTCOUL)
CALL vx%init(stars%ng3,atoms%jmtd,sphhar%nlhd,atoms%ntype,DIMENSION%jspd,.FALSE.,POTDEN_TYPE_POTX)
CALL vTemp%init(stars,atoms,sphhar,vacuum,oneD,DIMENSION%jspd,noco%l_noco,POTDEN_TYPE_POTTOT)
IF ((atoms%n_u.GT.0)) THEN
ALLOCATE(vTot%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
ALLOCATE(vTemp%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
ELSE
ALLOCATE(vTot%mmpMat(-lmaxU_const:-lmaxU_const,-lmaxU_const:-lmaxU_const,1,2))
ALLOCATE(vTemp%mmpMat(-lmaxU_const:-lmaxU_const,-lmaxU_const:-lmaxU_const,1,2))
ENDIF
ALLOCATE(vTot%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
ALLOCATE(vTemp%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
! Initialize potentials (end)
DO WHILE (l_cont)
......
......@@ -60,7 +60,7 @@ SUBROUTINE mix(stars,atoms,sphhar,vacuum,input,sym,cell,noco,oneD,&
REAL dist(6)
REAL, ALLOCATABLE :: sm(:), fsm(:)
CHARACTER(LEN=20) :: attributes(2)
COMPLEX :: n_mmpTemp(-3:3,-3:3,atoms%n_u,input%jspins)
COMPLEX :: n_mmpTemp(-3:3,-3:3,MAX(1,atoms%n_u),input%jspins)
!External functions
REAL CPP_BLAS_sdot
......
......@@ -89,7 +89,8 @@ CONTAINS
! mix here straight with given mixing factors
ALLOCATE (n_mmp(-3:3,-3:3,atoms%n_u,input%jspins))
ALLOCATE (n_mmp(-3:3,-3:3,MAX(1,atoms%n_u),input%jspins))
n_mmp = CMPLX(0.0,0.0)
alpha = input%ldauMixParam
spinf = input%ldauSpinf
......
......@@ -51,15 +51,9 @@ CONTAINS
END IF
END IF
IF((mpi%irank.NE.0).AND.l_denMatAlloc) THEN
IF ((atoms%n_u.GT.0)) THEN
IF(.NOT.ALLOCATED(potden%mmpMat)) THEN
ALLOCATE(potDen%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u,input%jspins))
END IF
ELSE
IF(.NOT.ALLOCATED(potden%mmpMat)) THEN
ALLOCATE(potDen%mmpMat(-lmaxU_const:-lmaxU_const,-lmaxU_const:-lmaxU_const,1,2))
END IF
ENDIF
IF(.NOT.ALLOCATED(potden%mmpMat)) THEN
ALLOCATE(potDen%mmpMat(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,MAX(1,atoms%n_u),input%jspins))
END IF
END IF
n = stars%ng3 * input%jspins
......
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