Commit 529e4e3d authored by Daniel Wortmann's avatar Daniel Wortmann

Started to clean types...

removed: weight, natd, nkpts,nkptd
parent f8449286
......@@ -111,9 +111,9 @@
! .. Array Arguments ..
COMPLEX,INTENT (INOUT) :: qpw(stars%n3d,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%ntypd,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) :: rh(DIMENSION%msh,atoms%ntypd)
REAL, INTENT (INOUT) :: rh(DIMENSION%msh,atoms%ntype)
! ..
! .. Local Scalars ..
COMPLEX czero,carg,VALUE,slope,ci
......@@ -126,9 +126,9 @@
! ..
! .. Local Arrays ..
COMPLEX, ALLOCATABLE :: qpwc(:)
REAL acoff(atoms%ntypd),alpha(atoms%ntypd),rho_out(2)
REAL rat(DIMENSION%msh,atoms%ntypd)
INTEGER mshc(atoms%ntypd)
REAL acoff(atoms%ntype),alpha(atoms%ntype),rho_out(2)
REAL rat(DIMENSION%msh,atoms%ntype)
INTEGER mshc(atoms%ntype)
REAL fJ(-oneD%odi%M:oneD%odi%M),dfJ(-oneD%odi%M:oneD%odi%M)
! ..
DATA czero /(0.0,0.0)/, zero /0.0/, tol_14 /1.0e-10/!-14
......@@ -175,7 +175,7 @@
! (2) cut_off core tails from noise
!
#ifdef CPP_MPI
CALL MPI_BCAST(rh,DIMENSION%msh*atoms%ntypd,CPP_MPI_REAL,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(rh,DIMENSION%msh*atoms%ntype,CPP_MPI_REAL,0,mpi%mpi_comm,ierr)
#endif
nloop: DO n = 1 , atoms%ntype
IF ((atoms%ncst(n).GT.0).OR.l_st) THEN
......@@ -490,13 +490,13 @@
type(t_mpi) ,intent(in) :: mpi
type(t_dimension),intent(in) :: DIMENSION
type(t_atoms) ,intent(in) :: atoms
integer ,intent(in) :: mshc(atoms%ntypd)
real ,intent(in) :: alpha(atoms%ntypd), tol_14
real ,intent(in) :: rh(DIMENSION%msh,atoms%ntypd)
real ,intent(in) :: acoff(atoms%ntypd)
integer ,intent(in) :: mshc(atoms%ntype)
real ,intent(in) :: alpha(atoms%ntype), tol_14
real ,intent(in) :: rh(DIMENSION%msh,atoms%ntype)
real ,intent(in) :: acoff(atoms%ntype)
type(t_stars) ,intent(in) :: stars
integer ,intent(in) :: method2
real ,intent(in) :: rat(DIMENSION%msh,atoms%ntypd)
real ,intent(in) :: rat(DIMENSION%msh,atoms%ntype)
type(t_cell) ,intent(in) :: cell
type(t_oneD) ,intent(in) :: oneD
type(t_sym) ,intent(in) :: sym
......@@ -551,7 +551,7 @@
END DO
END IF
CALL StructureConst_forAtom(nat1,stars,oneD,sym,&
atoms%neq(n),atoms%natd,atoms%taual,&
atoms%neq(n),atoms%nat,atoms%taual,&
cell,qf,qpwc_at)
#ifdef CPP_MPI
DO k = 1, stars%n3d
......
......@@ -32,7 +32,7 @@
! ..
! .. Array Arguments ..
COMPLEX, INTENT (IN) :: qpw(stars%n3d,input%jspins)
REAL, INTENT (IN) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntypd,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)
!-odim
!+odim
......@@ -44,7 +44,7 @@
INTEGER i,ivac,j,jspin,n,nz
! ..
! .. Local Arrays ..
REAL qmt(atoms%ntypd),qvac(2),q2(vacuum%nmz),rht1(vacuum%nmzd,2,input%jspins)
REAL qmt(atoms%ntype),qvac(2),q2(vacuum%nmz),rht1(vacuum%nmzd,2,input%jspins)
INTEGER, ALLOCATABLE :: lengths(:,:)
CHARACTER(LEN=20) :: attributes(6), names(6)
! ..
......
......@@ -116,12 +116,12 @@ CONTAINS
COMPLEX, INTENT(INOUT) :: cdom(stars%n3d)
COMPLEX, INTENT(INOUT) :: cdomvz(vacuum%nmzd,2)
COMPLEX, INTENT(INOUT) :: cdomvxy(vacuum%nmzxyd,oneD%odi%n2d-1,2)
COMPLEX, INTENT(INOUT) :: qa21(atoms%ntypd)
COMPLEX, INTENT(INOUT) :: qa21(atoms%ntype)
INTEGER, INTENT (IN) :: igq_fft(0:stars%kq1d*stars%kq2d*stars%kq3d-1)
REAL, INTENT (IN) :: vz(vacuum%nmzd,2)
REAL, INTENT (IN) :: vr(atoms%jmtd,0:sphhar%nlhd,atoms%ntypd,dimension%jspd)
REAL, INTENT (OUT) :: chmom(atoms%ntypd,dimension%jspd),clmom(3,atoms%ntypd,dimension%jspd)
REAL, INTENT (INOUT) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntypd,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 (INOUT) :: rho(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd)
REAL, INTENT (INOUT) :: rht(vacuum%nmzd,2,dimension%jspd)
COMPLEX, INTENT(INOUT) :: n_mmp(-3:3,-3:3,atoms%n_u)
......@@ -140,14 +140,14 @@ CONTAINS
COMPLEX,parameter:: czero=(0.0,0.0)
LOGICAL l_fmpl,l_mcd,l_evp,l_orbcomprot
! ...Local Arrays ..
INTEGER n_bands(0:dimension%neigd),ncore(atoms%ntypd)
REAL cartk(3),bkpt(3),xp(3,dimension%nspd),e_mcd(atoms%ntypd,input%jspins,dimension%nstd)
REAL ello(atoms%nlod,atoms%ntypd,dimension%jspd),evac(2,dimension%jspd)
REAL epar(0:atoms%lmaxd,atoms%ntypd,dimension%jspd),evdu(2,dimension%jspd)
INTEGER n_bands(0:dimension%neigd),ncore(atoms%ntype)
REAL cartk(3),bkpt(3),xp(3,dimension%nspd),e_mcd(atoms%ntype,input%jspins,dimension%nstd)
REAL ello(atoms%nlod,atoms%ntype,dimension%jspd),evac(2,dimension%jspd)
REAL epar(0:atoms%lmaxd,atoms%ntype,dimension%jspd),evdu(2,dimension%jspd)
REAL eig(dimension%neigd)
REAL vz0(2)
REAL uuilon(atoms%nlod,atoms%ntypd),duilon(atoms%nlod,atoms%ntypd)
REAL ulouilopn(atoms%nlod,atoms%nlod,atoms%ntypd)
REAL uuilon(atoms%nlod,atoms%ntype),duilon(atoms%nlod,atoms%ntype)
REAL ulouilopn(atoms%nlod,atoms%nlod,atoms%ntype)
INTEGER, PARAMETER :: n2max_nstm3=13
......@@ -209,15 +209,15 @@ CONTAINS
!---> added. if l_mperp = F, these loops run only from jspin - jspin.
jsp_start = 1
jsp_end = 2
ALLOCATE ( mt21(0:atoms%lmaxd,atoms%ntypd),lo21(atoms%nlod,atoms%ntypd) ) ! Deallocation at end of subroutine
ALLOCATE ( uloulopn21(atoms%nlod,atoms%nlod,atoms%ntypd) )
ALLOCATE ( uloulop21(atoms%nlod,atoms%nlod,atoms%ntypd) )
ALLOCATE ( qmat(0:3,atoms%ntypd,dimension%neigd,4) )
ALLOCATE ( mt21(0:atoms%lmaxd,atoms%ntype),lo21(atoms%nlod,atoms%ntype) ) ! Deallocation at end of subroutine
ALLOCATE ( uloulopn21(atoms%nlod,atoms%nlod,atoms%ntype) )
ALLOCATE ( uloulop21(atoms%nlod,atoms%nlod,atoms%ntype) )
ALLOCATE ( qmat(0:3,atoms%ntype,dimension%neigd,4) )
IF (l_fmpl) THEN
ALLOCATE ( uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntypd) )
ALLOCATE ( ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntypd) )
ALLOCATE ( dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntypd) )
ALLOCATE ( udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntypd) )
ALLOCATE ( uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype) )
ALLOCATE ( ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype) )
ALLOCATE ( dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype) )
ALLOCATE ( udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype) )
ELSE
ALLOCATE ( uunmt21(1,1,1),ddnmt21(1,1,1) )
ALLOCATE ( dunmt21(1,1,1),udnmt21(1,1,1) )
......@@ -235,31 +235,31 @@ CONTAINS
!
ALLOCATE ( f(atoms%jmtd,2,0:atoms%lmaxd,jsp_start:jsp_end) ) ! Deallocation before mpi_col_den
ALLOCATE ( g(atoms%jmtd,2,0:atoms%lmaxd,jsp_start:jsp_end) )
ALLOCATE ( usdus%us(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%uds(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%dus(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%duds(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%ddn(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%us(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%uds(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%dus(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%duds(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%ddn(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( lapw%k1(dimension%nvd,dimension%jspd),lapw%k2(dimension%nvd,dimension%jspd),lapw%k3(dimension%nvd,dimension%jspd) )
ALLOCATE ( jsym(dimension%neigd),ksym(dimension%neigd) )
ALLOCATE ( gvac1d(dimension%nv2d),gvac2d(dimension%nv2d) )
ALLOCATE ( usdus%ulos(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%dulos(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%uulon(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%dulon(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%uloulopn(atoms%nlod,atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( uu(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( dd(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( du(0:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( uunmt(0:llpd,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( ddnmt(0:llpd,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( dunmt(0:llpd,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( udnmt(0:llpd,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( qal(0:3,atoms%ntypd,dimension%neigd,jsp_start:jsp_end) )
ALLOCATE ( sqal(0:3,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( ener(0:3,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( sqlo(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( enerlo(atoms%nlod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( usdus%ulos(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%dulos(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%uulon(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%dulon(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( usdus%uloulopn(atoms%nlod,atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( uu(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( dd(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( du(0:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( uunmt(0:llpd,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( ddnmt(0:llpd,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( dunmt(0:llpd,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( udnmt(0:llpd,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( qal(0:3,atoms%ntype,dimension%neigd,jsp_start:jsp_end) )
ALLOCATE ( sqal(0:3,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( ener(0:3,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( sqlo(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( enerlo(atoms%nlod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( svac(2,jsp_start:jsp_end) )
ALLOCATE ( pvac(2,jsp_start:jsp_end) )
ALLOCATE ( qstars(vacuum%nstars,dimension%neigd,vacuum%layerd,2) )
......@@ -285,9 +285,9 @@ CONTAINS
sqal(:,:,:) = 0.0 ; ener(:,:,:) = 0.0
!+soc
IF (noco%l_soc) THEN
ALLOCATE ( orb(0:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( orbl(atoms%nlod,-atoms%llod:atoms%llod,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( orblo(atoms%nlod,atoms%nlod,-atoms%llod:atoms%llod,atoms%ntypd,jsp_start:jsp_end))
ALLOCATE ( orb(0:atoms%lmaxd,-atoms%lmaxd:atoms%lmaxd,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( orbl(atoms%nlod,-atoms%llod:atoms%llod,atoms%ntype,jsp_start:jsp_end) )
ALLOCATE ( orblo(atoms%nlod,atoms%nlod,-atoms%llod:atoms%llod,atoms%ntype,jsp_start:jsp_end))
orb(:,:,:,:)%uu = 0.0 ; orb(:,:,:,:)%dd = 0.0
orb(:,:,:,:)%uum = czero ; orb(:,:,:,:)%uup = czero
orb(:,:,:,:)%ddm = czero ; orb(:,:,:,:)%ddp = czero
......@@ -303,8 +303,8 @@ CONTAINS
ENDIF
!+for
IF (input%l_f) THEN
ALLOCATE ( f_a12(3,atoms%ntypd),f_a21(3,atoms%ntypd) )
ALLOCATE ( f_b4(3,atoms%ntypd),f_b8(3,atoms%ntypd) )
ALLOCATE ( f_a12(3,atoms%ntype),f_a21(3,atoms%ntype) )
ALLOCATE ( f_b4(3,atoms%ntype),f_b8(3,atoms%ntype) )
f_b4(:,:) = czero ; f_a12(:,:) = czero
f_b8(:,:) = czero ; f_a21(:,:) = czero
ELSE
......@@ -316,8 +316,8 @@ CONTAINS
OPEN (23,file='mcd_inp',STATUS='old',FORM='formatted')
READ (23,*) emcd_lo,emcd_up
CLOSE (23)
ALLOCATE ( m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntypd,2) )
ALLOCATE ( mcd(3*atoms%ntypd,dimension%nstd,dimension%neigd) )
ALLOCATE ( m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntype,2) )
ALLOCATE ( mcd(3*atoms%ntype,dimension%nstd,dimension%neigd) )
IF (.not.banddos%dos) WRITE (*,*) 'For mcd-spectra set banddos%dos=T!'
ELSE
ALLOCATE ( m_mcd(1,1,1,1),mcd(1,1,1) )
......@@ -341,18 +341,18 @@ CONTAINS
!+lo
!---> if local orbitals are used, the eigenvector has a higher
!---> dimension then nvd
ALLOCATE ( aclo(atoms%nlod,atoms%ntypd,jsp_start:jsp_end), &
bclo(atoms%nlod,atoms%ntypd,jsp_start:jsp_end),&
cclo(atoms%nlod,atoms%nlod,atoms%ntypd,jsp_start:jsp_end),&
acnmt(0:atoms%lmaxd,atoms%nlod,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end), &
bcnmt(0:atoms%lmaxd,atoms%nlod,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end), &
ccnmt(atoms%nlod,atoms%nlod,sphhar%nlhd,atoms%ntypd,jsp_start:jsp_end) )
ALLOCATE ( aclo(atoms%nlod,atoms%ntype,jsp_start:jsp_end), &
bclo(atoms%nlod,atoms%ntype,jsp_start:jsp_end),&
cclo(atoms%nlod,atoms%nlod,atoms%ntype,jsp_start:jsp_end),&
acnmt(0:atoms%lmaxd,atoms%nlod,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end), &
bcnmt(0:atoms%lmaxd,atoms%nlod,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end), &
ccnmt(atoms%nlod,atoms%nlod,sphhar%nlhd,atoms%ntype,jsp_start:jsp_end) )
aclo(:,:,:) = 0.0 ; bclo(:,:,:) = 0.0 ; ccnmt(:,:,:,:,:) = 0.0
acnmt(:,:,:,:,:)=0.0 ; bcnmt(:,:,:,:,:)=0.0 ; cclo(:,:,:,:)=0.0
ALLOCATE ( qis(dimension%neigd,kpts%nkptd,dimension%jspd), &
qvac(dimension%neigd,2,kpts%nkptd,dimension%jspd), &
qvlay(dimension%neigd,vacuum%layerd,2,kpts%nkptd,dimension%jspd) )
ALLOCATE ( qis(dimension%neigd,kpts%nkpt,dimension%jspd), &
qvac(dimension%neigd,2,kpts%nkpt,dimension%jspd), &
qvlay(dimension%neigd,vacuum%layerd,2,kpts%nkpt,dimension%jspd) )
qvac(:,:,:,:)=0.0 ; qvlay(:,:,:,:,:)=0.0
skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype))
......@@ -426,7 +426,7 @@ CONTAINS
IF ((banddos%ndir.EQ.-3).AND.banddos%dos) THEN
IF (oneD%odi%d1) CALL juDFT_error("layer-resolved feature does not work with 1D",calledby ="cdnval")
CALL slab_dim(atoms, nsld)
ALLOCATE ( nmtsl(atoms%ntypd,nsld),nslat(atoms%natd,nsld) )
ALLOCATE ( nmtsl(atoms%ntype,nsld),nslat(atoms%nat,nsld) )
ALLOCATE ( zsl(2,nsld),volsl(nsld) )
ALLOCATE ( volintsl(nsld) )
CALL slabgeom(&
......@@ -435,8 +435,8 @@ CONTAINS
ALLOCATE ( qintsl(nsld,dimension%neigd))
ALLOCATE ( qmtsl(nsld,dimension%neigd))
ALLOCATE ( orbcomp(dimension%neigd,23,atoms%natd) )
ALLOCATE ( qmtp(dimension%neigd,atoms%natd) )
ALLOCATE ( orbcomp(dimension%neigd,23,atoms%nat) )
ALLOCATE ( qmtp(dimension%neigd,atoms%nat) )
IF (.NOT.input%film) qvac(:,:,:,jspin) = 0.0
ELSE
ALLOCATE(nmtsl(1,1),nslat(1,1),zsl(1,1),volsl(1),volintsl(1))
......@@ -678,27 +678,27 @@ CONTAINS
!---> valence density in the atomic spheres
!---> construct a(tilta) and b(tilta)
IF (noco%l_mperp) THEN
ALLOCATE ( acof(noccbd,0:dimension%lmd,atoms%natd,dimension%jspd),&
ALLOCATE ( acof(noccbd,0:dimension%lmd,atoms%nat,dimension%jspd),&
! Deallocated before call to sympsi
bcof(noccbd,0:dimension%lmd,atoms%natd,dimension%jspd), &
ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd,dimension%jspd) )
bcof(noccbd,0:dimension%lmd,atoms%nat,dimension%jspd), &
ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat,dimension%jspd) )
ELSE
ALLOCATE ( acof(noccbd,0:dimension%lmd,atoms%natd,jspin:jspin),&
bcof(noccbd,0:dimension%lmd,atoms%natd,jspin:jspin),&
ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd,jspin:jspin) )
ALLOCATE ( acof(noccbd,0:dimension%lmd,atoms%nat,jspin:jspin),&
bcof(noccbd,0:dimension%lmd,atoms%nat,jspin:jspin),&
ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat,jspin:jspin) )
END IF
DO ispin = jsp_start,jsp_end
IF (input%l_f) THEN
CALL timestart("cdnval: to_pulay")
ALLOCATE (e1cof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%natd),&
ALLOCATE (e1cof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
! Deallocated after call to force_a21
e2cof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%natd),&
acoflo(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd),&
bcoflo(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd),&
aveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%natd),&
bveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%natd),&
cveccof(3,-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd) )
e2cof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
acoflo(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat),&
bcoflo(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat),&
aveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
bveccof(3,noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat),&
cveccof(3,-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat) )
CALL to_pulay(input,atoms,noccbd,sym, lapw, noco,cell,bkpt,noccbd,eig,usdus,&
kveclo,ispin,oneD, acof(:,0:,:,ispin),bcof(:,0:,:,ispin),&
e1cof,e2cof,aveccof,bveccof, ccof(-atoms%llod,1,1,1,ispin),acoflo,bcoflo,cveccof,zMat,l_real)
......
......@@ -37,17 +37,17 @@ CONTAINS
LOGICAL, INTENT (IN) :: l_mcd,l_evp
! ..
! .. Array Arguments ..
INTEGER, INTENT (IN) :: ncore(atoms%ntypd)
INTEGER, INTENT (IN) :: ncore(atoms%ntype)
REAL, INTENT (IN) :: eig(:)!(dimension%neigd),
REAL, INTENT (IN) :: we(noccbd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd)
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%natd)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%natd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat)
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(noccbd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (IN) :: m_mcd(:,:,:,:)!(dimension%nstd,(3+1)**2,3*ntypd ,2)
REAL, INTENT (OUT) :: enerlo(atoms%nlod,atoms%ntypd),sqlo(atoms%nlod,atoms%ntypd)
REAL, INTENT (OUT) :: ener(0:3,atoms%ntypd),sqal(0:3,atoms%ntypd)
REAL, INTENT (OUT) :: qal(0:,:,:)!(0:3,atoms%ntypd,dimension%neigd)
REAL, INTENT (OUT) :: mcd(:,:,:)!(3*atoms%ntypd,dimension%nstd,dimension%neigd)
REAL, INTENT (OUT) :: enerlo(atoms%nlod,atoms%ntype),sqlo(atoms%nlod,atoms%ntype)
REAL, INTENT (OUT) :: ener(0:3,atoms%ntype),sqal(0:3,atoms%ntype)
REAL, INTENT (OUT) :: qal(0:,:,:)!(0:3,atoms%ntype,dimension%neigd)
REAL, INTENT (OUT) :: mcd(:,:,:)!(3*atoms%ntype,dimension%nstd,dimension%neigd)
! ..
! .. Local Scalars ..
......@@ -57,8 +57,8 @@ CONTAINS
COMPLEX suma,sumb,sumab,sumba
! ..
! .. Local Arrays ..
REAL qlo(noccbd,atoms%nlod,atoms%nlod,atoms%ntypd)
REAL qaclo(noccbd,atoms%nlod,atoms%ntypd),qbclo(noccbd,atoms%nlod,atoms%ntypd)
REAL qlo(noccbd,atoms%nlod,atoms%nlod,atoms%ntype)
REAL qaclo(noccbd,atoms%nlod,atoms%ntype),qbclo(noccbd,atoms%nlod,atoms%ntype)
! ..
!
!---> initialize ener, sqal, enerlo and sqlo on first call
......
......@@ -29,10 +29,10 @@ CONTAINS
INTEGER, INTENT (IN) :: itype
! ..
! .. Array Arguments ..
REAL, INTENT (IN) :: chmom(:,:)!(atoms%ntypd,dimension%jspd)
REAL, INTENT (IN) :: alphdiff(atoms%ntypd)
REAL, INTENT (IN) :: vr0(:,:,:)!(atoms%jmtd,atoms%ntypd,jspd)
COMPLEX, INTENT (IN) :: qa21(atoms%ntypd)
REAL, INTENT (IN) :: chmom(:,:)!(atoms%ntype,dimension%jspd)
REAL, INTENT (IN) :: alphdiff(atoms%ntype)
REAL, INTENT (IN) :: vr0(:,:,:)!(atoms%jmtd,atoms%ntype,jspd)
COMPLEX, INTENT (IN) :: qa21(atoms%ntype)
! ..
! .. Local Scalars ..
INTEGER iri
......@@ -42,7 +42,7 @@ CONTAINS
COMPLEX rho21
! ..
! .. Local Arrays ..
REAL b_xc_h(atoms%jmtd),b_xav(atoms%ntypd)
REAL b_xc_h(atoms%jmtd),b_xav(atoms%ntype)
!---> calculated the comp. of the local moment vector
......
......@@ -29,7 +29,7 @@ CONTAINS
REAL, INTENT (IN) :: we(:)!(dimension%neigd)
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(nobd,0:atoms%lmaxd*(lmaxd+2) ,natd)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(nobd,0:atoms%lmaxd*(lmaxd+2) ,natd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:,:,:,:)!(-llod:llod,nobd,atoms%nlod,atoms%natd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:,:,:,:)!(-llod:llod,nobd,atoms%nlod,atoms%nat)
COMPLEX, INTENT (INOUT) :: n_mmp(-3:3,-3:3,atoms%n_u)
! ..
! .. Local Scalars ..
......
......@@ -103,9 +103,9 @@ CONTAINS
INTEGER,INTENT(IN) :: ikpt,jspin
COMPLEX,INTENT(INOUT) :: qpw(:,:) !(stars%n3d,dimension%jspd)
COMPLEX,INTENT(INOUT) :: cdom(:)!(stars%n3d)
REAL,INTENT(OUT) :: qis(:,:,:) !(dimension%neigd,kpts%nkptd,dimension%jspd)
COMPLEX, INTENT (INOUT) :: f_b8(3,atoms%ntypd)
REAL, INTENT (INOUT) :: forces(:,:,:) !(3,atoms%ntypd,dimension%jspd)
REAL,INTENT(OUT) :: qis(:,:,:) !(dimension%neigd,kpts%nkpt,dimension%jspd)
COMPLEX, INTENT (INOUT) :: f_b8(3,atoms%ntype)
REAL, INTENT (INOUT) :: forces(:,:,:) !(3,atoms%ntype,dimension%jspd)
!
!-----> LOCAL VARIABLES
!
......
......@@ -21,7 +21,7 @@ CONTAINS
! ..
! .. Array Arguments ..
INTEGER, INTENT (IN) :: kv(3)
INTEGER, INTENT (IN) :: nmtsl1(atoms%ntypd)
INTEGER, INTENT (IN) :: nmtsl1(atoms%ntype)
! ..
! .. Local Scalars ..
COMPLEX s1,sfs
......
......@@ -26,9 +26,9 @@ CONTAINS
INTEGER, INTENT (IN) :: ne,isp ,nsl
! ..
! .. Array Arguments ..
INTEGER, INTENT (IN) :: nmtsl(atoms%ntypd,nsl)
REAL, INTENT (IN) :: volintsl(atoms%natd)
REAL, INTENT (IN) :: zsl(2,atoms%natd) ,volsl(atoms%natd)
INTEGER, INTENT (IN) :: nmtsl(atoms%ntype,nsl)
REAL, INTENT (IN) :: volintsl(atoms%nat)
REAL, INTENT (IN) :: zsl(2,atoms%nat) ,volsl(atoms%nat)
REAL, INTENT (OUT):: qintslk(:,:)!(nsl,dimension%neigd)
LOGICAL,OPTIONAL, INTENT (IN) :: realdata
! ..
......
......@@ -21,10 +21,10 @@ CONTAINS
INTEGER, INTENT (IN) :: nsl,nsld
! ..
! .. Array Arguments ..
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,nobd,atoms%nlod,atoms%natd)
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(nobd,0:dimension%lmd,atoms%natd)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(nobd,0:dimension%lmd,atoms%natd)
INTEGER, INTENT (IN) :: nmtsl(atoms%ntypd,atoms%natd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,nobd,atoms%nlod,atoms%nat)
COMPLEX, INTENT (IN) :: acof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat)
COMPLEX, INTENT (IN) :: bcof(:,0:,:)!(nobd,0:dimension%lmd,atoms%nat)
INTEGER, INTENT (IN) :: nmtsl(atoms%ntype,atoms%nat)
REAL, INTENT (OUT) :: qmtslk(:,:)!(nsl,dimension%neigd)
! ..
! .. Local Scalars ..
......@@ -41,9 +41,9 @@ CONTAINS
INTRINSIC conjg,cmplx
ALLOCATE ( qlo(nobd,atoms%nlod,atoms%ntypd),qmt(atoms%ntypd,SIZE(qmtslk,2)) )
ALLOCATE ( qaclo(nobd,atoms%nlod,atoms%ntypd),qbclo(nobd,atoms%nlod,atoms%ntypd) )
ALLOCATE ( qmttot(atoms%ntypd,SIZE(qmtslk,2)),qmtlo(atoms%ntypd,SIZE(qmtslk,2)) )
ALLOCATE ( qlo(nobd,atoms%nlod,atoms%ntype),qmt(atoms%ntype,SIZE(qmtslk,2)) )
ALLOCATE ( qaclo(nobd,atoms%nlod,atoms%ntype),qbclo(nobd,atoms%nlod,atoms%ntype) )
ALLOCATE ( qmttot(atoms%ntype,SIZE(qmtslk,2)),qmtlo(atoms%ntype,SIZE(qmtslk,2)) )
!
!---> l-decomposed density for each valence state
!
......
......@@ -19,14 +19,14 @@ CONTAINS
INTEGER, INTENT (IN) :: noccbd
! ..
! .. Array Arguments ..
REAL, INTENT (INout) :: we(noccbd),qal(0:,:,:,:)!(0:3,atoms%ntypd,DIMENSION%neigd,input%jspins)
REAL, INTENT (IN) :: uloulopn21(atoms%nlod,atoms%nlod,atoms%ntypd)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%natd,input%jspins)
COMPLEX, INTENT (IN) :: acof(:,0:,:,:)!(noccbd,0:DIMENSION%lmd,atoms%natd,input%jspins)
COMPLEX, INTENT (IN) :: bcof(:,0:,:,:)!(noccbd,0:DIMENSION%lmd,atoms%natd,input%jspins)
REAL, INTENT (OUT) :: qmat(0:,:,:,:)!(0:3,atoms%ntypd,DIMENSION%neigd,4)
TYPE (t_mt21), INTENT (IN) :: mt21(0:atoms%lmaxd,atoms%ntypd)
TYPE (t_lo21), INTENT (IN) :: lo21(0:atoms%lmaxd,atoms%ntypd)
REAL, INTENT (INout) :: we(noccbd),qal(0:,:,:,:)!(0:3,atoms%ntype,DIMENSION%neigd,input%jspins)
REAL, INTENT (IN) :: uloulopn21(atoms%nlod,atoms%nlod,atoms%ntype)
COMPLEX, INTENT (IN) :: ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat,input%jspins)
COMPLEX, INTENT (IN) :: acof(:,0:,:,:)!(noccbd,0:DIMENSION%lmd,atoms%nat,input%jspins)
COMPLEX, INTENT (IN) :: bcof(:,0:,:,:)!(noccbd,0:DIMENSION%lmd,atoms%nat,input%jspins)
REAL, INTENT (OUT) :: qmat(0:,:,:,:)!(0:3,atoms%ntype,DIMENSION%neigd,4)
TYPE (t_mt21), INTENT (IN) :: mt21(0:atoms%lmaxd,atoms%ntype)
TYPE (t_lo21), INTENT (IN) :: lo21(0:atoms%lmaxd,atoms%ntype)
! ..
! .. Local Scalars ..
......@@ -38,10 +38,10 @@ CONTAINS
! ..
! .. Local Arrays ..
COMPLEX qlo(noccbd,atoms%nlod,atoms%nlod,atoms%ntypd)
COMPLEX qaclo(noccbd,atoms%nlod,atoms%ntypd),qbclo(noccbd,atoms%nlod,atoms%ntypd)
COMPLEX qcloa(noccbd,atoms%nlod,atoms%ntypd),qclob(noccbd,atoms%nlod,atoms%ntypd)
COMPLEX qal21(0:3,atoms%ntypd,size(qmat,3))
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,size(qmat,3))
COMPLEX q_loc(2,2),q_hlp(2,2),chi(2,2)
! ..
! .. Intrinsic Functions ..
......
......@@ -39,7 +39,7 @@ CONTAINS
! ..
! .. Array Arguments ..
COMPLEX, INTENT (IN) :: qpwc(stars%n3d)
REAL, INTENT (INOUT) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntypd,dimension%jspd)
REAL, INTENT (INOUT) :: rho(:,0:,:,:) !(atoms%jmtd,0:sphhar%nlhd,atoms%ntype,dimension%jspd)
!-odim
!+odim
! ..
......@@ -51,9 +51,9 @@ CONTAINS
COMPLEX cp,sm,cprr2
! ..
! .. Local Arrays ..