Commit 81a9df5d authored by Daniel Wortmann's avatar Daniel Wortmann

Modification of stars datatype. Lots of variables have been removed.

parent 93eb7e6a
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
LOGICAL,INTENT (IN) :: l_st LOGICAL,INTENT (IN) :: l_st
! .. ! ..
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX,INTENT (INOUT) :: qpw(stars%n3d,DIMENSION%jspd) COMPLEX,INTENT (INOUT) :: qpw(stars%ng3,DIMENSION%jspd)
COMPLEX,INTENT (INOUT) :: rhtxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,DIMENSION%jspd) COMPLEX,INTENT (INOUT) :: rhtxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,DIMENSION%jspd)
REAL, INTENT (INOUT) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,DIMENSION%jspd) REAL, INTENT (INOUT) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,DIMENSION%jspd)
REAL, INTENT (INOUT) :: rht(vacuum%nmzd,2,DIMENSION%jspd) REAL, INTENT (INOUT) :: rht(vacuum%nmzd,2,DIMENSION%jspd)
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
! !
ci = CMPLX(0.0,1.0) ci = CMPLX(0.0,1.0)
ALLOCATE (qpwc(stars%n3d)) ALLOCATE (qpwc(stars%ng3))
! !
!----> prepare local array to store pw-expansion of pseudo core charge !----> prepare local array to store pw-expansion of pseudo core charge
! !
...@@ -500,18 +500,18 @@ ...@@ -500,18 +500,18 @@
type(t_cell) ,intent(in) :: cell type(t_cell) ,intent(in) :: cell
type(t_oneD) ,intent(in) :: oneD type(t_oneD) ,intent(in) :: oneD
type(t_sym) ,intent(in) :: sym type(t_sym) ,intent(in) :: sym
complex ,intent(out) :: qpwc(stars%n3d) complex ,intent(out) :: qpwc(stars%ng3)
! ..Local variables ! ..Local variables
integer nat1, n, n_out_p, k integer nat1, n, n_out_p, k
complex czero complex czero
! ..Local arrays ! ..Local arrays
real :: qf(stars%n3d) real :: qf(stars%ng3)
complex qpwc_at(stars%n3d) complex qpwc_at(stars%ng3)
#ifdef CPP_MPI #ifdef CPP_MPI
external mpi_bcast external mpi_bcast
complex :: qpwc_loc(stars%n3d) complex :: qpwc_loc(stars%ng3)
integer :: ierr integer :: ierr
#include "cpp_double.h" #include "cpp_double.h"
include "mpif.h" include "mpif.h"
...@@ -519,11 +519,11 @@ ...@@ -519,11 +519,11 @@
czero = (0.0,0.0) czero = (0.0,0.0)
#ifdef CPP_MPI #ifdef CPP_MPI
DO k = 1 , stars%n3d DO k = 1 , stars%ng3
qpwc_loc(k) = czero qpwc_loc(k) = czero
ENDDO ENDDO
#endif #endif
DO k = 1 , stars%n3d DO k = 1 , stars%ng3
qpwc(k) = czero qpwc(k) = czero
ENDDO ENDDO
...@@ -554,11 +554,11 @@ ...@@ -554,11 +554,11 @@
atoms%neq(n),atoms%nat,atoms%taual,& atoms%neq(n),atoms%nat,atoms%taual,&
cell,qf,qpwc_at) cell,qf,qpwc_at)
#ifdef CPP_MPI #ifdef CPP_MPI
DO k = 1, stars%n3d DO k = 1, stars%ng3
qpwc_loc(k) = qpwc_loc(k) + qpwc_at(k) qpwc_loc(k) = qpwc_loc(k) + qpwc_at(k)
END DO END DO
#else #else
DO k = 1 , stars%n3d DO k = 1 , stars%ng3
qpwc(k) = qpwc(k) + qpwc_at(k) qpwc(k) = qpwc(k) + qpwc_at(k)
END DO END DO
#endif #endif
...@@ -566,7 +566,7 @@ ...@@ -566,7 +566,7 @@
END IF END IF
ENDDO ENDDO
#ifdef CPP_MPI #ifdef CPP_MPI
CALL mpi_allreduce(qpwc_loc,qpwc,stars%n3d,CPP_MPI_COMPLEX,mpi_sum, & CALL mpi_allreduce(qpwc_loc,qpwc,stars%ng3,CPP_MPI_COMPLEX,mpi_sum, &
mpi%mpi_comm,ierr) mpi%mpi_comm,ierr)
#endif #endif
...@@ -590,8 +590,8 @@ ...@@ -590,8 +590,8 @@
integer ,intent(in) :: neq,natd integer ,intent(in) :: neq,natd
real ,intent(in) :: taual(3,natd) real ,intent(in) :: taual(3,natd)
type(t_cell) ,intent(in) :: cell type(t_cell) ,intent(in) :: cell
real ,intent(in) :: qf(stars%n3d) real ,intent(in) :: qf(stars%ng3)
complex ,intent(out) :: qpwc_at(stars%n3d) complex ,intent(out) :: qpwc_at(stars%ng3)
! ..Local variables ! ..Local variables
integer k, nat2, nat, j integer k, nat2, nat, j
...@@ -605,7 +605,7 @@ ...@@ -605,7 +605,7 @@
complex phaso(oneD%ods%nop) complex phaso(oneD%ods%nop)
czero = (0.0,0.0) czero = (0.0,0.0)
DO k = 1 , stars%n3d DO k = 1 , stars%ng3
qpwc_at(k) = czero qpwc_at(k) = czero
ENDDO ENDDO
...@@ -688,7 +688,7 @@ ...@@ -688,7 +688,7 @@
type(t_stars) ,intent(in) :: stars type(t_stars) ,intent(in) :: stars
type(t_cell) ,intent(in) :: cell type(t_cell) ,intent(in) :: cell
real ,intent(in) :: acoff real ,intent(in) :: acoff
real ,intent(out) :: qf(stars%n3d) real ,intent(out) :: qf(stars%ng3)
! ..Local variables ! ..Local variables
...@@ -700,7 +700,7 @@ ...@@ -700,7 +700,7 @@
real rhohelp(DIMENSION%msh) real rhohelp(DIMENSION%msh)
zero = 0.0 zero = 0.0
DO k = 1,stars%n3d DO k = 1,stars%ng3
qf(k) = 0.0 qf(k) = 0.0
END DO END DO
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
REAL, INTENT (OUT):: qtot,qistot REAL, INTENT (OUT):: qtot,qistot
! .. ! ..
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX, INTENT (IN) :: qpw(stars%n3d,input%jspins) COMPLEX, INTENT (IN) :: qpw(stars%ng3,input%jspins)
REAL, INTENT (IN) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,input%jspins) REAL, INTENT (IN) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,input%jspins)
REAL, INTENT (IN) :: rht(vacuum%nmzd,2,input%jspins) REAL, INTENT (IN) :: rht(vacuum%nmzd,2,input%jspins)
!-odim !-odim
......
...@@ -111,13 +111,13 @@ CONTAINS ...@@ -111,13 +111,13 @@ CONTAINS
INTEGER, INTENT (IN) :: eig_id,jspin INTEGER, INTENT (IN) :: eig_id,jspin
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX, INTENT(INOUT) :: qpw(stars%n3d,dimension%jspd) COMPLEX, INTENT(INOUT) :: qpw(stars%ng3,dimension%jspd)
COMPLEX, INTENT(INOUT) :: rhtxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,dimension%jspd) COMPLEX, INTENT(INOUT) :: rhtxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,dimension%jspd)
COMPLEX, INTENT(INOUT) :: cdom(stars%n3d) COMPLEX, INTENT(INOUT) :: cdom(stars%ng3)
COMPLEX, INTENT(INOUT) :: cdomvz(vacuum%nmzd,2) COMPLEX, INTENT(INOUT) :: cdomvz(vacuum%nmzd,2)
COMPLEX, INTENT(INOUT) :: cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2) COMPLEX, INTENT(INOUT) :: cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2)
COMPLEX, INTENT(INOUT) :: qa21(atoms%ntype) COMPLEX, INTENT(INOUT) :: qa21(atoms%ntype)
INTEGER, INTENT (IN) :: igq_fft(0:stars%kq1d*stars%kq2d*stars%kq3d-1) INTEGER, INTENT (IN) :: igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1)
REAL, INTENT (IN) :: vz(vacuum%nmzd,2) REAL, INTENT (IN) :: vz(vacuum%nmzd,2)
REAL, INTENT (IN) :: vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) REAL, INTENT (IN) :: vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd)
REAL, INTENT (OUT) :: chmom(atoms%ntype,dimension%jspd),clmom(3,atoms%ntype,dimension%jspd) REAL, INTENT (OUT) :: chmom(atoms%ntype,dimension%jspd),clmom(3,atoms%ntype,dimension%jspd)
......
...@@ -28,7 +28,7 @@ CONTAINS ...@@ -28,7 +28,7 @@ CONTAINS
TYPE(t_stars),INTENT(IN) :: stars TYPE(t_stars),INTENT(IN) :: stars
! !
! !
INTEGER igq2_fft(0:stars%kq1d*stars%kq2d-1),igq_fft(0:stars%kq1d*stars%kq2d*stars%kq3d-1) INTEGER igq2_fft(0:stars%kq1_fft*stars%kq2_fft-1),igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1)
! !
!---> local variables !---> local variables
! !
...@@ -106,13 +106,6 @@ CONTAINS ...@@ -106,13 +106,6 @@ CONTAINS
CALL juDFT_error("something wrong with stars or nq3_fft"& CALL juDFT_error("something wrong with stars or nq3_fft"&
& ,calledby ="prp_qfft_map") & ,calledby ="prp_qfft_map")
ENDIF ENDIF
IF (input%film.AND.(kid2x .NE. stars%kmxq2_fft).AND.(stars%kmxq2_fft.NE.0)) THEN
WRITE (6,'('' something wrong with stars%kmxq2_fft or nq2_fft'')')
WRITE (6,'('' stars%kmxq2_fft, acutal kid2x '',2i5)') &
& stars%kmxq2_fft, kid2x
CALL juDFT_error("something wrong with stars or nq2_fft"&
& ,calledby ="prp_qfft_map")
ENDIF
END SUBROUTINE prp_qfft_map END SUBROUTINE prp_qfft_map
END MODULE m_prpqfftmap END MODULE m_prpqfftmap
...@@ -92,7 +92,7 @@ CONTAINS ...@@ -92,7 +92,7 @@ CONTAINS
TYPE(t_atoms),INTENT(IN) :: atoms TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_zMat),INTENT(IN) :: zMat TYPE(t_zMat),INTENT(IN) :: zMat
INTEGER, INTENT (IN) :: igq_fft(0:stars%kq1d*stars%kq2d*stars%kq3d-1) INTEGER, INTENT (IN) :: igq_fft(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1)
REAL,INTENT(IN) :: we(:) !(nobd) REAL,INTENT(IN) :: we(:) !(nobd)
REAL,INTENT(IN) :: eig(:)!(dimension%neigd) REAL,INTENT(IN) :: eig(:)!(dimension%neigd)
REAL,INTENT(IN) :: bkpt(3) REAL,INTENT(IN) :: bkpt(3)
...@@ -100,8 +100,8 @@ CONTAINS ...@@ -100,8 +100,8 @@ CONTAINS
INTEGER,INTENT(IN):: ne INTEGER,INTENT(IN):: ne
!-----> CHARGE DENSITY INFORMATION !-----> CHARGE DENSITY INFORMATION
INTEGER,INTENT(IN) :: ikpt,jspin INTEGER,INTENT(IN) :: ikpt,jspin
COMPLEX,INTENT(INOUT) :: qpw(:,:) !(stars%n3d,dimension%jspd) COMPLEX,INTENT(INOUT) :: qpw(:,:) !(stars%ng3,dimension%jspd)
COMPLEX,INTENT(INOUT) :: cdom(:)!(stars%n3d) COMPLEX,INTENT(INOUT) :: cdom(:)!(stars%ng3)
REAL,INTENT(OUT) :: qis(:,:,:) !(dimension%neigd,kpts%nkpt,dimension%jspd) REAL,INTENT(OUT) :: qis(:,:,:) !(dimension%neigd,kpts%nkpt,dimension%jspd)
COMPLEX, INTENT (INOUT) :: f_b8(3,atoms%ntype) COMPLEX, INTENT (INOUT) :: f_b8(3,atoms%ntype)
REAL, INTENT (INOUT) :: forces(:,:,:) !(3,atoms%ntype,dimension%jspd) REAL, INTENT (INOUT) :: forces(:,:,:) !(3,atoms%ntype,dimension%jspd)
...@@ -121,7 +121,7 @@ CONTAINS ...@@ -121,7 +121,7 @@ CONTAINS
REAL,PARAMETER:: zero = 0.00, tol_3=1.0e-3 REAL,PARAMETER:: zero = 0.00, tol_3=1.0e-3
! !
INTEGER iv1d(SIZE(lapw%k1,1),input%jspins) INTEGER iv1d(SIZE(lapw%k1,1),input%jspins)
REAL wtf(ne),wsave(stars%kq3d+15) REAL wtf(ne),wsave(stars%kq3_fft+15)
REAL, ALLOCATABLE :: psir(:),psii(:),rhon(:) REAL, ALLOCATABLE :: psir(:),psii(:),rhon(:)
REAL, ALLOCATABLE :: psi1r(:),psi1i(:),psi2r(:),psi2i(:) REAL, ALLOCATABLE :: psi1r(:),psi1i(:),psi2r(:),psi2i(:)
REAL, ALLOCATABLE :: rhomat(:,:) REAL, ALLOCATABLE :: rhomat(:,:)
...@@ -177,29 +177,29 @@ CONTAINS ...@@ -177,29 +177,29 @@ CONTAINS
! !
ALLOCATE(cwk(stars%n3d),ecwk(stars%n3d)) ALLOCATE(cwk(stars%ng3),ecwk(stars%ng3))
IF (noco%l_noco) THEN IF (noco%l_noco) THEN
ALLOCATE ( psi1r(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& ALLOCATE ( psi1r(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
psi1i(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& psi1i(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
psi2r(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& psi2r(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
psi2i(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& psi2i(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
rhomat(0:stars%kq1d*stars%kq2d*stars%kq3d-1,4) ) rhomat(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1,4) )
ELSE ELSE
IF (zmat%l_real) THEN IF (zmat%l_real) THEN
ALLOCATE ( psir(-stars%kq1d*stars%kq2d:2*stars%kq1d*stars%kq2d*(stars%kq3d+1)-1),& ALLOCATE ( psir(-stars%kq1_fft*stars%kq2_fft:2*stars%kq1_fft*stars%kq2_fft*(stars%kq3_fft+1)-1),&
psii(1),& psii(1),&
rhon(-stars%kq1d*stars%kq2d:stars%kq1d*stars%kq2d*(stars%kq3d+1)-1) ) rhon(-stars%kq1_fft*stars%kq2_fft:stars%kq1_fft*stars%kq2_fft*(stars%kq3_fft+1)-1) )
IF (input%l_f) ALLOCATE ( kpsii(1),& IF (input%l_f) ALLOCATE ( kpsii(1),&
kpsir(-stars%kq1d*stars%kq2d:2*stars%kq1d*stars%kq2d*(stars%kq3d+1)-1),& kpsir(-stars%kq1_fft*stars%kq2_fft:2*stars%kq1_fft*stars%kq2_fft*(stars%kq3_fft+1)-1),&
ekin(-stars%kq1d*stars%kq2d:2*stars%kq1d*stars%kq2d*(stars%kq3d+1)-1)) ekin(-stars%kq1_fft*stars%kq2_fft:2*stars%kq1_fft*stars%kq2_fft*(stars%kq3_fft+1)-1))
ELSE ELSE
ALLOCATE ( psir(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& ALLOCATE ( psir(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
psii(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& psii(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
rhon(0:stars%kq1d*stars%kq2d*stars%kq3d-1) ) rhon(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1) )
IF (input%l_f) ALLOCATE ( kpsir(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& IF (input%l_f) ALLOCATE ( kpsir(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
kpsii(0:stars%kq1d*stars%kq2d*stars%kq3d-1),& kpsii(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1),&
ekin(0:stars%kq1d*stars%kq2d*stars%kq3d-1) ) ekin(0:stars%kq1_fft*stars%kq2_fft*stars%kq3_fft-1) )
ENDIF ENDIF
ENDIF ENDIF
! !
...@@ -211,8 +211,8 @@ CONTAINS ...@@ -211,8 +211,8 @@ CONTAINS
ifftq1 = stars%kq1_fft ifftq1 = stars%kq1_fft
ifftq2 = stars%kq1_fft*stars%kq2_fft ifftq2 = stars%kq1_fft*stars%kq2_fft
ifftq3 = stars%kq1_fft*stars%kq2_fft*stars%kq3_fft ifftq3 = stars%kq1_fft*stars%kq2_fft*stars%kq3_fft
ifftq3d = stars%kq1d*stars%kq2d*stars%kq3d ifftq3d = stars%kq1_fft*stars%kq2_fft*stars%kq3_fft
ifftq2d = stars%kq1d*stars%kq2d ifftq2d = stars%kq1_fft*stars%kq2_fft
! !
nw1=NINT(stars%kq1_fft/4.+0.3) nw1=NINT(stars%kq1_fft/4.+0.3)
nw2=NINT(stars%kq2_fft/4.+0.3) nw2=NINT(stars%kq2_fft/4.+0.3)
......
...@@ -47,7 +47,7 @@ CONTAINS ...@@ -47,7 +47,7 @@ CONTAINS
! !
! ----> g=0 star ! ----> g=0 star
! !
ALLOCATE ( stfunint(stars%n3d,nsl), z_z(stars%n3d) ) ALLOCATE ( stfunint(stars%ng3,nsl), z_z(stars%ng3) )
! !
! -----> calculate the integrals of star functions over ! -----> calculate the integrals of star functions over
! the layer interstitial ! the layer interstitial
......
...@@ -38,7 +38,7 @@ CONTAINS ...@@ -38,7 +38,7 @@ CONTAINS
INTEGER, INTENT (IN) :: jspin,l_cutoff INTEGER, INTENT (IN) :: jspin,l_cutoff
! .. ! ..
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX, INTENT (IN) :: qpwc(stars%n3d) COMPLEX, INTENT (IN) :: qpwc(stars%ng3)
REAL, INTENT (INOUT) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) REAL, INTENT (INOUT) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd)
!-odim !-odim
!+odim !+odim
...@@ -125,7 +125,7 @@ CONTAINS ...@@ -125,7 +125,7 @@ CONTAINS
CALL phasy1(atoms,stars,sym,cell,k,pylm) CALL phasy1(atoms,stars,sym,cell,k,pylm)
ELSE ELSE
!-odim !-odim
CALL od_phasy(atoms%ntype,stars%n3d,atoms%nat,atoms%lmaxd,atoms%ntype,atoms%neq,atoms%lmax,& CALL od_phasy(atoms%ntype,stars%ng3,atoms%nat,atoms%lmaxd,atoms%ntype,atoms%neq,atoms%lmax,&
atoms%taual,cell%bmat,stars%kv3,k,oneD%odi,oneD%ods,pylm) !keep atoms%taual,cell%bmat,stars%kv3,k,oneD%odi,oneD%ods,pylm) !keep
!+odim !+odim
END IF END IF
......
...@@ -931,7 +931,7 @@ CONTAINS ...@@ -931,7 +931,7 @@ CONTAINS
m3 = m-m1 m3 = m-m1
IF (m3.EQ.0 .AND. i3.EQ.0) CYCLE mprimee IF (m3.EQ.0 .AND. i3.EQ.0) CYCLE mprimee
IF (iabs(m3).GT.oneD%odi%M) CYCLE mprimee IF (iabs(m3).GT.oneD%odi%M) CYCLE mprimee
IF (iabs(i3).GT.stars%k3d) CYCLE lprimee IF (iabs(i3).GT.stars%mx3) CYCLE lprimee
ind1 = oneD%odi%ig(i3,m3) ind1 = oneD%odi%ig(i3,m3)
ind1p = oneD%odi%ig(-i3,-m3) ind1p = oneD%odi%ig(-i3,-m3)
IF (ind1.NE.0 .OR. ind1p.NE.0) THEN IF (ind1.NE.0 .OR. ind1p.NE.0) THEN
...@@ -1011,7 +1011,7 @@ CONTAINS ...@@ -1011,7 +1011,7 @@ CONTAINS
i3 = kvac3(l,1) - kvac3(l1,2) i3 = kvac3(l,1) - kvac3(l1,2)
m3 = m-m1 m3 = m-m1
IF (iabs(m3).GT.oneD%odi%M) CYCLE mprimea IF (iabs(m3).GT.oneD%odi%M) CYCLE mprimea
IF (iabs(i3).GT.stars%k3d) CYCLE lprimea IF (iabs(i3).GT.stars%mx3) CYCLE lprimea
ind1 = oneD%odi%ig(i3,m3) ind1 = oneD%odi%ig(i3,m3)
IF (ind1.NE.0) THEN IF (ind1.NE.0) THEN
IF (m3.EQ.0 .AND. i3.EQ.0) THEN IF (m3.EQ.0 .AND. i3.EQ.0) THEN
...@@ -1124,7 +1124,7 @@ CONTAINS ...@@ -1124,7 +1124,7 @@ CONTAINS
m3 = m-m1 m3 = m-m1
IF (m3.EQ.0 .AND. i3.EQ.0) CYCLE mprime IF (m3.EQ.0 .AND. i3.EQ.0) CYCLE mprime
IF (iabs(m3).GT.oneD%odi%M) CYCLE mprime IF (iabs(m3).GT.oneD%odi%M) CYCLE mprime
IF (iabs(i3).GT.stars%k3d) CYCLE lprime IF (iabs(i3).GT.stars%mx3) CYCLE lprime
ind1 = oneD%odi%ig(i3,m3) ind1 = oneD%odi%ig(i3,m3)
ind1p = oneD%odi%ig(-i3,-m3) ind1p = oneD%odi%ig(-i3,-m3)
IF (ind1.NE.0 .OR. ind1p.NE.0) THEN IF (ind1.NE.0 .OR. ind1p.NE.0) THEN
......
...@@ -91,8 +91,8 @@ CONTAINS ...@@ -91,8 +91,8 @@ CONTAINS
! !
! Write info on 2D-starfunctions ! Write info on 2D-starfunctions
WRITE (87,'(i2,1x,i2,1x,i2)') stars%mx1,stars%mx2, stars%n2d WRITE (87,'(i2,1x,i2,1x,i2)') stars%mx1,stars%mx2, stars%ng2
DO i=1, stars%n2d DO i=1, stars%ng2
WRITE (87,'(i2)') stars%nstr2(i) WRITE (87,'(i2)') stars%nstr2(i)
END DO END DO
DO i=-stars%mx1, stars%mx1 DO i=-stars%mx1, stars%mx1
......
...@@ -228,11 +228,11 @@ CONTAINS ...@@ -228,11 +228,11 @@ CONTAINS
! !
! load potential from file pottot (=unit 8) ! load potential from file pottot (=unit 8)
! !
ALLOCATE ( vpw(stars%n3d,dimension%jspd),vzxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,dimension%jspd) ) ALLOCATE ( vpw(stars%ng3,dimension%jspd),vzxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,dimension%jspd) )
ALLOCATE ( vz(vacuum%nmzd,2,4), vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) ) ALLOCATE ( vz(vacuum%nmzd,2,4), vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) )
ALLOCATE ( vr0(atoms%jmtd,atoms%ntype,dimension%jspd) ) ; vr0 = 0 ALLOCATE ( vr0(atoms%jmtd,atoms%ntype,dimension%jspd) ) ; vr0 = 0
IF (input%gw.eq.2) THEN IF (input%gw.eq.2) THEN
ALLOCATE ( vpwtot(stars%n3d,dimension%jspd), vrtot(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) ) ALLOCATE ( vpwtot(stars%ng3,dimension%jspd), vrtot(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd) )
IF ( mpi%irank == 0 ) WRITE(6,'(A/A/A/A)')& IF ( mpi%irank == 0 ) WRITE(6,'(A/A/A/A)')&
& 'Info: vxc matrix elements for GW will be calculated in gw_vxc',& & 'Info: vxc matrix elements for GW will be calculated in gw_vxc',&
& 'Info: and stored in "vxc", the values obtained from the',& & 'Info: and stored in "vxc", the values obtained from the',&
......
...@@ -48,7 +48,7 @@ CONTAINS ...@@ -48,7 +48,7 @@ CONTAINS
INTEGER, INTENT (IN) :: n_size,n_rank,jspin INTEGER, INTENT (IN) :: n_size,n_rank,jspin
! .. ! ..
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX, INTENT (INOUT) :: vpw(stars%n3d) COMPLEX, INTENT (INOUT) :: vpw(stars%ng3)
REAL, INTENT (IN) :: bkpt(3) REAL, INTENT (IN) :: bkpt(3)
LOGICAL,INTENT(IN) :: l_real LOGICAL,INTENT(IN) :: l_real
! .. ! ..
...@@ -81,7 +81,7 @@ CONTAINS ...@@ -81,7 +81,7 @@ CONTAINS
!--- J const !--- J const
IF( jij%l_J) THEN IF( jij%l_J) THEN
ALLOCATE ( vpw1(stars%n3d) ) ALLOCATE ( vpw1(stars%ng3) )
READ (25) (vpw1(ig3),ig3=1,stars%ng3) READ (25) (vpw1(ig3),ig3=1,stars%ng3)
ENDIF ENDIF
!--- J const !--- J const
......
...@@ -33,7 +33,7 @@ CONTAINS ...@@ -33,7 +33,7 @@ CONTAINS
INTEGER, INTENT (IN) :: jsp ,n_size,n_rank INTEGER, INTENT (IN) :: jsp ,n_size,n_rank
! .. ! ..
! .. Array Arguments .. ! .. Array Arguments ..
COMPLEX, INTENT (INOUT) :: vxy(vacuum%nmzxyd,stars%n2d-1,2) COMPLEX, INTENT (INOUT) :: vxy(vacuum%nmzxyd,stars%ng2-1,2)
INTEGER, INTENT (OUT):: nv2(DIMENSION%jspd) INTEGER, INTENT (OUT):: nv2(DIMENSION%jspd)
REAL, INTENT (INOUT) :: vz(vacuum%nmzd,2,4) REAL, INTENT (INOUT) :: vz(vacuum%nmzd,2,4)
REAL, INTENT (IN) :: evac(2,DIMENSION%jspd) REAL, INTENT (IN) :: evac(2,DIMENSION%jspd)
...@@ -54,7 +54,7 @@ CONTAINS ...@@ -54,7 +54,7 @@ CONTAINS
INTEGER map2(DIMENSION%nvd,DIMENSION%jspd) INTEGER map2(DIMENSION%nvd,DIMENSION%jspd)
COMPLEX tddv(DIMENSION%nv2d,DIMENSION%nv2d),tduv(DIMENSION%nv2d,DIMENSION%nv2d) COMPLEX tddv(DIMENSION%nv2d,DIMENSION%nv2d),tduv(DIMENSION%nv2d,DIMENSION%nv2d)
COMPLEX tudv(DIMENSION%nv2d,DIMENSION%nv2d),tuuv(DIMENSION%nv2d,DIMENSION%nv2d) COMPLEX tudv(DIMENSION%nv2d,DIMENSION%nv2d),tuuv(DIMENSION%nv2d,DIMENSION%nv2d)
COMPLEX vxy_help(stars%n2d-1) COMPLEX vxy_help(stars%ng2-1)
COMPLEX a(DIMENSION%nvd,DIMENSION%jspd),b(DIMENSION%nvd,DIMENSION%jspd) COMPLEX a(DIMENSION%nvd,DIMENSION%jspd),b(DIMENSION%nvd,DIMENSION%jspd)
REAL ddnv(DIMENSION%nv2d,DIMENSION%jspd),dudz(DIMENSION%nv2d,DIMENSION%jspd) REAL ddnv(DIMENSION%nv2d,DIMENSION%jspd),dudz(DIMENSION%nv2d,DIMENSION%jspd)
REAL duz(DIMENSION%nv2d,DIMENSION%jspd), udz(DIMENSION%nv2d,DIMENSION%jspd) REAL duz(DIMENSION%nv2d,DIMENSION%jspd), udz(DIMENSION%nv2d,DIMENSION%jspd)
...@@ -65,7 +65,7 @@ CONTAINS ...@@ -65,7 +65,7 @@ CONTAINS
d2 = SQRT(cell%omtil/cell%area) d2 = SQRT(cell%omtil/cell%area)
IF (jij%l_J) ALLOCATE (vxy1(vacuum%nmzxyd,stars%n2d-1,2)) IF (jij%l_J) ALLOCATE (vxy1(vacuum%nmzxyd,stars%ng2-1,2))
!---> set up mapping function from 3d-->2d lapws !---> set up mapping function from 3d-->2d lapws
......
...@@ -80,7 +80,7 @@ CONTAINS ...@@ -80,7 +80,7 @@ CONTAINS
ALLOCATE (& ALLOCATE (&
ai(-vM:vM,DIMENSION%nv2d,DIMENSION%nvd),bi(-vM:vM,DIMENSION%nv2d,DIMENSION%nvd),& ai(-vM:vM,DIMENSION%nv2d,DIMENSION%nvd),bi(-vM:vM,DIMENSION%nv2d,DIMENSION%nvd),&
nvp(DIMENSION%nv2d,DIMENSION%jspd),ind(stars%n2d,DIMENSION%nv2d,DIMENSION%jspd),& nvp(DIMENSION%nv2d,DIMENSION%jspd),ind(stars%ng2,DIMENSION%nv2d,DIMENSION%jspd),&
kvac3(DIMENSION%nv2d,DIMENSION%jspd),map1(DIMENSION%nvd,DIMENSION%jspd),& kvac3(DIMENSION%nv2d,DIMENSION%jspd),map1(DIMENSION%nvd,DIMENSION%jspd),&
tddv(-vM:vM,-vM:vM,DIMENSION%nv2d,DIMENSION%nv2d),& tddv(-vM:vM,-vM:vM,DIMENSION%nv2d,DIMENSION%nv2d),&
tduv(-vM:vM,-vM:vM,DIMENSION%nv2d,DIMENSION%nv2d),& tduv(-vM:vM,-vM:vM,DIMENSION%nv2d,DIMENSION%nv2d),&
...@@ -113,7 +113,7 @@ CONTAINS ...@@ -113,7 +113,7 @@ CONTAINS
DO ik = 1,DIMENSION%nv2d DO ik = 1,DIMENSION%nv2d
nvp(ik,jspin) = 0 nvp(ik,jspin) = 0
DO i = 1,stars%n2d DO i = 1,stars%ng2
ind(i,ik,jspin) = 0 ind(i,ik,jspin) = 0
END DO END DO
END DO END DO
......
...@@ -34,7 +34,7 @@ CONTAINS ...@@ -34,7 +34,7 @@ CONTAINS
! .. Array Arguments .. ! .. Array Arguments ..
INTEGER, INTENT (IN) :: nv2(dimension%jspd) INTEGER, INTENT (IN) :: nv2(dimension%jspd)
INTEGER, INTENT (IN) :: kvac1(dimension%nv2d,dimension%jspd),kvac2(dimension%nv2d,dimension%jspd) INTEGER, INTENT (IN) :: kvac1(dimension%nv2d,dimension%jspd),kvac2(dimension%nv2d,dimension%jspd)
COMPLEX, INTENT (IN) :: vxy(vacuum%nmzxyd,stars%n2d-1) COMPLEX, INTENT (IN) :: vxy(vacuum%nmzxyd,stars%ng2-1)
COMPLEX, INTENT (OUT):: tddv(dimension%nv2d,dimension%nv2d),tduv(dimension%nv2d,dimension%nv2d) COMPLEX, INTENT (OUT):: tddv(dimension%nv2d,dimension%nv2d),tduv(dimension%nv2d,dimension%nv2d)
COMPLEX, INTENT (OUT):: tudv(dimension%nv2d,dimension%nv2d),tuuv(dimension%nv2d,dimension%nv2d) COMPLEX, INTENT (OUT):: tudv(dimension%nv2d,dimension%nv2d),tuuv(dimension%nv2d,dimension%nv2d)
REAL, INTENT (IN) :: vz(vacuum%nmzd,2,4) ,evac(2,dimension%jspd) REAL, INTENT (IN) :: vz(vacuum%nmzd,2,4) ,evac(2,dimension%jspd)
......
...@@ -86,7 +86,7 @@ CONTAINS ...@@ -86,7 +86,7 @@ CONTAINS
! load potential from file pottot (=unit 8) ! load potential from file pottot (=unit 8)
! !
ALLOCATE ( vz(vacuum%nmzd,2,DIMENSION%jspd),vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,DIMENSION%jspd),& ALLOCATE ( vz(vacuum%nmzd,2,DIMENSION%jspd),vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,DIMENSION%jspd),&
vzxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,DIMENSION%jspd),vpw(stars%n3d,DIMENSION%jspd) ) vzxy(vacuum%nmzxyd,oneD%odi%n2d-1,2,DIMENSION%jspd),vpw(stars%ng3,DIMENSION%jspd) )
OPEN (8,file='pottot',form='unformatted',status='old') OPEN (8,file='pottot',form='unformatted',status='old')
CALL loddop(& CALL loddop(&
...@@ -264,7 +264,9 @@ CONTAINS ...@@ -264,7 +264,9 @@ CONTAINS
eig=eig_so(:nsz)) eig=eig_so(:nsz))
ELSE ELSE
zmat%nbasfcn=size(eig_so,1)
allocate(zmat%z_c(zmat%nbasfcn,nsz)) allocate(zmat%z_c(zmat%nbasfcn,nsz))
zmat%l_real=.false.
zmat%nbands=nsz zmat%nbands=nsz
DO jspin = 1,wannierspin DO jspin = 1,wannierspin
CALL timestart("eigenso: write_eig") CALL timestart("eigenso: write_eig")
......
...@@ -19,7 +19,7 @@ CONTAINS ...@@ -19,7 +19,7 @@ CONTAINS
! .. ! ..