Commit 5216671f by Gregor Michalicek

Make use of vTot%pw_w and vTot%pw mor consistent with respect to their content

```pw_w is the warped potential (with step function)
pw is the potential without the step function```
parent 40779707
 ... ... @@ -68,7 +68,7 @@ CONTAINS CALL timestart("Interstitial part") !Generate interstitial part of Hamiltonian CALL hs_int(input,noco,stars,lapw,mpi,cell,isp,v%pw,smat,hmat) CALL hs_int(input,noco,stars,lapw,mpi,cell,isp,v%pw_w,smat,hmat) CALL timestop("Interstitial part") CALL timestart("MT part") !MT-part of Hamiltonian. In case of noco, we need an loop over the local spin of the atoms ... ...
 ... ... @@ -37,18 +37,15 @@ CONTAINS ENDDO ENDDO ! js =1,input%jspins !Copy pw_w into pw if present and rescale with number of stars IF (.NOT.noco%l_noco.AND.ALLOCATED(vtot%pw_w)) THEN ! Rescale pw_w with number of stars IF (.NOT.noco%l_noco) THEN DO js=1,SIZE(vtot%pw_w,2) DO i=1,stars%ng3 vTot%pw(i,js)=vtot%pw_w(i,js)/stars%nstr(i) ENDDO ENDDO DEALLOCATE(vtot%pw_w) vTot%pw_w(i,js)=vtot%pw_w(i,js) / stars%nstr(i) END DO END DO ELSEIF(noco%l_noco) THEN CALL vmatgen(stars, atoms,vacuum,sym,input, denRot,vtot) IF (ALLOCATED(vtot%pw_w)) DEALLOCATE(vtot%pw_w) CALL vmatgen(stars,atoms,vacuum,sym,input,denRot,vTot) ENDIF !Copy first vacuum into second vacuum if this was not calculated before ... ...
 ... ... @@ -23,7 +23,7 @@ MODULE m_vmatgen ! Philipp Kurz 99/11/01 !********************************************************************** CONTAINS SUBROUTINE vmatgen(stars, atoms,vacuum, sym,input, den,v) SUBROUTINE vmatgen(stars,atoms,vacuum,sym,input,den,vTot) !******** ABBREVIATIONS *********************************************** ! ifft3 : size of the 3d real space mesh ... ... @@ -48,7 +48,7 @@ CONTAINS TYPE(t_stars),INTENT(IN) :: stars TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_potden),INTENT(IN) :: den TYPE(t_potden),INTENT(INOUT):: v TYPE(t_potden),INTENT(INOUT):: vTot ! .. ... ... @@ -70,7 +70,7 @@ CONTAINS !---> fouriertransform the spin up and down potential !---> in the interstitial, vpw, to real space (vis) DO jspin = 1,input%jspins CALL fft3d(vis(:,jspin),fftwork, v%pw(:,jspin), stars,+1) CALL fft3d(vis(:,jspin),fftwork, vTot%pw(:,jspin), stars,+1) ENDDO !---> calculate the four components of the matrix potential on ... ... @@ -102,9 +102,9 @@ CONTAINS !---> Fouriertransform the matrix potential back to reciprocal space DO ipot = 1,2 fftwork=0.0 CALL fft3d(vis(:,ipot),fftwork, v%pw(1,ipot), stars,-1) CALL fft3d(vis(:,ipot),fftwork, vTot%pw_w(1,ipot), stars,-1) ENDDO CALL fft3d(vis(:,3),vis(:,4), v%pw(1,3), stars,-1) CALL fft3d(vis(:,3),vis(:,4), vTot%pw_w(1,3), stars,-1) IF (.NOT. input%film) RETURN ... ... @@ -131,7 +131,7 @@ CONTAINS ! & %igf,odl%pgf,odi%nst2) ELSE CALL fft2d(stars, vvacxy(:,imz,ivac,jspin),fftwork,& v%vacz(imz,ivac,jspin),vziw,v%vacxy(imz,1,ivac,jspin), vacuum%nmzxyd,1) vTot%vacz(imz,ivac,jspin),vziw,vTot%vacxy(imz,1,ivac,jspin), vacuum%nmzxyd,1) ENDIF ENDDO ENDDO ... ... @@ -155,16 +155,16 @@ CONTAINS ENDDO ENDDO DO imz = vacuum%nmzxyd+1,vacuum%nmzd vup = v%vacz(imz,ivac,1) vdown = v%vacz(imz,ivac,2) vup = vTot%vacz(imz,ivac,1) vdown = vTot%vacz(imz,ivac,2) theta = den%theta_vacz(imz,ivac) phi = den%phi_vacz(imz,ivac) veff = (vup + vdown)/2.0 beff = (vup - vdown)/2.0 v%vacz(imz,ivac,1) = veff + beff*COS(theta) v%vacz(imz,ivac,2) = veff - beff*COS(theta) v%vacz(imz,ivac,3) = beff*SIN(theta)*COS(phi) v%vacz(imz,ivac,4) = beff*SIN(theta)*SIN(phi) vTot%vacz(imz,ivac,1) = veff + beff*COS(theta) vTot%vacz(imz,ivac,2) = veff - beff*COS(theta) vTot%vacz(imz,ivac,3) = beff*SIN(theta)*COS(phi) vTot%vacz(imz,ivac,4) = beff*SIN(theta)*SIN(phi) ENDDO ENDDO ... ... @@ -184,7 +184,7 @@ CONTAINS ! & %igf,odl%pgf,odi%nst2) ELSE CALL fft2d(stars, vvacxy(:,imz,ivac,ipot),fftwork,& v%vacz(imz,ivac,ipot),vziw,v%vacxy(imz,:,ivac,ipot), vacuum%nmzxyd,-1) vTot%vacz(imz,ivac,ipot),vziw,vTot%vacxy(imz,:,ivac,ipot), vacuum%nmzxyd,-1) END IF ENDDO ENDDO ... ... @@ -204,7 +204,7 @@ CONTAINS ! & %igf,odl%pgf,odi%nst2) ELSE CALL fft2d(stars, vvacxy(:,imz,ivac,3),vvacxy(:,imz,ivac,4),& v%vacz(imz,ivac,3),v%vacz(imz,ivac,4),v%vacxy(imz,:,ivac,3), vacuum%nmzxyd,-1) vTot%vacz(imz,ivac,3),vTot%vacz(imz,ivac,4),vTot%vacxy(imz,:,ivac,3), vacuum%nmzxyd,-1) END IF ENDDO ENDDO ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!