Commit 4be4a0b7 authored by Daniel Wortmann's avatar Daniel Wortmann

Some small bugfixes

parent 5b72e8c9
......@@ -56,6 +56,8 @@ CONTAINS
CALL vTot%resetPotDen()
CALL vCoul%resetPotDen()
CALL vx%resetPotDen()
ALLOCATE(vx%pw_w,vTot%pw_w,mold=vTot%pw)
ALLOCATE(vCoul%pw_w(SIZE(den%pw,1),1))
CALL workDen%init(stars,atoms,sphhar,vacuum,input%jspins,noco%l_noco,0)
......@@ -71,7 +73,9 @@ CONTAINS
!ToDo, check if this is needed for more potentials as well...
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,vTot)
DEALLOCATE(vcoul%pw_w,vx%pw_w)
CALL bfield(input,noco,atoms,field,vTot)
! broadcast potentials
......
......@@ -41,7 +41,7 @@ CONTAINS
!
! -> warping has been moved to vgen and visxc resp. ...gustav
!
tis = cell%omtil * REAL( DOT_PRODUCT(vpot%pw_w(:,ispin),den%pw(:,ispin)))
tis = cell%omtil * REAL( DOT_PRODUCT(vpot%pw_w(:stars%ng3,ispin),den%pw(:stars%ng3,ispin)))
WRITE (6,FMT=8020) tis
WRITE (16,FMT=8020) tis
......
......@@ -206,7 +206,6 @@ CONTAINS
!
! convolute ufft and pot: F(G) = \sum_(G') U(G - G') V(G')
!
ALLOCATE(vCoul%pw_w,MOLD=vCoul%pw)
CALL convol(stars, vCoul%pw_w(:,ispin), vCoul%pw(:,ispin), stars%ufft)
!
results%te_vcoul = 0.0
......
......@@ -28,8 +28,7 @@ CONTAINS
USE m_checkdopall
USE m_cdn_io
USE m_types
USE m_potmod
IMPLICIT NONE
TYPE(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_hybrid),INTENT(IN) :: hybrid
......@@ -64,9 +63,11 @@ CONTAINS
#endif
CALL exc%init_potden_types(stars,atoms,sphhar,vacuum,1,.false.,1) !one spin only
CALL vx%init(stars,atoms,sphhar,vacuum,input%jspins,.false.,1)
if (present(results)) CALL veff%init(stars,atoms,sphhar,vacuum,input%jspins,.false.,1)
ALLOCATE(exc%pw_w(stars%ng3,1))
IF (PRESENT(results)) THEN
CALL veff%init(stars,atoms,sphhar,vacuum,input%jspins,.FALSE.,1)
ALLOCATE(veff%pw_w,mold=veff%pw_w)
ENDIF
! ******** exchange correlation potential******************
......
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