Commit d35fb49d authored by Gregor Michalicek's avatar Gregor Michalicek

Fix incorrect setting of evac0 array at different points

parent d52630ce
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
!use defaults !use defaults
enpara%lchange(:,:,jsp)=.false. enpara%lchange(:,:,jsp)=.false.
enpara%llochg(:,:,jsp)=.false. enpara%llochg(:,:,jsp)=.false.
enpara%evac0(:,jsp) = eVac0Default_const ! enpara%evac0(:,jsp) = eVac0Default_const
enpara%skiplo(:,jsp) = 0 enpara%skiplo(:,jsp) = 0
enpara%enmix(jsp) = 0.0 enpara%enmix(jsp) = 0.0
enpara%lchg_v(:,jsp)=.false. enpara%lchg_v(:,jsp)=.false.
......
...@@ -129,6 +129,7 @@ SUBROUTINE r_inpXML(& ...@@ -129,6 +129,7 @@ SUBROUTINE r_inpXML(&
LOGICAL :: l_amf(4) LOGICAL :: l_amf(4)
REAL, PARAMETER :: boltzmannConst = 3.1668114e-6 ! value is given in Hartree/Kelvin REAL, PARAMETER :: boltzmannConst = 3.1668114e-6 ! value is given in Hartree/Kelvin
INTEGER :: lcutm,lcutwf,hybSelect(4) INTEGER :: lcutm,lcutwf,hybSelect(4)
REAL :: evac0Temp(2,2)
CHARACTER(LEN=200,KIND=c_char) :: schemaFilename, docFilename CHARACTER(LEN=200,KIND=c_char) :: schemaFilename, docFilename
...@@ -714,7 +715,7 @@ SUBROUTINE r_inpXML(& ...@@ -714,7 +715,7 @@ SUBROUTINE r_inpXML(&
dtild = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dTilda')) dtild = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@dTilda'))
vacuum%dvac = cell%z1 vacuum%dvac = cell%z1
a3(3) = dtild a3(3) = dtild
enpara%evac0 = eVac0Default_const evac0Temp = eVac0Default_const
xPathB = TRIM(ADJUSTL(xPathA))//'/vacuumEnergyParameters' xPathB = TRIM(ADJUSTL(xPathA))//'/vacuumEnergyParameters'
numberNodes = xmlGetNumberOfNodes(xPathB) numberNodes = xmlGetNumberOfNodes(xPathB)
IF(numberNodes.GE.1) THEN IF(numberNodes.GE.1) THEN
...@@ -727,11 +728,11 @@ SUBROUTINE r_inpXML(& ...@@ -727,11 +728,11 @@ SUBROUTINE r_inpXML(&
IF (xmlGetNumberOfNodes(TRIM(ADJUSTL(xPathC))//'/@spinDown').GE.1) THEN IF (xmlGetNumberOfNodes(TRIM(ADJUSTL(xPathC))//'/@spinDown').GE.1) THEN
eParamDown = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathC))//'/@spinDown')) eParamDown = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathC))//'/@spinDown'))
END IF END IF
enpara%evac0(numVac,1) = eParamUp evac0Temp(numVac,1) = eParamUp
IF(input%jspins.GT.1) enpara%evac0(numVac,2) = eParamDown IF(input%jspins.GT.1) evac0Temp(numVac,2) = eParamDown
IF(i.EQ.1) THEN IF(i.EQ.1) THEN
enpara%evac0(3-numVac,1) = eParamUp evac0Temp(3-numVac,1) = eParamUp
IF(input%jspins.GT.1) enpara%evac0(3-numVac,2) = eParamDown IF(input%jspins.GT.1) evac0Temp(3-numVac,2) = eParamDown
END IF END IF
END DO END DO
END IF END IF
...@@ -1314,7 +1315,8 @@ SUBROUTINE r_inpXML(& ...@@ -1314,7 +1315,8 @@ SUBROUTINE r_inpXML(&
ALLOCATE(atoms%coreStateKappa(dimension%nstd,atoms%ntype)) ALLOCATE(atoms%coreStateKappa(dimension%nstd,atoms%ntype))
CALL enpara%init(atoms,input%jspins) CALL enpara%init(atoms,input%jspins)
enpara%evac0(:,:) = evac0Temp(:,:)
DO iSpecies = 1, numSpecies DO iSpecies = 1, numSpecies
ALLOCATE(speciesLLO(speciesNLO(iSpecies))) ALLOCATE(speciesLLO(speciesNLO(iSpecies)))
ALLOCATE(speciesLOeParams(speciesNLO(iSpecies))) ALLOCATE(speciesLOeParams(speciesNLO(iSpecies)))
......
...@@ -112,10 +112,11 @@ CONTAINS ...@@ -112,10 +112,11 @@ CONTAINS
this%skiplo(n,jsp) = this%skiplo(n,jsp) + (2*atoms%llo(i,n)+1) this%skiplo(n,jsp) = this%skiplo(n,jsp) + (2*atoms%llo(i,n)+1)
ENDIF ENDIF
ENDDO ENDDO
this%evac0=eVac0Default_const
ENDDO ENDDO
ENDDO ENDDO
this%evac0=eVac0Default_const
END SUBROUTINE init END SUBROUTINE init
!> This subroutine adjusts the energy parameters to the potential. In particular, it !> This subroutine adjusts the energy parameters to the potential. In particular, it
......
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