Commit 87b190a0 authored by Alexander Neukirchen's avatar Alexander Neukirchen

Prepared routine to put the correction into vTot.

parent a47f8850
......@@ -40,7 +40,7 @@ CONTAINS
CALL savxsf(stars, atoms, sphhar, vacuum, input, oneD, sym, cell, noco, &
.FALSE., .FALSE., 'divCorrected ', div2)
INQUIRE(file="div.xsf",exist=xsf)
INQUIRE(file="bInitial_f.xsf",exist=xsf)
IF (xsf) THEN
OPEN (120, FILE='bInitial_f.xsf', STATUS='OLD')
......
......@@ -48,7 +48,7 @@ contains
type(t_sym), intent(in) :: sym
type(t_cell), intent(in) :: cell
type(t_oneD), intent(in) :: oneD
LOGICAL, INTENT(IN) :: dosf
LOGICAL, INTENT(IN) :: dosf
complex, intent(in) :: vpw(:)!(stars%ng3,input%jspins)
real, intent(in) :: rho(:,0:,:)!(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
integer, intent(in) :: potdenType
......@@ -60,8 +60,8 @@ contains
complex :: pylm(( atoms%lmaxd + 1 ) ** 2, atoms%ntype)
real :: green_factor, termsR
real :: green_1 (1:atoms%jmtd), green_2 (1:atoms%jmtd)
real :: integrand_1(1:atoms%jmtd), integrand_2(1:atoms%jmtd), integrand_3 (1:atoms%jmtd)
real :: integral_1 (1:atoms%jmtd), integral_2 (1:atoms%jmtd), integral_3 (1:atoms%jmtd)
real :: integrand_1(1:atoms%jmtd), integrand_2(1:atoms%jmtd)
real :: integral_1 (1:atoms%jmtd), integral_2 (1:atoms%jmtd)
real :: sbf(0:atoms%lmaxd)
real, allocatable, dimension(:,:) :: il, kl
......
......@@ -187,4 +187,32 @@ CONTAINS
END SUBROUTINE sourcefree
SUBROUTINE correctPot(vTot,c)
USE m_types
TYPE(t_potden), INTENT(INOUT) :: vTot !
TYPE(t_potden), DIMENSION(3), INTENT(IN) :: c !global frame
vTot%mt(:,0:,:,1)=vTot%mt(:,0:,:,1)+c(3)%mt(:,0:,:,1)
vTot%mt(:,0:,:,2)=vTot%mt(:,0:,:,2)-c(3)%mt(:,0:,:,1)
vTot%mt(:,0:,:,3)=vTot%mt(:,0:,:,3)+c(1)%mt(:,0:,:,1)
vTot%mt(:,0:,:,4)=vTot%mt(:,0:,:,4)+c(2)%mt(:,0:,:,1)
vTot%pw(1:,1)=vTot%pw(1:,1)+c(3)%pw(1:,1)
vTot%pw(1:,2)=vTot%pw(1:,2)-c(3)%pw(1:,1)
vTot%pw(1:,3)=vTot%pw(1:,3)+c(1)%pw(1:,1)
vTot%pw(1:,4)=vTot%pw(1:,4)+c(2)%pw(1:,1)
vTot%vacz(1:,1:,1)=vTot%vacz(1:,1:,1)+c(3)%vacz(1:,1:,1)
vTot%vacz(1:,1:,2)=vTot%vacz(1:,1:,2)-c(3)%vacz(1:,1:,1)
vTot%vacz(1:,1:,3)=vTot%vacz(1:,1:,3)+c(1)%vacz(1:,1:,1)
vTot%vacz(1:,1:,4)=vTot%vacz(1:,1:,4)+c(2)%vacz(1:,1:,1)
vTot%vacxy(1:,1:,1:,1)=vTot%vacxy(1:,1:,1:,1)+c(3)%vacxy(1:,1:,1:,1)
vTot%vacxy(1:,1:,1:,2)=vTot%vacxy(1:,1:,1:,2)-c(3)%vacxy(1:,1:,1:,1)
vTot%vacxy(1:,1:,1:,3)=vTot%vacxy(1:,1:,1:,3)+c(1)%vacxy(1:,1:,1:,1)
vTot%vacxy(1:,1:,1:,4)=vTot%vacxy(1:,1:,1:,4)+c(2)%vacxy(1:,1:,1:,1)
END SUBROUTINE
END MODULE m_xcBfield
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