Commit 25e84946 authored by Gregor Michalicek's avatar Gregor Michalicek

More steps towards changing structure, stars, stepfunction, lattice harmonics in cdn.hdf

...still very buggy.
parent 2d943bef
......@@ -129,12 +129,13 @@ MODULE m_cdn_io
END SUBROUTINE printDensityFileInfo
SUBROUTINE readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
SUBROUTINE readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
relCdnIndex,fermiEnergy,l_qfix,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sym),INTENT(IN) :: sym
......@@ -155,7 +156,7 @@ MODULE m_cdn_io
! local variables
INTEGER :: mode, datend, k, i, iVac, j, iUnit
LOGICAL :: l_exist, l_rhomatFile
LOGICAL :: l_exist, l_rhomatFile, l_DimChange
CHARACTER(LEN=30) :: filename
#ifdef CPP_HDF
......@@ -216,9 +217,14 @@ MODULE m_cdn_io
currentStepfunctionIndex,readDensityIndex,lastDensityIndex)
CALL readDensityHDF(fileID, input, stars, sphhar, atoms, vacuum, oneD, archiveName, densityType,&
fermiEnergy,l_qfix,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
fermiEnergy,l_qfix,l_DimChange,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
CALL closeCDNPOT_HDF(fileID)
IF(l_DimChange) THEN
CALL writeDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,inOrOutCDN,&
1,-1.0,fermiEnergy,l_qfix,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
END IF
RETURN
ELSE
WRITE(*,*) 'cdn.hdf file or relevant density entry not found.'
......@@ -346,7 +352,7 @@ MODULE m_cdn_io
INTEGER :: mode, iterTemp, k, i, iVac, j, iUnit
INTEGER :: d1, d10, asciioffset, iUnitTemp
LOGICAL :: l_exist, l_storeIndices, l_writeNew
LOGICAL :: l_exist, l_storeIndices, l_writeNew, l_same
LOGICAL :: l_writeAll
CHARACTER(len=30) :: filename
CHARACTER(len=5) :: cdnfile
......@@ -384,7 +390,6 @@ MODULE m_cdn_io
IF(currentStructureIndex.EQ.0) THEN
currentStructureIndex = 1
l_storeIndices = .TRUE.
l_writeAll = .TRUE.
CALL writeStructureHDF(fileID, input, atoms, cell, vacuum, oneD, currentStructureIndex)
ELSE
CALL readStructureHDF(fileID, inputTemp, atomsTemp, cellTemp, vacuumTemp, oneDTemp, currentStructureIndex)
......@@ -417,16 +422,8 @@ MODULE m_cdn_io
CALL writeStarsHDF(fileID, currentStarsIndex, stars)
ELSE
CALL readStarsHDF(fileID, currentStarsIndex, starsTemp)
l_writeNew = .FALSE.
IF(ABS(stars%gmax-starsTemp%gmax).GT.1e-10) l_writeNew = .TRUE.
IF(stars%ng3.NE.starsTemp%ng3) l_writeNew = .TRUE.
IF(stars%ng2.NE.starsTemp%ng2) l_writeNew = .TRUE.
IF(stars%mx1.NE.starsTemp%mx1) l_writeNew = .TRUE.
IF(stars%mx2.NE.starsTemp%mx2) l_writeNew = .TRUE.
IF(stars%mx3.NE.starsTemp%mx3) l_writeNew = .TRUE.
IF(stars%kimax.NE.starsTemp%kimax) l_writeNew = .TRUE.
IF(stars%kimax2.NE.starsTemp%kimax2) l_writeNew = .TRUE.
IF(l_writeNew.OR.l_writeAll) THEN
CALL compareStars(stars, starsTemp, l_same)
IF((.NOT.l_same).OR.l_writeAll) THEN
currentStarsIndex = currentStarsIndex + 1
l_storeIndices = .TRUE.
CALL writeStarsHDF(fileID, currentStarsIndex, stars)
......@@ -454,12 +451,8 @@ MODULE m_cdn_io
CALL writeStepfunctionHDF(fileID, currentStepfunctionIndex, currentStarsIndex, stars)
ELSE
CALL readStepfunctionHDF(fileID, currentStepfunctionIndex, starsTemp)
l_writeNew = .FALSE.
IF(stars%ng3.NE.starsTemp%ng3) l_writeNew = .TRUE.
IF(stars%mx1.NE.starsTemp%mx1) l_writeNew = .TRUE.
IF(stars%mx2.NE.starsTemp%mx2) l_writeNew = .TRUE.
IF(stars%mx3.NE.starsTemp%mx3) l_writeNew = .TRUE.
IF(l_writeNew.OR.l_writeAll) THEN
CALL compareStepfunctions(stars, starsTemp, l_same)
IF((.NOT.l_same).OR.l_writeAll) THEN
currentStepfunctionIndex = currentStepfunctionIndex + 1
l_storeIndices = .TRUE.
CALL writeStepfunctionHDF(fileID, currentStepfunctionIndex, currentStarsIndex, stars)
......@@ -919,8 +912,10 @@ MODULE m_cdn_io
LOGICAL, INTENT(IN) :: l_xcExtended,l_ExtData
LOGICAL, INTENT(OUT) :: l_error
TYPE(t_stars) :: starsTemp
INTEGER :: mode, ioStatus, ngz,izmin,izmax
LOGICAL :: l_exist
LOGICAL :: l_exist, l_same
INTEGER :: currentStarsIndex,currentLatharmsIndex,currentStructureIndex
INTEGER :: currentStepfunctionIndex,readDensityIndex,lastDensityIndex
......@@ -947,7 +942,14 @@ MODULE m_cdn_io
IF (currentStarsIndex.LT.1) THEN
mode = CDN_DIRECT_MODE ! (no stars entry found in cdn.hdf file)
ELSE
CALL readStarsHDF(fileID, currentStarsIndex, stars)
CALL readStarsHDF(fileID, currentStarsIndex, starsTemp)
CALL compareStars(stars, starsTemp, l_same)
WRITE(*,*) 'l_same', l_same
IF(l_same) THEN
CALL readStarsHDF(fileID, currentStarsIndex, stars)
ELSE
mode = CDN_DIRECT_MODE ! (no adequate stars entry found in cdn.hdf file)
END IF
END IF
CALL closeCDNPOT_HDF(fileID)
#endif
......@@ -1017,6 +1019,24 @@ MODULE m_cdn_io
END SUBROUTINE readStars
SUBROUTINE compareStars(stars, refStars, l_same)
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_stars),INTENT(IN) :: refStars
LOGICAL, INTENT(OUT) :: l_same
l_same = .TRUE.
IF(ABS(stars%gmaxInit-refStars%gmaxInit).GT.1e-10) l_same = .FALSE.
IF(stars%ng3.NE.refStars%ng3) l_same = .FALSE.
IF(stars%ng2.NE.refStars%ng2) l_same = .FALSE.
IF(stars%mx1.NE.refStars%mx1) l_same = .FALSE.
IF(stars%mx2.NE.refStars%mx2) l_same = .FALSE.
IF(stars%mx3.NE.refStars%mx3) l_same = .FALSE.
END SUBROUTINE compareStars
SUBROUTINE writeStepfunction(stars)
TYPE(t_stars),INTENT(IN) :: stars
......@@ -1138,6 +1158,22 @@ MODULE m_cdn_io
END SUBROUTINE readStepfunction
SUBROUTINE compareStepfunctions(stars, refStars, l_same)
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_stars),INTENT(IN) :: refStars
LOGICAL, INTENT(OUT) :: l_same
l_same = .TRUE.
IF(stars%ng3.NE.refStars%ng3) l_same = .FALSE.
IF(stars%mx1.NE.refStars%mx1) l_same = .FALSE.
IF(stars%mx2.NE.refStars%mx2) l_same = .FALSE.
IF(stars%mx3.NE.refStars%mx3) l_same = .FALSE.
END SUBROUTINE compareStepfunctions
SUBROUTINE setStartingDensity(l_noco)
LOGICAL,INTENT(IN) :: l_noco
......
......@@ -1803,7 +1803,7 @@ MODULE m_cdnpot_io_hdf
SUBROUTINE readDensityHDF(fileID, input, stars, latharms, atoms, vacuum, oneD,&
archiveName, densityType,&
fermiEnergy,l_qfix,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
fermiEnergy,l_qfix,l_DimChange,iter,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
TYPE(t_input),INTENT(IN) :: input
TYPE(t_stars),INTENT(IN) :: stars
......@@ -1818,7 +1818,7 @@ MODULE m_cdnpot_io_hdf
INTEGER, INTENT (OUT) :: iter
REAL, INTENT (OUT) :: fermiEnergy
LOGICAL, INTENT (OUT) :: l_qfix
LOGICAL, INTENT (OUT) :: l_qfix, l_DimChange
REAL, INTENT (OUT) :: fr(:,:,:,:)
REAL, INTENT (OUT) :: fz(:,:,:)
......@@ -1826,24 +1826,32 @@ MODULE m_cdnpot_io_hdf
COMPLEX, INTENT (OUT) :: fzxy(:,:,:,:)
COMPLEX, INTENT (OUT) :: cdom(:), cdomvz(:,:), cdomvxy(:,:,:)
INTEGER :: starsIndex, latharmsIndex, structureIndex, stepfunctionIndex
INTEGER :: previousDensityIndex, jspins
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
INTEGER :: nmz, nvac, od_nq2, nmzxy
INTEGER :: localDensityType
LOGICAL :: l_film, l_exist
INTEGER(HID_T) :: archiveID, groupID, groupBID
INTEGER :: hdfError
CHARACTER(LEN=30) :: groupName, groupBName, densityTypeName
INTEGER :: dimsInt(7)
INTEGER(HID_T) :: frSetID
INTEGER(HID_T) :: fpwSetID
INTEGER(HID_T) :: fzSetID
INTEGER(HID_T) :: fzxySetID
INTEGER(HID_T) :: cdomSetID
INTEGER(HID_T) :: cdomvzSetID
INTEGER(HID_T) :: cdomvxySetID
INTEGER :: starsIndex, latharmsIndex, structureIndex, stepfunctionIndex
INTEGER :: previousDensityIndex, jspins
INTEGER :: ntype,jmtd,nmzd,nmzxyd,nlhd,ng3,ng2
INTEGER :: nmz, nvac, od_nq2, nmzxy
INTEGER :: localDensityType
LOGICAL :: l_film, l_exist
INTEGER(HID_T) :: archiveID, groupID, groupBID
INTEGER :: hdfError
CHARACTER(LEN=30) :: groupName, groupBName, densityTypeName
INTEGER :: dimsInt(7)
INTEGER :: jmtdOut, ntypeOut, nmzdOut, nmzxydOut, nlhdOut, ng3Out, ng2Out
INTEGER :: nmzOut, nvacOut, od_nq2Out, nmzxyOut, jspinsOut
INTEGER(HID_T) :: frSetID
INTEGER(HID_T) :: fpwSetID
INTEGER(HID_T) :: fzSetID
INTEGER(HID_T) :: fzxySetID
INTEGER(HID_T) :: cdomSetID
INTEGER(HID_T) :: cdomvzSetID
INTEGER(HID_T) :: cdomvxySetID
REAL, ALLOCATABLE :: frTemp(:,:,:,:)
REAL, ALLOCATABLE :: fzTemp(:,:,:)
COMPLEX, ALLOCATABLE :: fpwTemp(:,:)
COMPLEX, ALLOCATABLE :: fzxyTemp(:,:,:,:)
COMPLEX, ALLOCATABLE :: cdomTemp(:), cdomvzTemp(:,:), cdomvxyTemp(:,:,:)
cdom = CMPLX(0.0,0.0)
cdomvz = CMPLX(0.0,0.0)
......@@ -1938,53 +1946,104 @@ MODULE m_cdnpot_io_hdf
CALL io_read_attreal0(groupID,'fermiEnergy',fermiEnergy)
CALL io_read_attlog0(groupID,'l_qfix',l_qfix)
jmtdOut = MIN(jmtd,atoms%jmtd)
ntypeOut = MIN(ntype,atoms%ntype)
nmzdOut = MIN(nmzd,vacuum%nmzd)
nmzxydOut = MIN(nmzxyd,vacuum%nmzxyd)
nlhdOut = MIN(nlhd,latharms%nlhd)
ng3Out = MIN(ng3,stars%ng3)
ng2Out = MIN(ng2,stars%ng2)
nmzOut = MIN(nmz,vacuum%nmz)
nvacOut = MIN(nvac,vacuum%nvac)
od_nq2Out = MIN(od_nq2,oneD%odi%nq2)
nmzxyOut = MIN(nmzxy,vacuum%nmzxy)
jspinsOut = MIN(jspins,input%jspins)
l_DimChange = .FALSE.
IF(atoms%jmtd.NE.jmtd) l_DimChange = .TRUE.
IF(atoms%ntype.NE.ntype) l_DimChange = .TRUE.
IF(vacuum%nmzd.NE.nmzd) l_DimChange = .TRUE.
IF(vacuum%nmzxyd.NE.nmzxyd) l_DimChange = .TRUE.
IF(latharms%nlhd.NE.nlhd) l_DimChange = .TRUE.
IF(stars%ng3.NE.ng3) l_DimChange = .TRUE.
IF(stars%ng2.NE.ng2) l_DimChange = .TRUE.
IF(vacuum%nmz.NE.nmz) l_DimChange = .TRUE.
IF(vacuum%nvac.NE.nvac) l_DimChange = .TRUE.
IF(oneD%odi%nq2.NE.od_nq2) l_DimChange = .TRUE.
IF(vacuum%nmzxy.NE.nmzxy) l_DimChange = .TRUE.
IF(input%jspins.NE.jspins) l_DimChange = .TRUE.
fr = 0.0
dimsInt(:4)=(/MIN(jmtd,atoms%jmtd),MIN(nlhd,latharms%nlhd)+1,MIN(ntype,atoms%ntype),MIN(jspins,input%jspins)/)
ALLOCATE(frTemp(jmtd,1:nlhd+1,ntype,jspins))
dimsInt(:4)=(/jmtd,nlhd+1,ntype,jspins/)
CALL h5dopen_f(groupID, 'fr', frSetID, hdfError)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),fr)
CALL io_read_real4(frSetID,(/1,1,1,1/),dimsInt(:4),frTemp)
CALL h5dclose_f(frSetID, hdfError)
fr(1:jmtdOut,1:nlhdOut+1,1:ntypeOut,1:jspinsOut) =&
frTemp(1:jmtdOut,1:nlhdOut+1,1:ntypeOut,1:jspinsOut)
DEALLOCATE(frTemp)
fpw = CMPLX(0.0,0.0)
dimsInt(:3)=(/2,MIN(ng3,stars%ng3),MIN(jspins,input%jspins)/)
ALLOCATE(fpwTemp(ng3,jspins))
dimsInt(:3)=(/2,ng3,jspins/)
CALL h5dopen_f(groupID, 'fpw', fpwSetID, hdfError)
CALL io_read_complex2(fpwSetID,(/-1,1,1/),dimsInt(:3),fpw)
CALL io_read_complex2(fpwSetID,(/-1,1,1/),dimsInt(:3),fpwTemp)
CALL h5dclose_f(fpwSetID, hdfError)
fpw(1:ng3Out,1:jspinsOut) = fpwTemp(1:ng3Out,1:jspinsOut)
DEALLOCATE(fpwTemp)
IF (l_film) THEN
fz = 0.0
dimsInt(:3)=(/MIN(nmzd,vacuum%nmzd),2,MIN(jspins,input%jspins)/)
ALLOCATE(fzTemp(nmzd,2,jspins))
dimsInt(:3)=(/nmzd,2,jspins/)
CALL h5dopen_f(groupID, 'fz', fzSetID, hdfError)
CALL io_read_real3(fzSetID,(/1,1,1/),dimsInt(:3),fz)
CALL io_read_real3(fzSetID,(/1,1,1/),dimsInt(:3),fzTemp)
CALL h5dclose_f(fzSetID, hdfError)
fz(1:nmzdOut,1:2,1:jspinsOut) = fzTemp(1:nmzdOut,1:2,1:jspinsOut)
DEALLOCATE(fzTemp)
fzxy = CMPLX(0.0,0.0)
dimsInt(:5)=(/2,MIN(nmzxyd,vacuum%nmzxyd),MIN(ng2,stars%ng2)-1,2,MIN(jspins,input%jspins)/)
ALLOCATE(fzxyTemp(nmzxyd,ng2-1,2,jspins))
dimsInt(:5)=(/2,nmzxyd,ng2-1,2,jspins/)
CALL h5dopen_f(groupID, 'fzxy', fzxySetID, hdfError)
CALL io_read_complex4(fzxySetID,(/-1,1,1,1,1/),dimsInt(:5),fzxy)
CALL io_read_complex4(fzxySetID,(/-1,1,1,1,1/),dimsInt(:5),fzxyTemp)
CALL h5dclose_f(fzxySetID, hdfError)
fzxy(1:nmzxydOut,1:ng2Out-1,1:2,1:jspinsOut) =&
fzxyTemp(1:nmzxydOut,1:ng2Out-1,1:2,1:jspinsOut)
DEALLOCATE(fzxyTemp)
END IF
IF((localDensityType.EQ.DENSITY_TYPE_NOCO_IN_const).OR.&
(localDensityType.EQ.DENSITY_TYPE_NOCO_OUT_const)) THEN
cdom = CMPLX(0.0,0.0)
dimsInt(:2)=(/2,MIN(ng3,stars%ng3)/)
ALLOCATE(cdomTemp(ng3))
dimsInt(:2)=(/2,ng3/)
CALL h5dopen_f(groupID, 'cdom', cdomSetID, hdfError)
CALL io_read_complex1(cdomSetID,(/-1,1/),dimsInt(:2),cdom)
CALL io_read_complex1(cdomSetID,(/-1,1/),dimsInt(:2),cdomTemp)
CALL h5dclose_f(cdomSetID, hdfError)
cdom(1:ng3Out) = cdomTemp(1:ng3Out)
DEALLOCATE(cdomTemp)
IF (l_film) THEN
cdomvz = CMPLX(0.0,0.0)
dimsInt(:3)=(/2,MIN(nmz,vacuum%nmz),MIN(nvac,vacuum%nvac)/)
ALLOCATE(cdomvzTemp(nmz,nvac))
dimsInt(:3)=(/2,nmz,nvac/)
CALL h5dopen_f(groupID, 'cdomvz', cdomvzSetID, hdfError)
CALL io_read_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvz)
CALL io_read_complex2(cdomvzSetID,(/-1,1,1/),dimsInt(:3),cdomvzTemp)
CALL h5dclose_f(cdomvzSetID, hdfError)
cdomvz(1:nmzOut,1:nvacOut) = cdomvzTemp(1:nmzOut,1:nvacOut)
DEALLOCATE(cdomvzTemp)
cdomvxy = CMPLX(0.0,0.0)
dimsInt(:4)=(/2,MIN(nmzxy,vacuum%nmzxy),MIN(od_nq2,oneD%odi%nq2)-1,MIN(nvac,vacuum%nvac)/)
ALLOCATE(cdomvxyTemp(nmzxy,od_nq2-1,nvac))
dimsInt(:4)=(/2,nmzxy,od_nq2-1,nvac/)
CALL h5dopen_f(groupID, 'cdomvxy', cdomvxySetID, hdfError)
CALL io_read_complex3(cdomvxySetID,(/-1,1,1,1/),dimsInt(:4),cdomvxy)
CALL io_read_complex3(cdomvxySetID,(/-1,1,1,1/),dimsInt(:4),cdomvxyTemp)
CALL h5dclose_f(cdomvxySetID, hdfError)
cdomvxy(1:nmzxyOut,1:od_nq2Out-1,1:nvacOut) =&
cdomvxyTemp(1:nmzxyOut,1:od_nq2Out-1,1:nvacOut)
DEALLOCATE(cdomvxyTemp)
END IF
END IF
......
......@@ -106,7 +106,7 @@
IF(noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const
IF((.NOT.noco%l_noco).AND.mpi%irank.EQ.0) THEN
ALLOCATE(cdom(1),cdomvz(1,1),cdomvxy(1,1,1))
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
DEALLOCATE(cdom,cdomvz,cdomvxy)
END IF
......
......@@ -182,7 +182,7 @@ CONTAINS
END IF
!---> reload densities of current iteration
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
!
......@@ -194,7 +194,7 @@ CONTAINS
intfac,vacfac,qpw,rho,rht,rhtxy,cdom,cdomvz,cdomvxy,n_mmp(-3,-3,1,1,1), nmap,nmaph,mapmt,mapvac,mapvac2,sm)
! load output charge density
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_OUTPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
!
......
......@@ -146,7 +146,7 @@ CONTAINS
archiveType = CDN_ARCHIVE_TYPE_CDN1_const
IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_CDN_const
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
!+for
......
......@@ -155,10 +155,10 @@ CONTAINS
IF (noco%l_noco) THEN
CALL juDFT_error("vgen:1",calledby ="vgen")
ENDIF
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,CDN_OUTPUT_DEN_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,CDN_OUTPUT_DEN_const,&
0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
ELSE
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
END IF
......@@ -405,7 +405,7 @@ CONTAINS
! ----> reload the density for calculating vxc (for spin-pol. case)
!
IF (input%jspins.EQ.2) THEN
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,CDN_INPUT_DEN_const,&
0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
vr(:,0:,:,2) = vr(:,0:,:,1)
vpw(:,2) = vpw(:,1)
......@@ -678,7 +678,7 @@ CONTAINS
IF (input%total) THEN
IF (noco%l_noco) THEN ! load qpw,rht,rhtxy from 'cdn'-file
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN_const,CDN_INPUT_DEN_const,&
0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
ENDIF
!
......
......@@ -50,7 +50,7 @@ contains
archiveType = CDN_ARCHIVE_TYPE_CDN1_const
IF (noco%l_noco) archiveType = CDN_ARCHIVE_TYPE_NOCO_const
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,it,fr,fpw,fz,fzxy,cdom,cdomvz,cdomvxy)
IF ( typmag < atoms%ntype ) THEN
......
......@@ -59,7 +59,7 @@
input%jspins=1
CALL readCoreDensity(input,atoms,dimension,rhoc,tec,qintc)
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_CDN1_const,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
input%jspins=2
......
......@@ -60,7 +60,7 @@
ENDIF
! ---> read the charge density
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,archiveType,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,archiveType,&
CDN_INPUT_DEN_const,0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
! ---> flip cdn for each atom with nflip=-1
......
......@@ -116,7 +116,7 @@ CONTAINS
ENDIF
!---> reload the density matrix from file rhomat_inp
CALL readDensity(stars,vacuum,atoms,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_NOCO_const,CDN_INPUT_DEN_const,&
CALL readDensity(stars,vacuum,atoms,cell,sphhar,input,sym,oneD,CDN_ARCHIVE_TYPE_NOCO_const,CDN_INPUT_DEN_const,&
0,fermiEnergyTemp,l_qfix,iter,rho,qpw,rht,rhtxy,cdom,cdomvz,cdomvxy)
CALL qfix(&
......
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