Commit 1621aa59 authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of fleur-git:fleur into develop

parents ace41c7e 76bfbae0
......@@ -42,13 +42,13 @@ CONTAINS
! ... Local Variables ..
INTEGER iind,ind1,ind2,info,lwork,liwork,lrwork,err
INTEGER iind,ind1,ind2,info,lwork,liwork,lrwork,err,i
INTEGER sizez,iu
REAL :: lb,ub
! 'sizez' is needed, as some compilers sometimes produce errors,
! if the size command is used directly as a lapack argument.
REAL toler
REAL toler, eigTemp(nsize)
REAL, ALLOCATABLE :: work(:)
INTEGER, ALLOCATABLE :: iwork(:),isuppz(:)
......@@ -128,14 +128,15 @@ CONTAINS
iu = min(nsize,neigd)
#ifndef CPP_F90
IF (l_J) THEN
CALL CPP_LAPACK_ssyevr('N','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eig,z,&
CALL CPP_LAPACK_ssyevr('N','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eigTemp,z,&
sizez,isuppz,work,lwork,iwork,liwork,info)
ELSE
CALL CPP_LAPACK_ssyevr('V','I','U',nsize,largea,nsize,lb,ub,1,iu,toler,ne,eig,z,&
CALL CPP_LAPACK_ssyevr('V','I','U',nsize,largea,nsize,lb,ub,1,iu,toler,ne,eigTemp,z,&
sizez,isuppz,work,lwork,iwork,liwork,info)
ENDIF
#else
eig = 0.0
eigTemp = 0.0
#endif
IF (info /= 0) CALL juDFT_error("error in ssyevr",calledby ="geneigprobl")
DEALLOCATE (isuppz,work,iwork)
......@@ -181,20 +182,21 @@ CONTAINS
iu = min(nsize,neigd)
#ifndef CPP_F90
IF (l_J) THEN
CALL CPP_LAPACK_cheevr('N','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eig,z,&
CALL CPP_LAPACK_cheevr('N','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eigTemp,z,&
sizez,isuppz,cwork,lwork,work,lrwork,iwork,liwork,info)
ELSE
#if (1==1)
CALL CPP_LAPACK_cheevr('V','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eig,z,&
CALL CPP_LAPACK_cheevr('V','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eigTemp,z,&
sizez,isuppz,cwork,lwork,work,lrwork,iwork,liwork,info)
#else
CALL CPP_LAPACK_cheevx('V','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eig,z,&
CALL CPP_LAPACK_cheevx('V','I','U',nsize,largea, nsize,lb,ub,1,iu,toler,ne,eigTemp,z,&
sizez,cwork,lwork,work,iwork,isuppz,info)
#endif
ENDIF
#else
eig = 0.0
eigTemp = 0.0
#endif
IF (info /= 0) CALL juDFT_error("error in cheevr",calledby ="geneigprobl")
DEALLOCATE ( isuppz )
......@@ -207,6 +209,10 @@ CONTAINS
#endif
DEALLOCATE ( largea,largeb )
DO i = 1, neigd
eig(i) = eigTemp(i)
END DO
END SUBROUTINE geneigprobl
END MODULE m_geneigprobl
......@@ -298,6 +298,9 @@
& enpara%enmix(jsp)*(pvac(1)/svac(1) - vbar)
IF (vacuum%nvac.EQ.2) THEN
IF (obsolete%lepr.eq.1) vbar = vz(1,vacuum%nvac)
write(6,FMT=777) enpara%evac0(2,jsp),(pvac(2)/svac(2) - vbar),&
& abs(enpara%evac0(2,jsp)-(pvac(2)/svac(2) - vbar))
maxdist=max(maxdist,abs(enpara%evac0(2,jsp)-(pvac(2)/svac(2) - vbar)))
enpara%evac0(2,jsp) = (1.0-enpara%enmix(jsp))*enpara%evac0(2,jsp)+&
& enpara%enmix(jsp)*(pvac(2)/svac(2) - vbar)
ELSE
......@@ -328,6 +331,7 @@
INTEGER :: n,i
DO n = 1,atoms%ntype
IF (all(enpara%el0(:,n,jsp)>-9999.)) cycle !enpara was set already
IF ( atoms%nz(n) < 3 ) THEN
......
......@@ -566,7 +566,7 @@ c in s and p states equal occupation of up and down states
enpara%lchange = .FALSE.
enpara%enmix = 1.0
enpara%lchg_v = .TRUE.
IF(juDFT_was_argument("-genEnpara")) THEN
IF(juDFT_was_argument("-genEnpara").OR.film) THEN
lmaxdTemp = atoms%lmaxd
atoms%lmaxd = 3
OPEN (40,file='enpara',form='formatted',status='unknown') ! write out an enpara-file
......
......@@ -219,6 +219,18 @@
& xmlCoreStates,xmlPrintCoreStates,xmlCoreOccs,&
& nel,atoms,enpara)
DO n = 1, atoms%ntype
IF (atoms%lnonsph(n).GT.atoms%lmax(n)) THEN
WRITE(*,'(a20,i5,a25,i3,a4,i3,a1)')&
'NOTE: For atom type ', n,' lnonsph is reduced from ',&
atoms%lnonsph(n),' to ', atoms%lmax(n), '.'
WRITE(6,'(a20,i5,a25,i3,a4,i3,a1)')&
'NOTE: For atom type ', n, ' lnonsph is reduced from ',&
atoms%lnonsph(n),' to ', atoms%lmax(n), '.'
atoms%lnonsph(n) = atoms%lmax(n)
END IF
END DO
input%zelec = nel
! --> check once more
......
......@@ -302,7 +302,7 @@
!
! set up parameters for enpara-file
!
IF (juDFT_was_argument("-genEnpara").AND..NOT.l_enpara) THEN
IF ((juDFT_was_argument("-genEnpara").OR.input%film).AND..NOT.l_enpara) THEN
OPEN (40,file='enpara',form='formatted',status='unknown')
enpara%lchange = .TRUE.
enpara%llochg = .TRUE.
......
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