Commit ab22d622 authored by degironc's avatar degironc

Hidden dependency of incdrhoscf_nc.f90 on dpsi (passed through a module) is

made explicit passing it as an argument.
Calling routines modified accordingly.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7088 c92efa57-630b-4861-b058-cf58834340f0
parent 1ec328bf
......@@ -28,15 +28,14 @@ subroutine incdrhoscf (drhoscf, weight, ik, dbecsum, dpsi)
implicit none
! I/O variables
integer :: ik
integer, INTENT (IN) :: ik
! input: the k point
real(DP) :: weight
real(DP), INTENT (IN) :: weight
! input: the weight of the k point
complex(DP) :: dpsi (npwx,nbnd)
complex(DP), INTENT (IN) :: dpsi (npwx,nbnd)
! input: the perturbed wfc for the given k point
complex(DP) :: drhoscf (nrxxs), dbecsum (nhm*(nhm+1)/2,nat)
! output: the change of the charge densit
! inp/out: the accumulated dbec
complex(DP), INTENT (INOUT) :: drhoscf (nrxxs), dbecsum (nhm*(nhm+1)/2,nat)
! input/output: the accumulated change to the charge density and dbecsum
!
!
! here the local variable
......
......@@ -6,7 +6,7 @@
! or http://www.gnu.org/copyleft/gpl.txt .
!
!-----------------------------------------------------------------------
subroutine incdrhoscf_nc (drhoscf, weight, ik, dbecsum)
subroutine incdrhoscf_nc (drhoscf, weight, ik, dbecsum, dpsi)
!-----------------------------------------------------------------------
!
! This routine computes the change of the charge density due to the
......@@ -25,22 +25,23 @@ subroutine incdrhoscf_nc (drhoscf, weight, ik, dbecsum)
USE spin_orb, ONLY : domag
USE noncollin_module, ONLY : npol, nspin_mag
USE uspp_param,ONLY : nhm
USE wvfct, ONLY : npw, npwx, igk
USE wvfct, ONLY : npw, npwx, igk, nbnd
USE wavefunctions_module, ONLY: evc
USE qpoint, ONLY : npwq, igkq, ikks
USE eqv, ONLY : dpsi
USE control_ph, ONLY : nbnd_occ
implicit none
integer :: ik
! I/O variables
INTEGER, INTENT(IN) :: ik
! input: the k point
real(DP) :: weight
REAL(DP), INTENT(IN) :: weight
! input: the weight of the k point
complex(DP) :: drhoscf (nrxx,nspin_mag), dbecsum (nhm,nhm,nat,nspin)
! output: the change of the charge densit
! inp/out: the accumulated dbec
COMPLEX(DP), INTENT(IN) :: dpsi(npwx*npol,nbnd)
! input: the perturbed wfcs at the given k point
COMPLEX(DP), INTENT(INOUT) :: drhoscf (nrxx,nspin_mag), dbecsum (nhm,nhm,nat,nspin)
! input/output: the accumulated change of the charge density and dbecsum
!
!
! here the local variable
!
......
......@@ -262,7 +262,7 @@ subroutine solve_e
!
IF (noncolin) THEN
call incdrhoscf_nc(dvscfout(1,1,ipol),wk(ik),ik, &
dbecsum_nc(1,1,1,1,ipol))
dbecsum_nc(1,1,1,1,ipol), dpsi)
ELSE
call incdrhoscf (dvscfout(1,current_spin,ipol), wk(ik), &
ik, dbecsum(1,1,current_spin,ipol), dpsi)
......
......@@ -351,7 +351,7 @@ SUBROUTINE solve_linter (irr, imode0, npe, drhoscf)
weight = wk (ikk)
IF (noncolin) THEN
call incdrhoscf_nc(drhoscf(1,1,ipert),weight,ik, &
dbecsum_nc(1,1,1,1,ipert))
dbecsum_nc(1,1,1,1,ipert), dpsi)
ELSE
call incdrhoscf (drhoscf(1,current_spin,ipert), weight, ik, &
dbecsum(1,1,current_spin,ipert), dpsi)
......
......@@ -97,7 +97,7 @@ subroutine zstar_eu_us
call davcio (dpsi, lrdwf, iudwf, nrec, - 1)
if (noncolin) then
call incdrhoscf_nc (dvscf(1,1,jpol),weight,ik, &
dbecsum_nc(1,1,1,1,jpol))
dbecsum_nc(1,1,1,1,jpol), dpsi)
else
call incdrhoscf (dvscf(1,current_spin,jpol),weight,ik, &
dbecsum(1,1,current_spin,jpol), dpsi)
......
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