Commit 00245a03 authored by Matthias Redies's avatar Matthias Redies

rename and move linear dependence tolerance

parent e6ca4924
......@@ -265,7 +265,7 @@ CONTAINS
! In order to get rid of the linear dependencies in the
! radial functions radbasfn_mt belonging to fixed l and itype
! the overlap matrix is diagonalized and those eigenvectors
! with a eigenvalue greater then hybrid%tolerance1 are retained
! with a eigenvalue greater then mpbasis%linear_dep_tol are retained
! Calculate overlap
call mpbasis%calc_olap_radbasfn(atoms, l, itype, gridf, olap)
......@@ -538,12 +538,12 @@ CONTAINS
subroutine filter_radbasfn(hybrid, l, itype, n_radbasfn, eig, eigv, mpbasis)
! Get rid of linear dependencies (eigenvalue <= hybrid%tolerance1)
! Get rid of linear dependencies (eigenvalue <= mpbasis%linear_dep_tol)
use m_types
implicit none
type(t_hybrid), intent(in) :: hybrid
integer, intent(in) :: l, itype, n_radbasfn
real, intent(inout) :: eig(:), eigv(:,:)
integer, intent(in) :: l, itype, n_radbasfn
real, intent(inout) :: eig(:), eigv(:,:)
type(t_mpbasis), intent(inout) :: mpbasis
integer :: num_radbasfn, i_bas
......@@ -553,7 +553,7 @@ CONTAINS
num_radbasfn = 0
DO i_bas = 1, mpbasis%num_radbasfn(l, itype)
IF (eig(i_bas) > hybrid%tolerance1) THEN
IF (eig(i_bas) > mpbasis%linear_dep_tol) THEN
num_radbasfn = num_radbasfn + 1
remaining_basfn(num_radbasfn) = i_bas
END IF
......
......@@ -249,7 +249,7 @@ CONTAINS
hybrid%select1(:,iType) = (/4, 0, 4, 2 /)
END DO
mpbasis%g_cutoff = input%rkmax - 0.5
hybrid%tolerance1 = 1.0e-4
mpbasis%linear_dep_tol = 1.0e-4
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%bands1 = max( nint(input%zelec)*10, 60 )
......
......@@ -294,7 +294,7 @@
!HF added for HF and hybrid functionals
mpbasis%g_cutoff = input%rkmax - 0.5
hybrid%tolerance1 = 1e-4
mpbasis%linear_dep_tol = 1e-4
taual_hyb = atoms%taual
ALLOCATE(hybrid%lcutwf(atoms%ntype))
ALLOCATE(hybrid%lcutm1(atoms%ntype))
......
......@@ -1313,7 +1313,7 @@ CONTAINS
END IF
mpbasis%g_cutoff = input%rkmax - 0.5
hybrid%tolerance1 = 1.0e-4
mpbasis%linear_dep_tol = 1.0e-4
hybrid%ewaldlambda = 3
hybrid%lexp = 16
hybrid%bands1 = DIMENSION%neigd
......@@ -1323,7 +1323,7 @@ CONTAINS
IF (hybrid%l_hybrid) CALL judft_error("Mixed product basis input missing in inp.xml")
ELSE
mpbasis%g_cutoff=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@gcutm'))
hybrid%tolerance1=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@tolerance'))
mpbasis%linear_dep_tol=evaluateFirstOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@tolerance'))
hybrid%ewaldlambda=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@ewaldlambda'))
hybrid%lexp=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@lexp'))
hybrid%bands1=evaluateFirstIntOnly(xmlGetAttributeValue('/fleurInput/calculationSetup/prodBasis/@bands'))
......
......@@ -323,9 +323,9 @@
GOTO 78
ELSEIF ( ch_test .eq. 'gcu' ) then ! HF
BACKSPACE (5)
READ (UNIT=5,FMT=7999,END=99,ERR=99) mpbasis%g_cutoff,hybrid%tolerance1,&
READ (UNIT=5,FMT=7999,END=99,ERR=99) mpbasis%g_cutoff,mpbasis%linear_dep_tol,&
& hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
WRITE (6,9999) mpbasis%g_cutoff,hybrid%tolerance1,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
WRITE (6,9999) mpbasis%g_cutoff,mpbasis%linear_dep_tol,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
7999 FORMAT (6x,f8.5,6x,f10.8,8x,i2,6x,i2,7x,i4)
9999 FORMAT ('gcutm=',f8.5,',mtol=',f10.8,',lambda=',i2,&
& ',lexp=',i2,',bands=',i4)
......@@ -787,7 +787,7 @@
ENDIF
IF( namex.EQ.'hf ' .OR. namex .EQ. 'exx ' .OR. namex .EQ. 'hse '&
& .OR. namex.EQ.'vhse' ) THEN
WRITE (5,9999) mpbasis%g_cutoff,hybrid%tolerance1,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
WRITE (5,9999) mpbasis%g_cutoff,mpbasis%linear_dep_tol,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
l_hyb = .true.
END IF
......
......@@ -199,7 +199,7 @@ SUBROUTINE w_inpXML(&
IF (l_explicit.OR.hybrid%l_hybrid) THEN
155 FORMAT(' <prodBasis gcutm="',f0.8,'" tolerance="',f0.8,'" ewaldlambda="',i0,'" lexp="',i0,'" bands="',i0,'"/>')
WRITE (fileNum,155) mpbasis%g_cutoff,hybrid%tolerance1,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
WRITE (fileNum,155) mpbasis%g_cutoff,mpbasis%linear_dep_tol,hybrid%ewaldlambda,hybrid%lexp,hybrid%bands1
END IF
IF (l_nocoOpt.OR.l_explicit) THEN
......
......@@ -65,7 +65,7 @@ CONTAINS
r(6)=sliceplot%e1s ; r(7)=sliceplot%e2s ; r(8)=noco%theta; r(9)=noco%phi; r(10)=vacuum%tworkf
r(11)=vacuum%locx(1) ; r(12)=vacuum%locx(2); r(13)=vacuum%locy(1) ; r(14)=vacuum%locy(2)
r(15)=input%sigma ; r(16)=field%efield%zsigma ; r(17)=noco%mix_b; r(18)=cell%vol
r(19)=cell%volint ; r(20)=mpbasis%g_cutoff ; r(21)=hybrid%tolerance1 ; r(22)=0.0
r(19)=cell%volint ; r(20)=mpbasis%g_cutoff ; r(21)=mpbasis%linear_dep_tol ; r(22)=0.0
r(23)=0.0 ; r(24)=input%delgau ; r(25)=input%tkb ; r(26)=field%efield%vslope
r(27)=0.0 ; r(28)=0.0!r(27)=aMix_VHSE() ; r(28)=omega_VHSE()
r(29)=input%minDistance ; r(30)=obsolete%chng ; r(31)=input%ldauMixParam ; r(32)=input%ldauSpinf
......@@ -101,7 +101,7 @@ CONTAINS
CALL MPI_BCAST(r,SIZE(r),MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
input%minDistance=r(29) ; obsolete%chng=r(30)
input%delgau=r(24) ; input%tkb=r(25) ; field%efield%vslope=r(26)
cell%volint=r(19) ; mpbasis%g_cutoff=r(20) ; hybrid%tolerance1=r(21)
cell%volint=r(19) ; mpbasis%g_cutoff=r(20) ; mpbasis%linear_dep_tol=r(21)
input%sigma=r(15) ; field%efield%zsigma=r(16); noco%mix_b=r(17); cell%vol=r(18);
vacuum%locx(1)=r(11); vacuum%locx(2)=r(12); vacuum%locy(1)=r(13); vacuum%locy(2)=r(14)
sliceplot%e1s=r(6) ; sliceplot%e2s=r(7) ; noco%theta=r(8); noco%phi=r(9); vacuum%tworkf=r(10)
......
......@@ -8,6 +8,7 @@ module m_types_mpbasis
REAL :: g_cutoff
INTEGER, ALLOCATABLE :: num_radbasfn(:,:)
REAL, ALLOCATABLE :: radbasfn_mt(:,:,:,:)
REAL :: linear_dep_tol !only read in
CONTAINS
procedure :: num_gpts => mpbasis_num_gpts
procedure :: gen_gvec => mpbasis_gen_gvec
......
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