Commit 5c698212 authored by Miriam Hinzen's avatar Miriam Hinzen

Introduce Logical Variable yukawa_residual

At the moment this variable is without function. Later it will be used as a switch between the Yukawa and Coulomb cases in the potential generation.
Since the preconditioning parameter is now stored in the input file and since both the Coulomb and Yukawa potentials are generated in a calculation with preconditioner, the switch cannot simply be based on the value of the preconditioning parameter. This is quite ugly and we might want to change this somehow later.
parent 214754c9
......@@ -228,8 +228,9 @@ CONTAINS
!---< gwf
CALL timestart("generation of potential")
CALL vgen(hybrid,field,input,xcpot,DIMENSION, atoms,sphhar,stars,vacuum,&
sym,obsolete,cell, oneD,sliceplot,mpi ,results,noco,inDen,vTot,vx,vCoul)
CALL vgen( hybrid, field, input, xcpot, DIMENSION, atoms, sphhar, stars, vacuum, &
sym, obsolete, cell, oneD, sliceplot, mpi, results, noco, .false., inDen, vTot, vx, &
vCoul )
CALL timestop("generation of potential")
......
......@@ -4,7 +4,9 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_vgen
USE m_juDFT
CONTAINS
!> FLAPW potential generator
!! The full potential is generated by the following main steps:
......@@ -16,8 +18,11 @@ CONTAINS
!! TE_VCOUL : charge density-coulomb potential integral
!! TE_VEFF: charge density-effective potential integral
!! TE_EXC : charge density-ex-corr.energy density integral
SUBROUTINE vgen(hybrid,field,input,xcpot,DIMENSION, atoms,sphhar,stars,&
vacuum,sym,obsolete,cell,oneD,sliceplot,mpi, results,noco,den,vTot,vx,vCoul)
SUBROUTINE vgen( hybrid, field, input, xcpot, DIMENSION, atoms, sphhar, stars, &
vacuum, sym, obsolete, cell, oneD, sliceplot, mpi, results, noco, yukawa_residual, &
den, vTot, vx, vCoul )
USE m_rotate_int_den_to_local
USE m_bfield
USE m_vgen_coulomb
......@@ -28,28 +33,29 @@ CONTAINS
USE m_mpi_bc_potden
#endif
IMPLICIT NONE
TYPE(t_results),INTENT(INOUT) :: results
CLASS(t_xcpot),INTENT(IN) :: xcpot
TYPE(t_hybrid),INTENT(IN) :: hybrid
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_obsolete),INTENT(IN) :: obsolete
TYPE(t_sliceplot),INTENT(IN) :: sliceplot
TYPE(t_input),INTENT(IN) :: input
TYPE(t_field),INTENT(INOUT) :: field !efield can be modified
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_potden), INTENT(INOUT) :: den
TYPE(t_potden),INTENT(INOUT) :: vTot,vx,vCoul
! ..
TYPE(t_potden) :: workden,denRot
TYPE(t_results), INTENT(INOUT) :: results
CLASS(t_xcpot), INTENT(IN) :: xcpot
TYPE(t_hybrid), INTENT(IN) :: hybrid
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_obsolete), INTENT(IN) :: obsolete
TYPE(t_sliceplot), INTENT(IN) :: sliceplot
TYPE(t_input), INTENT(IN) :: input
TYPE(t_field), INTENT(INOUT) :: field !efield can be modified
TYPE(t_vacuum), INTENT(IN) :: vacuum
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
logical, intent(in) :: yukawa_residual
TYPE(t_potden), INTENT(INOUT) :: den
TYPE(t_potden), INTENT(INOUT) :: vTot,vx,vCoul
TYPE(t_potden) :: workden,denRot
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',/)
......@@ -58,41 +64,43 @@ 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))
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)
CALL workDen%init( stars, atoms, sphhar, vacuum, input%jspins, noco%l_noco, 0 )
!sum up both spins in den into workden
CALL den%sum_both_spin(workden)
CALL den%sum_both_spin( workden )
CALL vgen_coulomb(1,mpi,DIMENSION,oneD,input,field,vacuum,sym,stars,cell,sphhar,atoms,workden,vCoul,results)
CALL vgen_coulomb( 1, mpi, DIMENSION, oneD, input, field, vacuum, sym, stars, cell, &
sphhar, atoms, workden, yukawa_residual, vCoul, results )
CALL vCoul%copy_both_spin(vTot)
CALL vCoul%copy_both_spin( vTot )
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
CALL rotate_int_den_to_local(DIMENSION,sym,stars,atoms,sphhar,vacuum,cell,input,&
noco,oneD,denRot)
CALL rotate_int_den_to_local( DIMENSION, sym, stars, atoms, sphhar, vacuum, cell, input, &
noco, oneD, denRot )
ENDIF
call vgen_xcpot(hybrid,input,xcpot,DIMENSION, atoms,sphhar,stars,&
vacuum,sym, obsolete,cell,oneD,sliceplot,mpi,noco,den,denRot,vTot,vx,results)
call vgen_xcpot( hybrid, input, xcpot, DIMENSION, atoms, sphhar, stars, &
vacuum, sym, obsolete, cell, oneD, sliceplot, mpi, noco, den, denRot, vTot, vx, results )
!ToDo, check if this is needed for more potentials as well...
CALL vgen_finalize(atoms,stars,vacuum,sym,noco,input,vTot,denRot)
DEALLOCATE(vcoul%pw_w,vx%pw_w)
CALL vgen_finalize( atoms, stars, vacuum, sym, noco, input, vTot, denRot )
DEALLOCATE( vcoul%pw_w, vx%pw_w )
CALL bfield(input,noco,atoms,field,vTot)
CALL bfield( input, noco, atoms, field, vTot )
! broadcast potentials
#ifdef CPP_MPI
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,vTot)
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,vCoul)
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,vx)
CALL mpi_bc_potden( mpi, stars, sphhar, atoms, input, vacuum, oneD, noco, vTot )
CALL mpi_bc_potden( mpi, stars, sphhar, atoms, input, vacuum, oneD, noco, vCoul )
CALL mpi_bc_potden( mpi, stars, sphhar, atoms, input, vacuum, oneD, noco, vx )
#endif
END SUBROUTINE vgen
END MODULE m_vgen
......@@ -160,7 +160,8 @@ SUBROUTINE rdmft(eig_id,mpi,input,kpts,banddos,cell,atoms,enpara,stars,vacuum,di
! Calculate Coulomb potential for overall density (+including external potential)
CALL overallDen%sum_both_spin()!workden)
CALL overallVCoul%resetPotDen()
CALL vgen_coulomb(1,mpi,DIMENSION,oneD,input,field,vacuum,sym,stars,cell,sphhar,atoms,overallDen,overallVCoul)
CALL vgen_coulomb( 1, mpi, DIMENSION, oneD, input, field, vacuum, sym, stars, cell, &
sphhar, atoms, overallDen, .false., overallVCoul )
CALL convol(stars, overallVCoul%pw_w(:,1), overallVCoul%pw(:,1), stars%ufft) ! Is there a problem with a second spin?!
#ifdef CPP_MPI
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,overallVCoul)
......
......@@ -71,7 +71,7 @@ CONTAINS
CALL psqpw(mpi,&
atoms_tmp,sphhar,stars,vacuum,&
DIMENSION,cell,input,sym,oneD,&
qpw,rho,(/0.,0./),.TRUE.,psq)
qpw,rho,(/0.,0./),.TRUE.,.false.,psq)
!put pseudo charge on real-space grid
!use v_pot for imaginary part
......
......@@ -10,37 +10,35 @@ MODULE m_mpmom
! qlm (m,l,n) : (output) difference of the former quantities
!
! ***********************************************************
CONTAINS
SUBROUTINE mpmom(mpi,atoms,sphhar,stars,sym,cell,oneD,qpw,rho,qlm)
SUBROUTINE mpmom( mpi, atoms, sphhar, stars, sym, cell, oneD, qpw, rho, yukawa_residual, qlm )
USE m_types
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
! .. Array Arguments ..
REAL, INTENT (IN) :: rho(:,0:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT (IN) :: qpw(:) !(stars%ng3)
COMPLEX, INTENT (OUT):: qlm(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
! .. Local Scalars ..
INTEGER j,jm,lh ,mb,mem,mems,n,nd ,l,nat,m
! .. Local Arrays ..
COMPLEX qlmo(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
COMPLEX qlmp(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
REAL, INTENT(IN) :: rho(:,0:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(IN) :: qpw(:) !(stars%ng3)
logical, intent(in) :: yukawa_residual
COMPLEX, INTENT (OUT) :: qlm(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
INTEGER :: j, jm, lh, mb, mem, mems, n, nd, l, nat, m
COMPLEX :: qlmo(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
COMPLEX :: qlmp(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
! multipole moments of original charge (q_{lm}^i)
IF (mpi%irank == 0) THEN
CALL mt_moments(atoms,sphhar,rho(:,:,:),qlmo)
CALL mt_moments( atoms, sphhar, rho(:,:,:), yukawa_residual, qlmo )
ENDIF ! mpi%irank == 0
CALL pw_moments(mpi,stars,atoms,cell,sym,oneD,qpw(:),qlmp)
CALL pw_moments( mpi, stars, atoms, cell, sym, oneD, qpw(:), yukawa_residual, qlmp )
! eq.(15): \tilde q_(lm}^i = q_{lm}^i - q_{lm}^{Ii}
IF (mpi%irank == 0) THEN
......@@ -72,20 +70,25 @@ CONTAINS
END SUBROUTINE mpmom
SUBROUTINE mt_moments(atoms,sphhar,rho,qlmo)
SUBROUTINE mt_moments( atoms, sphhar, rho, yukawa_residual, qlmo )
!multipole moments of original charge (q_{lm}^i)
USE m_intgr, ONLY : intgr3
USE m_constants,ONLY:sfp_const
USE m_types
use m_DoubleFactorial
use m_SphBessel
IMPLICIT NONE
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
REAL,INTENT(IN) :: rho(: ,0:, :)
COMPLEX,INTENT(OUT)::qlmo(-atoms%lmaxd:,0:,:)
INTEGER :: n,ns,jm,nl,l,j,mb ,m,nat
REAL :: fint
REAL f(MAXVAL(atoms%jri))
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
REAL, INTENT(IN) :: rho(: ,0:, :)
logical, intent(in) :: yukawa_residual
COMPLEX, INTENT(OUT) :: qlmo(-atoms%lmaxd:,0:,:)
INTEGER :: n, ns, jm, nl, l, j, mb, m, nat
REAL :: fint
REAL :: f(MAXVAL(atoms%jri))
qlmo=0.0
nat = 1
......@@ -106,37 +109,43 @@ CONTAINS
qlmo(0,0,n) = qlmo(0,0,n) - atoms%zatom(n)/sfp_const
nat = nat + atoms%neq(n)
ENDDO
END SUBROUTINE mt_moments
SUBROUTINE pw_moments(mpi,stars,atoms,cell,sym,oneD,qpw_in,qlmp_out)
SUBROUTINE pw_moments( mpi, stars, atoms, cell, sym, oneD, qpw_in, yukawa_residual, qlmp_out )
!multipole moments of plane wave charge inside the spheres (q_{lm}^{Ii})
USE m_phasy1
USE m_sphbes
USE m_od_phasy
USE m_constants,ONLY:sfp_const
USE m_types
use m_DoubleFactorial
use m_SphBessel
IMPLICIT NONE
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_atoms),INTENT(IN) :: atoms
COMPLEX,INTENT(IN) :: qpw_in(:)
COMPLEX,INTENT(OUT):: qlmp_out(-atoms%lmaxd:,0:,:)
!locals
INTEGER:: n,k,l,ll1 ,lm,ierr(3),m
COMPLEX sk3i,cil,nqpw
COMPLEX pylm( (MAXVAL(atoms%lmax)+1)**2 ,atoms%ntype )
REAL::sk3r,rl3
REAL aj(0:MAXVAL(atoms%lmax)+1)
COMPLEX :: qpw(stars%ng3)
LOGICAL :: od
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_atoms), INTENT(IN) :: atoms
COMPLEX, INTENT(IN) :: qpw_in(:)
logical, intent(in) :: yukawa_residual
COMPLEX, INTENT(OUT) :: qlmp_out(-atoms%lmaxd:,0:,:)
INTEGER :: n, k, l, ll1, lm, ierr(3), m
COMPLEX :: sk3i, cil, nqpw
COMPLEX :: pylm(( MAXVAL(atoms%lmax) + 1 ) ** 2, atoms%ntype)
REAL :: sk3r, rl3
REAL :: aj(0:MAXVAL(atoms%lmax)+1)
COMPLEX :: qpw(stars%ng3)
LOGICAL :: od
#ifdef CPP_MPI
INCLUDE 'mpif.h'
#endif
COMPLEX qlmp(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
COMPLEX :: qlmp(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
qpw=qpw_in(:stars%ng3)
qlmp= 0.0
......@@ -190,4 +199,5 @@ CONTAINS
#endif
END SUBROUTINE pw_moments
END MODULE m_mpmom
......@@ -9,13 +9,12 @@ MODULE m_psqpw
!
! parallelized 04/08 gb
! ***********************************************************
CONTAINS
SUBROUTINE psqpw(mpi,&
& atoms,sphhar,stars,vacuum,&
& DIMENSION,cell,input,sym,oneD,&
& qpw,rho,rht,l_xyav,&
& psq)
!
SUBROUTINE psqpw( mpi, atoms, sphhar, stars, vacuum, DIMENSION, cell, input, sym, oneD, &
& qpw, rho, rht, l_xyav, yukawa_residual, psq )
#include"cpp_double.h"
USE m_constants
USE m_phasy1
......@@ -25,57 +24,44 @@ CONTAINS
USE m_od_phasy
USE m_od_cylbes
USE m_types
use m_DoubleFactorial
use m_SphBessel
IMPLICIT NONE
! ..
! .. Scalar Arguments ..
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_oneD),INTENT(IN) :: oneD
LOGICAL, INTENT (IN) :: l_xyav
! ..
! .. Array Arguments ..
COMPLEX, INTENT (IN) :: qpw(stars%ng3)
REAL, INTENT (IN) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
REAL, INTENT (IN) :: rht(vacuum%nmzd,2)
COMPLEX, INTENT (OUT):: psq(stars%ng3)
!-odim
!+odim
! ..
! .. Local Scalars ..
COMPLEX psint,sa,sl,sm
REAL f,fact,fpo,gz,p,qvac,rmtl,s,fJ,gr,g
INTEGER ivac,k,l ,n,n1,nc,ncvn,lm,ll1 ,nd,m,nz
! ..
! .. Local Arrays ..
COMPLEX pylm( (atoms%lmaxd+1)**2 ,atoms%ntype )
COMPLEX qlm(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
REAL q2(vacuum%nmzd),pn(0:atoms%lmaxd,atoms%ntype),aj(0:atoms%lmaxd+DIMENSION%ncvd+1)
REAL rht1(vacuum%nmz)
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_vacuum), INTENT(IN) :: vacuum
TYPE(t_dimension), INTENT(IN) :: DIMENSION
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_input), INTENT(IN) :: input
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_oneD), INTENT(IN) :: oneD
LOGICAL, INTENT(IN) :: l_xyav
COMPLEX, INTENT(IN) :: qpw(stars%ng3)
REAL, INTENT(IN) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
REAL, INTENT(IN) :: rht(vacuum%nmzd,2)
logical, intent(in) :: yukawa_residual
COMPLEX, INTENT(OUT) :: psq(stars%ng3)
COMPLEX :: psint, sa, sl, sm
REAL :: f, fact, fpo, gz, p, qvac, rmtl, s, fJ, gr, g
INTEGER :: ivac, k, l, n, n1, nc, ncvn, lm, ll1, nd, m, nz
COMPLEX :: pylm(( atoms%lmaxd + 1 ) ** 2, atoms%ntype)
COMPLEX :: qlm(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
REAL :: q2(vacuum%nmzd)
real :: pn(0:atoms%lmaxd,atoms%ntype)
real :: aj(0:atoms%lmaxd+DIMENSION%ncvd+1)
REAL :: rht1(vacuum%nmz)
#ifdef CPP_MPI
INCLUDE 'mpif.h'
INTEGER ierr(3)
COMPLEX, ALLOCATABLE :: c_b(:)
INTEGER :: ierr(3)
COMPLEX, ALLOCATABLE :: c_b(:)
#endif
! ..
!
! Calculate multipole moments
!
CALL mpmom(mpi,&
& atoms,sphhar,stars,&
& sym,cell,oneD,&
& qpw,rho,&
& qlm)
CALL mpmom( mpi, atoms, sphhar, stars, sym, cell, oneD, qpw, rho, yukawa_residual, qlm )
#ifdef CPP_MPI
psq(:) = CMPLX(0.0,0.0)
CALL MPI_BCAST(qpw,size(qpw),CPP_MPI_COMPLEX,0,mpi%mpi_comm,ierr)
......@@ -234,5 +220,7 @@ CONTAINS
& ,5x,2f11.6)
!
ENDIF ! mpi%irank == 0
END SUBROUTINE psqpw
END MODULE m_psqpw
This diff is collapsed.
......@@ -4,11 +4,10 @@ MODULE m_vmts
! cients of the coulomb potential for all atom types *
! c.l.fu, r.podloucky *
! *******************************************************************
CONTAINS
SUBROUTINE vmts(mpi,stars,sphhar,atoms,&
& sym,cell,oneD,&
& vpw,rho,&
& vr)
SUBROUTINE vmts( mpi, stars, sphhar, atoms, sym, cell, oneD, vpw, rho, yukawa_residual, vr )
#include"cpp_double.h"
USE m_constants
......@@ -17,38 +16,33 @@ CONTAINS
USE m_phasy1
USE m_sphbes
USE m_od_phasy
use m_SphBessel
IMPLICIT NONE
! .. Scalar Arguments ...
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_oneD),INTENT(IN) :: oneD
! .. Array Arguments ..
COMPLEX, INTENT (IN) :: vpw(:)!(stars%ng3,input%jspins)
REAL, INTENT (IN) :: rho(:,0:,:)!(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
REAL, INTENT (OUT):: vr(:,0:,:)!(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
! .. Local Scalars ..
COMPLEX cp,sm
REAL rmt2l,rmtl,ror,rr,rrlr,fpl21
INTEGER i,jm,k,l,l21,lh ,n,nd ,lm,n1,nat,m
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_oneD), INTENT(IN) :: oneD
COMPLEX, INTENT(IN) :: vpw(:)!(stars%ng3,input%jspins)
REAL, INTENT(IN) :: rho(:,0:,:)!(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
logical, intent(in) :: yukawa_residual
REAL, INTENT(OUT) :: vr(:,0:,:)!(atoms%jmtd,0:sphhar%nlhd,atoms%ntype)
! .. Local Arrays ..
COMPLEX vtl(0:sphhar%nlhd,atoms%ntype)
COMPLEX :: cp, sm
REAL :: rmt2l, rmtl, ror, rr, rrlr, fpl21
INTEGER :: i, jm, k, l, l21, lh, n, nd, lm, n1, nat, m
COMPLEX :: vtl(0:sphhar%nlhd,atoms%ntype)
!$ COMPLEX vtl_loc(0:sphhar%nlhd,atoms%ntype)
COMPLEX pylm( (atoms%lmaxd+1)**2 ,atoms%ntype )
REAL f1r(atoms%jmtd),f2r(atoms%jmtd),x1r(atoms%jmtd),x2r(atoms%jmtd)
REAL sbf(0:atoms%lmaxd),rrl(atoms%jmtd),rrl1(atoms%jmtd)
COMPLEX :: pylm(( atoms%lmaxd + 1 ) ** 2, atoms%ntype)
REAL :: f1r(atoms%jmtd),f2r(atoms%jmtd),x1r(atoms%jmtd),x2r(atoms%jmtd)
REAL :: sbf(0:atoms%lmaxd),rrl(atoms%jmtd),rrl1(atoms%jmtd)
#ifdef CPP_MPI
INCLUDE 'mpif.h'
INTEGER ierr(3)
COMPLEX, ALLOCATABLE :: c_b(:)
INTEGER :: ierr(3)
COMPLEX, ALLOCATABLE :: c_b(:)
! .. External Subroutines
EXTERNAL MPI_REDUCE
......
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