Commit c5a34d5b authored by Daniel Wortmann's avatar Daniel Wortmann

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents f1948301 c3df2569
...@@ -55,8 +55,6 @@ CONTAINS ...@@ -55,8 +55,6 @@ CONTAINS
TYPE(t_potden) :: workden,denRot TYPE(t_potden) :: workden,denRot
INTEGER :: ispin, i
if (mpi%irank==0) WRITE (6,FMT=8000) if (mpi%irank==0) WRITE (6,FMT=8000)
8000 FORMAT (/,/,t10,' p o t e n t i a l g e n e r a t o r',/) 8000 FORMAT (/,/,t10,' p o t e n t i a l g e n e r a t o r',/)
...@@ -81,7 +79,6 @@ CONTAINS ...@@ -81,7 +79,6 @@ CONTAINS
CALL vCoul%copy_both_spin(vTot) CALL vCoul%copy_both_spin(vTot)
vCoul%mt(:,:,:,input%jspins)=vCoul%mt(:,:,:,1) vCoul%mt(:,:,:,input%jspins)=vCoul%mt(:,:,:,1)
IF (noco%l_noco) THEN IF (noco%l_noco) THEN
CALL denRot%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,0) CALL denRot%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,0)
denRot=den denRot=den
...@@ -92,7 +89,7 @@ CONTAINS ...@@ -92,7 +89,7 @@ CONTAINS
obsolete,cell,oneD,sliceplot,mpi,noco,den,denRot,vTot,vx,results) obsolete,cell,oneD,sliceplot,mpi,noco,den,denRot,vTot,vx,results)
!ToDo, check if this is needed for more potentials as well... !ToDo, check if this is needed for more potentials as well...
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,denRot) CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,vCoul,denRot)
!DEALLOCATE(vcoul%pw_w) !DEALLOCATE(vcoul%pw_w)
CALL bfield(input,noco,atoms,field,vTot) CALL bfield(input,noco,atoms,field,vTot)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
MODULE m_vgen_finalize MODULE m_vgen_finalize
USE m_juDFT USE m_juDFT
CONTAINS CONTAINS
SUBROUTINE vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,denRot) SUBROUTINE vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,vCoul,denRot)
! *********************************************************** ! ***********************************************************
! FLAPW potential generator * ! FLAPW potential generator *
! *********************************************************** ! ***********************************************************
...@@ -24,7 +24,7 @@ CONTAINS ...@@ -24,7 +24,7 @@ CONTAINS
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_input),INTENT(IN) :: input TYPE(t_input),INTENT(IN) :: input
TYPE(t_potden),INTENT(INOUT) :: vTot,denRot TYPE(t_potden),INTENT(INOUT) :: vTot,vCoul,denRot
! .. ! ..
! .. Local Scalars .. ! .. Local Scalars ..
INTEGER i,js,n INTEGER i,js,n
...@@ -37,7 +37,7 @@ CONTAINS ...@@ -37,7 +37,7 @@ CONTAINS
ENDDO ENDDO
ENDDO ! js =1,input%jspins ENDDO ! js =1,input%jspins
! Rescale pw_w with number of stars ! Rescale vTot%pw_w with number of stars
IF (.NOT.noco%l_noco) THEN IF (.NOT.noco%l_noco) THEN
DO js=1,SIZE(vtot%pw_w,2) DO js=1,SIZE(vtot%pw_w,2)
DO i=1,stars%ng3 DO i=1,stars%ng3
...@@ -48,6 +48,13 @@ CONTAINS ...@@ -48,6 +48,13 @@ CONTAINS
CALL vmatgen(stars,atoms,vacuum,sym,input,denRot,vTot) CALL vmatgen(stars,atoms,vacuum,sym,input,denRot,vTot)
ENDIF ENDIF
! Rescale vCoul%pw_w with number of stars
DO js = 1, SIZE(vCoul%pw_w,2)
DO i = 1, stars%ng3
vcoul%pw_w(i,js) = vcoul%pw_w(i,js) / stars%nstr(i) !this normalization is needed for gw
END DO
END DO
!Copy first vacuum into second vacuum if this was not calculated before !Copy first vacuum into second vacuum if this was not calculated before
IF (vacuum%nvac==1) THEN IF (vacuum%nvac==1) THEN
vTot%vacz(:,2,:) = vTot%vacz(:,1,:) vTot%vacz(:,2,:) = vTot%vacz(:,1,:)
......
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