Commit c160e87c authored by Daniel Wortmann's avatar Daniel Wortmann

Deleted t_dimension and corresponding variable

parent fca0bfdd
......@@ -12,7 +12,7 @@
CONTAINS
SUBROUTINE cdnovlp(mpi,&
& sphhar,stars,atoms,sym,&
& DIMENSION,vacuum,cell,&
& vacuum,cell,&
& input,oneD,l_st,&
& jspin,rh,&
& qpw,rhtxy,rho,rht)
......@@ -96,7 +96,7 @@
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_dimension),INTENT(IN)::DIMENSION
TYPE(t_vacuum),INTENT(in):: vacuum
TYPE(t_input),INTENT(in)::input
......@@ -241,7 +241,7 @@
!
!=====> calculate the fourier transform of the core-pseudocharge
CALL ft_of_CorePseudocharge(mpi,DIMENSION,atoms,mshc,alpha,tol_14,rh, &
CALL ft_of_CorePseudocharge(mpi,atoms,mshc,alpha,tol_14,rh, &
acoff,stars,method2,rat,cell,oneD,sym,qpwc)
DO k = 1 , stars%ng3
......@@ -476,7 +476,7 @@
! INTERNAL SUBROUTINES
!***********************************************************************
subroutine ft_of_CorePseudocharge(mpi,DIMENSION,atoms,mshc,alpha,&
subroutine ft_of_CorePseudocharge(mpi,atoms,mshc,alpha,&
tol_14,rh,acoff,stars,method2,rat,cell,oneD,sym,qpwc)
!=====> calculate the fourier transform of the core-pseudocharge
......@@ -489,7 +489,7 @@
USE m_types
type(t_mpi) ,intent(in) :: mpi
type(t_dimension),intent(in) :: DIMENSION
type(t_atoms) ,intent(in) :: atoms
integer ,intent(in) :: mshc(atoms%ntype)
real ,intent(in) :: alpha(atoms%ntype), tol_14
......
......@@ -11,7 +11,7 @@ USE m_juDFT
CONTAINS
SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,&
vacuum,dimension,sphhar,sym,vTot,oneD,cdnvalJob,den,regCharges,dos,results,&
vacuum,sphhar,sym,vTot,oneD,cdnvalJob,den,regCharges,dos,results,&
moments,coreSpecInput,mcd,slab,orbcomp)
!************************************************************************************
......@@ -56,7 +56,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
TYPE(t_results), INTENT(INOUT) :: results
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_banddos), INTENT(IN) :: banddos
......@@ -163,7 +163,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
CALL genMTBasis(atoms,enpara,vTot,mpi,iType,ispin,usdus,f(:,:,0:,ispin),g(:,:,0:,ispin),flo(:,:,:,ispin))
END DO
IF (noco%l_mperp) CALL denCoeffsOffdiag%addRadFunScalarProducts(atoms,f,g,flo,iType)
IF (banddos%l_mcd) CALL mcd_init(atoms,input,dimension,vTot%mt(:,0,:,:),g,f,mcd,iType,jspin)
IF (banddos%l_mcd) CALL mcd_init(atoms,input,vTot%mt(:,0,:,:),g,f,mcd,iType,jspin)
IF (l_coreSpec) CALL corespec_rme(atoms,input,iType,29,input%jspins,jspin,results%ef,&
atoms%msh,vTot%mt(:,0,:,:),f,g)
END DO
......@@ -199,7 +199,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (noccbd.LE.0) CYCLE ! Note: This jump has to be after the MPI_BARRIER is called
CALL gVacMap%init(dimension,sym,atoms,vacuum,stars,lapw,input,cell,kpts,enpara,vTot,ikpt,jspin)
CALL gVacMap%init(sym,atoms,vacuum,stars,lapw,input,cell,kpts,enpara,vTot,ikpt,jspin)
! valence density in the interstitial and vacuum region has to be called only once (if jspin=1) in the non-collinear case
IF (.NOT.((jspin.EQ.2).AND.noco%l_noco)) THEN
......@@ -210,14 +210,14 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (l_dosNdir.AND.PRESENT(slab)) CALL q_int_sl(jspin,ikpt,stars,atoms,sym,cell,noccbd,ev_list,lapw,slab,oneD,zMat)
! valence density in the vacuum region
IF (input%film) THEN
CALL vacden(vacuum,dimension,stars,oneD, kpts,input,sym,cell,atoms,noco,banddos,&
CALL vacden(vacuum,stars,oneD, kpts,input,sym,cell,atoms,noco,banddos,&
gVacMap,we,ikpt,jspin,vTot%vacz(:,:,jspin),noccbd,ev_list,lapw,enpara%evac,eig,den,zMat,dos)
END IF
END IF
IF (input%film) CALL regCharges%sumBandsVac(vacuum,dos,noccbd,ikpt,jsp_start,jsp_end,eig,we)
! valence density in the atomic spheres
CALL eigVecCoeffs%init(input,DIMENSION,atoms,noco,jspin,noccbd)
CALL eigVecCoeffs%init(input,atoms,noco,jspin,noccbd)
DO ispin = jsp_start, jsp_end
IF (input%l_f) CALL force%init2(noccbd,input,atoms)
CALL abcof(input,atoms,sym,cell,lapw,noccbd,usdus,noco,ispin,oneD,&
......@@ -230,7 +230,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
CALL eparas(ispin,atoms,noccbd,ev_list,mpi,ikpt,noccbd,we,eig,&
skip_t,cdnvalJob%l_evp,eigVecCoeffs,usdus,regCharges,dos,banddos%l_mcd,mcd)
IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(dimension,atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
! layer charge of each valence state in this k-point of the SBZ from the mt-sphere region of the film
IF (l_dosNdir) THEN
......@@ -244,16 +244,16 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
CALL calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
IF (noco%l_soc) CALL orbmom(atoms,noccbd,we,ispin,eigVecCoeffs,orb)
IF (input%l_f) CALL force%addContribsA21A12(input,atoms,dimension,sym,cell,oneD,enpara,&
IF (input%l_f) CALL force%addContribsA21A12(input,atoms,sym,cell,oneD,enpara,&
usdus,eigVecCoeffs,noccbd,ispin,eig,we,results)
IF(l_coreSpec) CALL corespec_dos(atoms,usdus,ispin,dimension%lmd,kpts%nkpt,ikpt,dimension%neigd,&
IF(l_coreSpec) CALL corespec_dos(atoms,usdus,ispin,atoms%lmaxd*(atoms%lmaxd+2),kpts%nkpt,ikpt,input%neig,&
noccbd,results%ef,banddos%sig_dos,eig,we,eigVecCoeffs)
END DO ! end loop over ispin
IF (noco%l_mperp) CALL denCoeffsOffdiag%calcCoefficients(atoms,sphhar,sym,eigVecCoeffs,we,noccbd)
IF ((banddos%dos.OR.banddos%vacdos.OR.input%cdinf).AND.(banddos%ndir.GT.0)) THEN
! since z is no longer an argument of cdninf sympsi has to be called here!
CALL sympsi(lapw,jspin,sym,dimension,nbands,cell,eig,noco,dos%ksym(:,ikpt,jspin),dos%jsym(:,ikpt,jspin),zMat)
CALL sympsi(lapw,jspin,sym,nbands,cell,eig,noco,dos%ksym(:,ikpt,jspin),dos%jsym(:,ikpt,jspin),zMat)
END IF
END DO ! end of k-point loop
......@@ -272,7 +272,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
IF (input%cdinf) THEN
WRITE (6,FMT=8210) ispin
8210 FORMAT (/,5x,'check continuity of cdn for spin=',i2)
CALL checkDOPAll(input,dimension,sphhar,stars,atoms,sym,vacuum,oneD,cell,den,ispin)
CALL checkDOPAll(input,sphhar,stars,atoms,sym,vacuum,oneD,cell,den,ispin)
END IF
IF (input%l_f) CALL force_a8(input,atoms,sym,sphhar,ispin,vTot%mt(:,:,:,ispin),den%mt,force,results)
END DO
......
......@@ -42,7 +42,7 @@ CONTAINS
INTEGER, INTENT (IN) :: ev_list(noccbd)
! ..
! .. Array Arguments ..
REAL, INTENT (IN) :: eig(:)!(dimension%neigd),
REAL, INTENT (IN) :: eig(:)!(input%neig),
REAL, INTENT (IN) :: we(noccbd)
! ..
......
......@@ -29,7 +29,7 @@ CONTAINS
INTEGER, INTENT (IN) :: ne,jspin
! ..
! .. Array Arguments ..
REAL, INTENT (IN) :: we(:)!(dimension%neigd)
REAL, INTENT (IN) :: we(:)!(input%neig)
COMPLEX, INTENT (INOUT) :: n_mmp(-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,atoms%n_u)
! ..
! .. Local Scalars ..
......
......@@ -7,23 +7,23 @@
MODULE m_od_abvac
CONTAINS
SUBROUTINE od_abvac(&
& cell,vacuum,DIMENSION,stars,&
& cell,vacuum,stars,&
& oneD,qssbti,&
& n2d_1,&
& wronk,evac,bkpt,MM,vM,&
& vz,kvac3,nv2,&
& uz,duz,u,udz,dudz,ddnv,ud)
!**************************************************************
! determines the nesessary values and derivatives on the
! determines the nesessary values and derivatives on the
! vacuum cylindrical boundary for finding a and b coefficients
! for the construcing vacuum charge density in vacden.F
! Y.Mokrousov, 7th of october 2002
!***************************************************************
!***************************************************************
USE m_vacuz
USE m_vacudz
USE m_types
IMPLICIT NONE
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_stars),INTENT(IN) :: stars
......@@ -36,26 +36,26 @@ CONTAINS
REAL, INTENT (in) :: evac
! ..array arguments..
INTEGER, INTENT (in) :: kvac3(DIMENSION%nv2d)
REAL, INTENT (in) :: bkpt(3),qssbti
REAL, INTENT (in) :: vz(vacuum%nmzd)
REAL, INTENT (out):: udz(DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: uz(DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: dudz(DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: duz(DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: u(vacuum%nmzd,DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: ud(vacuum%nmzd,DIMENSION%nv2d,-vM:vM)
REAL, INTENT (out):: ddnv(DIMENSION%nv2d,-vM:vM)
INTEGER, INTENT (in) :: kvac3(:)
REAL, INTENT (in) :: bkpt(3),qssbti
REAL, INTENT (in) :: vz(vacuum%nmzd)
REAL, INTENT (out):: udz(:,-vM:)
REAL, INTENT (out):: uz(:,-vM:)
REAL, INTENT (out):: dudz(:,-vM:)
REAL, INTENT (out):: duz(:,-vM:)
REAL, INTENT (out):: u(:,:,-vM:)
REAL, INTENT (out):: ud(:,:,-vM:)
REAL, INTENT (out):: ddnv(:,-vM:)
! ..local scalars..
REAL ev,scale,xv,yv,vzero,v1
INTEGER i,ik,jk,jspin,jsp1,jsp2 ,l,m
INTEGER i1,i2,i3,ind1,ind3
! .. local arrays..
REAL wdz(DIMENSION%nv2d,-vM:vM),wz(DIMENSION%nv2d,-vM:vM)
REAL dwdz(DIMENSION%nv2d,-vM:vM),dwz(DIMENSION%nv2d,-vM:vM)
REAL wdz(lapw_dim_nv2d,-vM:vM),wz(lapw_dim_nv2d,-vM:vM)
REAL dwdz(lapw_dim_nv2d,-vM:vM),dwz(lapw_dim_nv2d,-vM:vM)
REAL v(3),x(vacuum%nmzd)
REAL vr0(vacuum%nmzd)
REAL w(vacuum%nmzd,DIMENSION%nv2d,-vM:vM),wd(vacuum%nmzd,DIMENSION%nv2d,-vM:vM)
REAL w(vacuum%nmzd,lapw_dim_nv2d,-vM:vM),wd(vacuum%nmzd,lapw_dim_nv2d,-vM:vM)
! wronksian for the schrodinger equation given by an identity
......
......@@ -97,7 +97,7 @@ CONTAINS
TYPE(t_dos), INTENT(INOUT) :: dos
REAL,INTENT(IN) :: we(:) !(nobd)
REAL,INTENT(IN) :: eig(:)!(dimension%neigd)
REAL,INTENT(IN) :: eig(:)!(input%neig)
INTEGER, INTENT(IN) :: ev_list(ne)
!-----> BASIS FUNCTION INFORMATION
INTEGER,INTENT(IN):: ne
......
......@@ -5,7 +5,7 @@ MODULE m_qal21
!***********************************************************************
!
CONTAINS
SUBROUTINE qal_21(dimension,atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
SUBROUTINE qal_21(atoms,input,noccbd,ev_list,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
USE m_types_setup
USE m_types_dos
......@@ -14,7 +14,7 @@ CONTAINS
USE m_rotdenmat
use m_constants
IMPLICIT NONE
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_input), INTENT(IN) :: input
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_atoms), INTENT(IN) :: atoms
......@@ -37,9 +37,9 @@ CONTAINS
COMPLEX qlo(noccbd,atoms%nlod,atoms%nlod,atoms%ntype)
COMPLEX qaclo(noccbd,atoms%nlod,atoms%ntype),qbclo(noccbd,atoms%nlod,atoms%ntype)
COMPLEX qcloa(noccbd,atoms%nlod,atoms%ntype),qclob(noccbd,atoms%nlod,atoms%ntype)
COMPLEX qal21(0:3,atoms%ntype,dimension%neigd)
COMPLEX qal21(0:3,atoms%ntype,input%neig)
COMPLEX q_loc(2,2),q_hlp(2,2),chi(2,2)
REAL qmat(0:3,atoms%ntype,dimension%neigd,4)
REAL qmat(0:3,atoms%ntype,input%neig,4)
! .. Intrinsic Functions ..
INTRINSIC conjg
......
......@@ -5,7 +5,7 @@ MODULE m_vacden
! vacuum charge density. speed up by r. wu 1992
! *************************************************************
CONTAINS
SUBROUTINE vacden(vacuum,DIMENSION,stars,oneD,kpts,input,sym,cell,atoms,noco,banddos,&
SUBROUTINE vacden(vacuum,stars,oneD,kpts,input,sym,cell,atoms,noco,banddos,&
gVacMap,we,ikpt,jspin,vz,ne,ev_list,lapw,evac,eig,den,zMat,dos)
!***********************************************************************
......@@ -13,10 +13,10 @@ CONTAINS
! ****** change vacden(......,dos%qstars) for starcoefficients, shz. Jan.99
! ****** changed for fleur dw
! In non-collinear calculations the density becomes a hermitian 2x2
! matrix. This subroutine generates this density matrix in the
! matrix. This subroutine generates this density matrix in the
! vacuum region. The diagonal elements of this matrix (n_11 & n_22)
! are store in den%vacz and den%vacxy, while the real and imaginary part
! of the off-diagonal element are stored in den%vacz(:,:,3:4) and den%vacxy(:,:,:,3).
! of the off-diagonal element are stored in den%vacz(:,:,3:4) and den%vacxy(:,:,:,3).
!
! Philipp Kurz 99/07
!***********************************************************************
......@@ -48,7 +48,7 @@ CONTAINS
USE m_types
IMPLICIT NONE
TYPE(t_lapw),INTENT(INOUT) :: lapw !for some reason the second spin data is reset in noco case
TYPE(t_dimension),INTENT(IN) :: DIMENSION
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_banddos),INTENT(IN) :: banddos
TYPE(t_input),INTENT(IN) :: input
......@@ -64,23 +64,23 @@ CONTAINS
TYPE(t_potden),INTENT(INOUT) :: den
TYPE(t_dos), INTENT(INOUT) :: dos
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: jspin
INTEGER, INTENT (IN) :: ne
INTEGER, INTENT (IN) :: jspin
INTEGER, INTENT (IN) :: ne
INTEGER, INTENT (IN) :: ikpt
INTEGER,PARAMETER :: n2max=13
REAL,PARAMETER :: emax=2.0/hartree_to_ev_const
! .. Array Arguments ..
INTEGER, INTENT(IN) :: ev_list(ne)
REAL, INTENT(IN) :: evac(2,input%jspins)
REAL, INTENT(IN) :: we(DIMENSION%neigd)
REAL, INTENT(IN) :: we(input%neig)
REAL :: vz(vacuum%nmzd,2) ! Note this breaks the INTENT(IN) from cdnval. It may be read from a file in this subroutine.
! STM-Arguments
REAL, INTENT (IN) :: eig(DIMENSION%neigd)
REAL, INTENT (IN) :: eig(input%neig)
! local STM variables
INTEGER nv2(input%jspins)
INTEGER kvac1(DIMENSION%nv2d,input%jspins),kvac2(DIMENSION%nv2d,input%jspins),map2(DIMENSION%nvd,input%jspins)
INTEGER kvac3(DIMENSION%nv2d,input%jspins),map1(DIMENSION%nvd,input%jspins)
INTEGER mapg2k(DIMENSION%nv2d)
INTEGER kvac1(lapw%dim_nv2d(),input%jspins),kvac2(lapw%dim_nv2d(),input%jspins),map2(lapw%dim_nvd(),input%jspins)
INTEGER kvac3(lapw%dim_nv2d(),input%jspins),map1(lapw%dim_nvd(),input%jspins)
INTEGER mapg2k(lapw%dim_nv2d())
! .. Local Scalars ..
COMPLEX aa,ab,av,ba,bb,bv,t1,aae,bbe,abe,bae,aaee,bbee,abee,baee,&
& factorx,factory,c_1,aa_1,ab_1,ba_1,bb_1,ic,av_1,bv_1,d,tempCmplx
......@@ -120,12 +120,12 @@ CONTAINS
! izlay : defines vertical position of layers in delz (=0.1 a.u.) units from begining of vacuum region
! vacdos: =T: calculate vacuum dos in layers as given by the above
! integ : =T: integrate in vertical position between izlay(layer,1)..izlay(layer,2)
! nstm : 0: s-Tip, 1: p_z-Tip, 2: d_z^2-Tip (following Chen's derivative rule) ->rhzgrd.f is used
! to calculate derivatives
! nstm : 0: s-Tip, 1: p_z-Tip, 2: d_z^2-Tip (following Chen's derivative rule) ->rhzgrd.f is used
! to calculate derivatives
! tworkf: Workfunction of Tip (in hartree units) is needed for d_z^2-Orbital)
! starcoeff: =T: star coefficients are calculated at values of izlay for 0th (=q) to nstars-1. star
! starcoeff: =T: star coefficients are calculated at values of izlay for 0th (=q) to nstars-1. star
! (dos%qstars(1..nstars-1))
! nstars: number of star functions to be used (0th star is given by value of q=charge integrated in 2D)
! nstars: number of star functions to be used (0th star is given by value of q=charge integrated in 2D)
!
! further possibility: (readin of locx, locy has to be implemented in flapw7.f or they have to be set explicitly)
!
......@@ -133,31 +133,31 @@ CONTAINS
! within a restricted area of the 2D unit cell, the corners of this area is given by locx and locy
! they are defined in internal coordinates, i.e. \vec{r}_1=locx(1)*\vec{a}_1+locy(1)*\vec{a}_2
! \vec{r}_2=locx(2)*\vec{a}_1+locy(2)*\vec{a}_2
! \vec{a}_1,2 are the 2D lattice vectors
!
! \vec{a}_1,2 are the 2D lattice vectors
!
! **************************************************************************************************
CALL timestart("vacden")
ALLOCATE ( ac(DIMENSION%nv2d,DIMENSION%neigd,input%jspins),bc(DIMENSION%nv2d,DIMENSION%neigd,input%jspins),dt(DIMENSION%nv2d),&
& dte(DIMENSION%nv2d),du(vacuum%nmzd),ddu(vacuum%nmzd,DIMENSION%nv2d),due(vacuum%nmzd),&
& ddue(vacuum%nmzd,DIMENSION%nv2d),t(DIMENSION%nv2d),te(DIMENSION%nv2d),&
& tei(DIMENSION%nv2d,input%jspins),u(vacuum%nmzd,DIMENSION%nv2d,input%jspins),ue(vacuum%nmzd,DIMENSION%nv2d,input%jspins),&
ALLOCATE ( ac(lapw%dim_nv2d(),input%neig,input%jspins),bc(lapw%dim_nv2d(),input%neig,input%jspins),dt(lapw%dim_nv2d()),&
& dte(lapw%dim_nv2d()),du(vacuum%nmzd),ddu(vacuum%nmzd,lapw%dim_nv2d()),due(vacuum%nmzd),&
& ddue(vacuum%nmzd,lapw%dim_nv2d()),t(lapw%dim_nv2d()),te(lapw%dim_nv2d()),&
& tei(lapw%dim_nv2d(),input%jspins),u(vacuum%nmzd,lapw%dim_nv2d(),input%jspins),ue(vacuum%nmzd,lapw%dim_nv2d(),input%jspins),&
& v(3),yy(vacuum%nmzd))
IF (oneD%odi%d1) THEN
ALLOCATE ( ac_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb,DIMENSION%neigd,input%jspins),&
& bc_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb,DIMENSION%neigd,input%jspins),&
& dt_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
& dte_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
ALLOCATE ( ac_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb,input%neig,input%jspins),&
& bc_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb,input%neig,input%jspins),&
& dt_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& dte_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& du_1(vacuum%nmzd,-oneD%odi%mb:oneD%odi%mb),&
& ddu_1(vacuum%nmzd,DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
& ddu_1(vacuum%nmzd,lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& due_1(vacuum%nmzd,-oneD%odi%mb:oneD%odi%mb),&
& ddue_1(vacuum%nmzd,DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
& t_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
& te_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb),&
& tei_1(DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb,input%jspins),&
& u_1(vacuum%nmzd,DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb,input%jspins),&
& ue_1(vacuum%nmzd,DIMENSION%nv2d,-oneD%odi%mb:oneD%odi%mb,input%jspins) )
& ddue_1(vacuum%nmzd,lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& t_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& te_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb),&
& tei_1(lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb,input%jspins),&
& u_1(vacuum%nmzd,lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb,input%jspins),&
& ue_1(vacuum%nmzd,lapw%dim_nv2d(),-oneD%odi%mb:oneD%odi%mb,input%jspins) )
END IF ! oneD%odi%d1
!
......@@ -165,7 +165,7 @@ CONTAINS
eps=0.01
ic = CMPLX(0.,1.)
! ------------------
! -----> set up mapping arrays
IF (noco%l_ss) THEN
jsp_start = 1
......@@ -185,7 +185,7 @@ CONTAINS
END IF
ENDDO
n2 = n2 + 1
IF (n2>DIMENSION%nv2d) CALL juDFT_error("vacden0",calledby ="vacden")
IF (n2>lapw%dim_nv2d()) CALL juDFT_error("vacden0",calledby ="vacden")
kvac3(n2,ispin) = lapw%k3(k,ispin)
map1(k,ispin) = n2
ENDDO k_loop
......@@ -201,7 +201,7 @@ CONTAINS
END IF
ENDDO
n2 = n2 + 1
IF (n2>DIMENSION%nv2d) CALL juDFT_error("vacden0","vacden")
IF (n2>lapw%dim_nv2d()) CALL juDFT_error("vacden0","vacden")
kvac1(n2,ispin) = lapw%gvec(1,k,ispin)
kvac2(n2,ispin) = lapw%gvec(2,k,ispin)
map2(k,ispin) = n2
......@@ -229,7 +229,7 @@ CONTAINS
ENDIF
!+dw
! if tunneling current should be calculated we need to write out
! if tunneling current should be calculated we need to write out
! info on electronic structure: --> mapping from kvac to gvac by mapg2k
! shz, Jan.99
IF (vacuum%nstm.EQ.3) THEN
......@@ -242,7 +242,7 @@ CONTAINS
END IF
!
!-dw
wronk = 2.0
const = 1.0 / ( SQRT(cell%omtil)*wronk )
......@@ -256,7 +256,7 @@ CONTAINS
ac(:,:,:) = CMPLX(0.0,0.0)
bc(:,:,:) = CMPLX(0.0,0.0)
sign = 3. - 2.*ivac
IF (noco%l_noco) THEN
!---> In a non-collinear calculation vacden is only called once.
!---> Thus, the vaccum wavefunctions and the A- and B-coeff. (ac bc)
......@@ -272,18 +272,18 @@ CONTAINS
! -----> set up vacuum wave functions
IF (oneD%odi%d1) THEN
CALL od_abvac(&
cell,vacuum,DIMENSION,stars,&
cell,vacuum,stars,&
oneD,qssbti(3,ispin),&
oneD%odi%n2d,&
wronk,evacp,lapw%bkpt,oneD%odi%M,oneD%odi%mb,&
vz(1,ispin),kvac3(1,ispin),nv2(ispin),&
t_1(1,-oneD%odi%mb),dt_1(1,-oneD%odi%mb),u_1(1,1,-oneD%odi%mb,ispin),&
te_1(1,-oneD%odi%mb),dte_1(1,-oneD%odi%mb),&
tei_1(1,-oneD%odi%mb,ispin),&
ue_1(1,1,-oneD%odi%mb,ispin))
vz(1,ispin),kvac3(:,ispin),nv2(ispin),&
t_1(:,-oneD%odi%mb:),dt_1(:,-oneD%odi%mb:),u_1(:,:,-oneD%odi%mb:,ispin),&
te_1(:,-oneD%odi%mb:),dte_1(:,-oneD%odi%mb:),&
tei_1(:,-oneD%odi%mb:,ispin),&
ue_1(:,:,-oneD%odi%mb:,ispin))
DO k = 1,lapw%nv(ispin)
kspin = (lapw%nv(1)+atoms%nlotot)*(ispin-1) + k
l = map1(k,ispin)
l = map1(k,ispin)
irec3 = stars%ig(lapw%gvec(1,k,ispin),lapw%gvec(2,k,ispin),lapw%gvec(3,k,ispin))
IF (irec3.NE.0) THEN
irec2 = stars%ig2(irec3)
......@@ -342,8 +342,8 @@ CONTAINS
zks = lapw%k3(k,ispin)*cell%bmat(3,3)*sign
arg = zks*cell%z1
c_1 = CMPLX(COS(arg),SIN(arg)) * const
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
! -----> loop over basis functions
IF (zmat%l_real) THEN
ac(l,:ne,ispin) = ac(l,:ne,ispin) + zMat%data_r(kspin,:ne)*av
......@@ -374,15 +374,15 @@ CONTAINS
qssbtii = 0.
evacp = evac(ivac,jspin)
CALL od_abvac(&
& cell,vacuum,DIMENSION,stars,&
& cell,vacuum,stars,&
& oneD,qssbtii,&
& oneD%odi%n2d,&
& wronk,evacp,lapw%bkpt,oneD%odi%M,oneD%odi%mb,&
& vz(1,ivac),kvac3(1,jspin),nv2(jspin),&
& t_1(1,-oneD%odi%mb),dt_1(1,-oneD%odi%mb),u_1(1,1,-oneD%odi%mb,jspin),&
& te_1(1,-oneD%odi%mb),dte_1(1,-oneD%odi%mb),&
& tei_1(1,-oneD%odi%mb,jspin),&
& ue_1(1,1,-oneD%odi%mb,jspin))
& vz(:,ivac),kvac3(:,jspin),nv2(jspin),&
& t_1(:,-oneD%odi%mb:),dt_1(:,-oneD%odi%mb:),u_1(:,:,-oneD%odi%mb:,jspin),&
& te_1(:,-oneD%odi%mb:),dte_1(:,-oneD%odi%mb:),&
& tei_1(:,-oneD%odi%mb:,jspin),&
& ue_1(:,:,-oneD%odi%mb:,jspin))
DO k = 1,lapw%nv(jspin)
l = map1(k,jspin)
irec3 = stars%ig(lapw%gvec(1,k,jspin),lapw%gvec(2,k,jspin),lapw%gvec(3,k,jspin))
......@@ -437,8 +437,8 @@ CONTAINS
zks = lapw%k3(k,jspin)*cell%bmat(3,3)*sign
arg = zks*cell%z1
c_1 = CMPLX(COS(arg),SIN(arg)) * const
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
av = -c_1 * CMPLX( dte(l),zks*te(l) )
bv = c_1 * CMPLX( dt(l),zks* t(l) )
! -----> loop over basis functions
IF (zmat%l_real) THEN
ac(l,:ne,jspin) = ac(l,:ne,jspin) + zMat%data_r(k,:ne)*av
......@@ -451,13 +451,13 @@ CONTAINS
END IF ! D1
ENDIF
!
! ----> calculate first and second derivative of u,ue
! ----> calculate first and second derivative of u,ue
! in order to simulate p_z or d_z^2 Tip in Chen's model , shz. 97
!
!
IF (vacuum%nstm.GT.0) THEN
DO ik = 1,nv2(jspin)
! CALL rhzgrd(nmz,delz,u(1,ik,jspin),4,du,ddu(1,ik))
! CALL rhzgrd(nmz,delz,ue(1,ik,jspin),4,due,ddue(1,ik))
! CALL rhzgrd(nmz,delz,ue(1,ik,jspin),4,due,ddue(1,ik))
ALLOCATE ( dummy(vacuum%nmz) )
CALL grdchlh(&
......@@ -480,7 +480,7 @@ CONTAINS
!
! --> to calculate Tunneling Current between two systems
! within Bardeens Approach one needs ac(l,n), bc(l,n);
! they are written to the file vacwave
! they are written to the file vacwave
! IF nstm=3
! tworkf is then the fermi energy (in hartree)
!
......@@ -540,11 +540,11 @@ CONTAINS
aaee=aa*vacuum%tworkf*vacuum%tworkf*4/9
bbee=bb*vacuum%tworkf*vacuum%tworkf*4/9
abee=ab*vacuum%tworkf*vacuum%tworkf*4/9
baee=ba*vacuum%tworkf*vacuum%tworkf*4/9
baee=ba*vacuum%tworkf*vacuum%tworkf*4/9
DO</