Commit da660049 authored by Daniel Wortmann's avatar Daniel Wortmann

more removal of dimension type, cleanup...

parent 989c1cb3
......@@ -164,7 +164,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
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 (l_coreSpec) CALL corespec_rme(atoms,input,iType,dimension%nstd,input%jspins,jspin,results%ef,&
IF (l_coreSpec) CALL corespec_rme(atoms,input,iType,29,input%jspins,jspin,results%ef,&
atoms%msh,vTot%mt(:,0,:,:),f,g)
END DO
DEALLOCATE (f,g,flo)
......
......@@ -35,7 +35,7 @@ CONTAINS
END IF
CALL timestart("tlmplm")
CALL td%init(DIMENSION%lmplmd,DIMENSION%lmd,atoms%ntype,atoms%lmaxd,atoms%llod,SUM(atoms%nlo),&
CALL td%init(DIMENSION%lmd,atoms%ntype,atoms%lmaxd,atoms%llod,SUM(atoms%nlo),&
DOT_PRODUCT(atoms%nlo,atoms%nlo+1)/2,MERGE(4,input%jspins,noco%l_mtNocoPot),&
(noco%l_noco.AND.noco%l_soc.AND..NOT.noco%l_ss).OR.noco%l_constr)!l_offdiag
......
......@@ -126,7 +126,7 @@ CONTAINS
READ(str,*) this%ntetra(:,n)
ENDDO
END IF
kpts%wtkpt=kpts%wtkpt/sum(kpts%wtkpt) !Normalize k-point weight
this%wtkpt=this%wtkpt/sum(this%wtkpt) !Normalize k-point weight
END SUBROUTINE read_xml_kpts
SUBROUTINE print_xml(kpts,fh,filename)
......
......@@ -131,11 +131,11 @@ MODULE m_types_noco
ENDDO
END SUBROUTINE read_xml_noco
subroutine init_noco(this,atoms)
subroutine init_noco(noco,atoms)
use m_types_atoms
use m_constants
CLASS(t_noco),INTENT(inout):: noco
types(t_atoms),INTENT(IN)::atoms
TYPE(t_atoms),INTENT(IN)::atoms
integer :: na,itype
......
......@@ -134,8 +134,10 @@ MODULE m_types_oneD
END SUBROUTINE read_xml_oneD
subroutine init_oneD(oneD)
class(t_oned),intent(inout)::this
SUBROUTINE init_oneD(oneD,atoms)
USE m_types_atoms
CLASS(t_oned),INTENT(inout)::oneD
TYPE(t_atoms),INTENT(in)::atoms
! Initialize missing 1D code arrays
......
......@@ -58,7 +58,7 @@ CONTAINS
COMPLEX dtd,dtu,utd,utu
INTEGER lo, mlotot, mlolotot, mlot_d, mlolot_d
INTEGER i,ie,im,in,l1,l2,ll1,ll2,lm1,lm2,m1,m2,n,natom,m,i_u
INTEGER natrun,is,isinv,j,irinv,it
INTEGER natrun,is,isinv,j,irinv,it,lmplmd
REAL ,PARAMETER:: zero=0.0
COMPLEX,PARAMETER:: czero=CMPLX(0.,0.)
! ..
......@@ -73,7 +73,7 @@ CONTAINS
CALL timestart("force_a21")
!dimension%lmplmd = (dimension%lmd* (dimension%lmd+3))/2
lmplmd = (dimension%lmd* (dimension%lmd+3))/2
mlotot = 0 ; mlolotot = 0
DO n = 1, atoms%ntype
mlotot = mlotot + atoms%nlo(n)
......@@ -81,8 +81,8 @@ CONTAINS
ENDDO
mlot_d = MAX(mlotot,1)
mlolot_d = MAX(mlolotot,1)
ALLOCATE ( tlmplm%tdd(0:DIMENSION%lmplmd,atoms%ntype,1),tlmplm%tuu(0:DIMENSION%lmplmd,atoms%ntype,1),&
tlmplm%tdu(0:DIMENSION%lmplmd,atoms%ntype,1),tlmplm%tud(0:DIMENSION%lmplmd,atoms%ntype,1),&
ALLOCATE ( tlmplm%tdd(0:lmplmd,atoms%ntype,1),tlmplm%tuu(0:lmplmd,atoms%ntype,1),&
tlmplm%tdu(0:lmplmd,atoms%ntype,1),tlmplm%tud(0:lmplmd,atoms%ntype,1),&
tlmplm%tuulo(0:DIMENSION%lmd,-atoms%llod:atoms%llod,mlot_d,1),&
tlmplm%tdulo(0:DIMENSION%lmd,-atoms%llod:atoms%llod,mlot_d,1),&
tlmplm%tuloulo(-atoms%llod:atoms%llod,-atoms%llod:atoms%llod,mlolot_d,1),&
......
......@@ -37,7 +37,7 @@
!-odim
!+odim
! .. Array Arguments ..
REAL, INTENT (IN) :: p(3,DIMENSION%nspd)
REAL, INTENT (IN) :: p(:,:)!(3,DIMENSION%nspd)
! ..
! .. Local Scalars ..
REAL av,dms,rms,s,ir2,help,phi
......@@ -47,7 +47,7 @@
! ..
! .. Local Arrays ..
COMPLEX sf2(stars%ng2),sf3(stars%ng3),ylm( (atoms%lmaxd+1)**2 )
REAL rcc(3),v1(DIMENSION%nspd),v2(DIMENSION%nspd),x(3),ri(3)
REAL rcc(3),v1(SIZE(p,2)),v2(SIZE(p,2)),x(3),ri(3)
l_cdn = .FALSE. ! By default we assume that the input is a potential.
IF (potden%potdenType.LE.0) CALL juDFT_error('unknown potden type', calledby='checkdop')
......
......@@ -36,13 +36,13 @@ SUBROUTINE checkDOPAll(input,dimension,sphhar,stars,atoms,sym,vacuum,oneD,&
INTEGER :: npd, nat, n, ivac
REAL :: signum
REAL :: xp(3,dimension%nspd)
REAL :: xp(3,(atoms%lmaxd+1+MOD(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1))!(3,dimension%nspd)
CALL timestart("checkDOPAll")
IF ((input%film).AND.(.NOT.oneD%odi%d1)) THEN
!---> vacuum boundaries
npd = min(dimension%nspd,25)
npd = MIN(SIZE(xp,2),25)
CALL points(xp,npd)
DO ivac = 1,vacuum%nvac
signum = 3.0 - 2.0*ivac
......@@ -51,7 +51,7 @@ SUBROUTINE checkDOPAll(input,dimension,sphhar,stars,atoms,sym,vacuum,oneD,&
sphhar,stars,sym,vacuum,cell,oneD,potden)
END DO
ELSE IF (oneD%odi%d1) THEN
npd = min(dimension%nspd,25)
npd = min(SIZE(xp,2),25)
CALL cylpts(xp,npd,cell%z1)
CALL checkdop(xp,npd,0,0,ivac,1,ispin,dimension,atoms,&
sphhar,stars,sym,vacuum,cell,oneD,potden)
......@@ -60,8 +60,8 @@ SUBROUTINE checkDOPAll(input,dimension,sphhar,stars,atoms,sym,vacuum,oneD,&
!---> m.t. boundaries
nat = 1
DO n = 1, atoms%ntype
CALL sphpts(xp,dimension%nspd,atoms%rmt(n),atoms%pos(1,nat))
CALL checkdop(xp,dimension%nspd,n,nat,0,-1,ispin,&
CALL sphpts(xp,SIZE(xp,2),atoms%rmt(n),atoms%pos(1,nat))
CALL checkdop(xp,SIZE(xp,2),n,nat,0,-1,ispin,&
dimension,atoms,sphhar,stars,sym,vacuum,cell,oneD,potden)
nat = nat + atoms%neq(n)
END DO
......
......@@ -51,7 +51,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
! local arrays
REAL, ALLOCATABLE :: basprod(:)
INTEGER :: degenerat(DIMENSION%neigd2+1,kpts%nkpt)
INTEGER :: degenerat(MERGE(DIMENSION%neigd*2,DIMENSION%neig,noco%l_soc)+1,kpts%nkpt)
LOGICAL :: skip_kpt(kpts%nkpt)
INTEGER :: g(3)
......@@ -70,7 +70,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
ALLOCATE(zmat(kpts%nkptf),stat=ok)
IF(ok.NE.0) STOP 'eigen_hf: failure allocation z_c'
ALLOCATE (eig_irr(DIMENSION%neigd2,kpts%nkpt), stat=ok)
ALLOCATE (eig_irr(MERGE(2*DIMENSION%neigd,DIMENSION%neigd,noco%l_soc),kpts%nkpt), stat=ok)
IF(ok.NE.0) STOP 'eigen_hf: failure allocation eig_irr'
ALLOCATE (hybdat%kveclo_eig(atoms%nlotot,kpts%nkpt), stat=ok)
IF(ok.NE.0) STOP 'eigen_hf: failure allocation hybdat%kveclo_eig'
......@@ -88,7 +88,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
nrec1 = kpts%nkpt*(jsp-1) + nk
CALL lapw%init(input,noco,kpts,atoms,sym,nk,cell,sym%zrfs)
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
CALL zMat(nk)%init(l_real,nbasfcn,dimension%neigd2)
CALL zMat(nk)%init(l_real,nbasfcn,MERGE(2*DIMENSION%neigd,DIMENSION%neigd,noco%l_soc))
CALL read_eig(eig_id_hf,nk,jsp,zmat=zMat(nk))
eig_irr(:,nk) = results%eig(:,nk,jsp)
hybrid%ne_eig(nk) = results%neig(nk,jsp)
......@@ -96,7 +96,7 @@ SUBROUTINE hf_setup(hybrid,input,sym,kpts,DIMENSION,atoms,mpi,noco,cell,oneD,res
!Allocate further space
DO nk = kpts%nkpt+1, kpts%nkptf
nbasfcn = zMat(kpts%bkp(nk))%matsize1
CALL zMat(nk)%init(l_real,nbasfcn,dimension%neigd2)
CALL zMat(nk)%init(l_real,nbasfcn,MERGE(2*DIMENSION%neigd,DIMENSION%neigd,noco%l_soc))
END DO
!determine degenerate states at each k-point
......
......@@ -91,7 +91,7 @@ CONTAINS
END IF
hybrid%l_subvxc = (hybrid%l_subvxc.AND.hybrid%l_addhf)
IF(.NOT.ALLOCATED(results%w_iks)) ALLOCATE (results%w_iks(DIMENSION%neigd2,kpts%nkpt,input%jspins))
IF(.NOT.ALLOCATED(results%w_iks)) ALLOCATE (results%w_iks(MERGE(2*DIMENSION%neigd,DIMENSION%neigd,noco%l_soc),kpts%nkpt,input%jspins))
IF (.NOT.hybrid%l_calhf) RETURN !use existing non-local potential
......
......@@ -312,9 +312,9 @@
LOGICAL, SAVE :: first = .true.
! - local arrays -
INTEGER :: kappa(dimension%nstd),nprnc(dimension%nstd)
INTEGER :: kappa(29),nprnc(29)
REAL :: vrd(atoms%msh)
REAL :: occ(dimension%nstd),occ_h(dimension%nstd,2),a(atoms%msh),b(atoms%msh)
REAL :: occ(29),occ_h(29,2),a(atoms%msh),b(atoms%msh)
REAL,ALLOCATABLE,SAVE:: vr0(:,:,:)
! - intrinsic functions -
......@@ -493,9 +493,9 @@
REAL :: d,dxx,rn,rnot,z,t1,rr
! - local arrays -
INTEGER :: kappa(dimension%nstd),nprnc(dimension%nstd)
INTEGER :: nindxcr(0:dimension%nstd,atoms%ntype)
REAL :: occ(dimension%nstd),occ_h(dimension%nstd,2),a(atoms%msh),b(atoms%msh)
INTEGER :: kappa(29),nprnc(29)
INTEGER :: nindxcr(0:29,atoms%ntype)
REAL :: occ(29),occ_h(29,2),a(atoms%msh),b(atoms%msh)
INTEGER :: lmaxc(atoms%ntype)
......
......@@ -70,7 +70,7 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
CALL MPI_BCAST(sphhar%ntypsd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(sphhar%memd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(input%jspins,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(dimension%nstd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(29,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kimax,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(stars%kimax2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(dimension%nvd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
......@@ -146,9 +146,9 @@ SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
ALLOCATE(atoms%lo1l(0:atoms%llod,atoms%ntype))
ALLOCATE(atoms%nlol(0:atoms%llod,atoms%ntype))
ALLOCATE(atoms%coreStateOccs(dimension%nstd,2,atoms%ntype));atoms%coreStateOccs=0.0
ALLOCATE(atoms%coreStateNprnc(dimension%nstd,atoms%ntype))
ALLOCATE(atoms%coreStateKappa(dimension%nstd,atoms%ntype))
ALLOCATE(atoms%coreStateOccs(29,2,atoms%ntype));atoms%coreStateOccs=0.0
ALLOCATE(atoms%coreStateNprnc(29,atoms%ntype))
ALLOCATE(atoms%coreStateKappa(29,atoms%ntype))
ALLOCATE(vacuum%izlay(vacuum%layerd,2))
......
......@@ -5,8 +5,8 @@
!--------------------------------------------------------------------------------
MODULE m_make_xcpot
implicit none
use m_juDFT
implicit none
private
public make_xcpot
......
......@@ -24,7 +24,7 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
use m_lapwdim
use m_make_stars
use m_make_sphhar
use m_make_forectheo
use m_make_forcetheo
use m_make_xcpot
use m_make_sym
USE m_convn
......@@ -56,7 +56,6 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
TYPE(t_enpara) ,INTENT(OUT) :: enpara
TYPE(t_sphhar) ,INTENT (OUT) :: sphhar
TYPE(t_field), INTENT(INOUT) :: field
LOGICAL, INTENT (OUT) :: l_opti
LOGICAL, INTENT (IN) :: l_kpts
INTEGER :: i, j, n, na, n1, n2, iType, l, ilo, ikpt
......@@ -78,14 +77,14 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Start of input postprocessing (calculate missing parameters)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
call cell%init(DOT_PRODUCT(atoms%volmts(:),atoms%neq(:))
call cell%init(DOT_PRODUCT(atoms%volmts(:),atoms%neq(:)))
call atoms%init(cell)
CALL sym%init(cell,input%film)
CALL enpara%init_enpara(atoms,input%jspins,input%film,enparaXML)
CALL make_sym(sym,cell,atoms,noco,oneD,input)
call make_forectheo(forcetheo_data,cell,sym,atoms,forcetheo)
call make_forcetheo(forcetheo_data,cell,sym,atoms,forcetheo)
call make_xcpot(xcpot,atoms,input)
IF (mpi%irank.EQ.0) call check_input_switches(banddos,vacuum,noco,atoms,input)
......@@ -111,12 +110,13 @@ SUBROUTINE postprocessInput(mpi,input,field,sym,stars,atoms,vacuum,kpts,&
IF (noco%l_noco) dimension%neigd = 2*dimension%neigd
CALL ylmnorm_init(atoms%lmaxd)
dimension%nspd=(atoms%lmaxd+1+mod(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1)
call oneD%init()
call oneD%init(atoms)
! Initialize missing hybrid functionals arrays
ALLOCATE (hybrid%nindx(0:atoms%lmaxd,atoms%ntype))
! Check muffin tin radii
......
......@@ -147,7 +147,7 @@
atoms%jmtd = 0
rmtmax = 0.0
dimension%neigd = 0
dimension%nstd = maxval(atoms%econf%num_core_states)
29 = maxval(atoms%econf%num_core_states)
atoms%lmaxd = maxval(atoms%lmax)
atoms%jmtd = maxval(atoms%jri)
rmtmax = maxval(atoms%rmt)
......@@ -364,7 +364,7 @@
!
CALL inpeig_dim(input,cell,noco,oneD,kpts,dimension,stars,latnam)
vacuum%layerd = max(vacuum%layerd,1)
dimension%nstd = max(dimension%nstd,30)
29 = max(29,30)
atoms%ntype = atoms%ntype
IF (noco%l_noco) dimension%neigd = 2*dimension%neigd
......
!--------------------------------------------------------------------------------
pd--------------------------------------------------------------------------------
! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
......@@ -57,7 +57,6 @@ CONTAINS
CALL dimen7(input,sym,stars,atoms,sphhar,dimension,vacuum,kpts,&
oneD,hybrid,cell)
! in case of a parallel calculation we have to broadcast
dimension%nspd=(atoms%lmaxd+1+mod(atoms%lmaxd+1,2))*(2*atoms%lmaxd+1)
vacuum%nmzd = 250
vacuum%nmzxyd = 100
......
......@@ -182,7 +182,7 @@
cell%amat(:,1) = a1(:)
cell%amat(:,2) = a2(:)
cell%amat(:,3) = a3(:)
call cell%init()
call cell%init(dot_product(atoms%volmts(:),atoms%neq(:)))
!CALL inv3(cell%amat,cell%bmat,cell%omtil)
!cell%bmat(:,:) = tpi_const*cell%bmat(:,:)
!cell%bbmat=MATMUL(cell%bmat,TRANSPOSE(cell%bmat))
......
......@@ -76,7 +76,7 @@
!-gu
WRITE (6,'(6x,''Nuclear mesh and core levels'')')
WRITE (6,8200) atoms%msh,dimension%nstd
WRITE (6,8200) atoms%msh,29
8200 FORMAT(6x,'parameter (msh=',i4,',nstd=',i2,')')
......
......@@ -163,7 +163,7 @@ CONTAINS
cell%amat(:,1) = aa*scale(:)*a1(:)
cell%amat(:,2) = aa*scale(:)*a2(:)
cell%amat(:,3) = aa*scale(:)*a3(:)
CALL cell%init()
CALL cell%init(0.0)
END SUBROUTINE read_inpgen_input
......
......@@ -195,9 +195,7 @@ CONTAINS
CALL mpi_bc_potden(mpi,stars,sphhar,atoms,input,vacuum,oneD,noco,inDen)
#endif
dimension%neigd2 = dimension%neigd
IF (noco%l_soc) dimension%neigd2 = dimension%neigd*2
!HF
IF (hybrid%l_hybrid) THEN
SELECT TYPE(xcpot)
......
......@@ -153,7 +153,6 @@ CONTAINS
!
DIMENSION%nbasfcn = DIMENSION%nvd + atoms%nat*atoms%nlod*(2*atoms%llod+1)
DIMENSION%lmd = atoms%lmaxd* (atoms%lmaxd+2)
DIMENSION%lmplmd = (DIMENSION%lmd* (DIMENSION%lmd+3))/2
IF (noco%l_noco) DIMENSION%nbasfcn = 2*DIMENSION%nbasfcn
......
......@@ -254,7 +254,7 @@ CONTAINS
CALL MPI_BCAST(noco%socscale,atoms%ntype,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
IF(input%l_inpXML) THEN
n = dimension%nstd*atoms%ntype
n = 29*atoms%ntype
CALL MPI_BCAST(atoms%numStatesProvided,atoms%ntype,MPI_INTEGER,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%coreStateOccs,2*n,MPI_DOUBLE_PRECISION,0,mpi%mpi_comm,ierr)
CALL MPI_BCAST(atoms%coreStateNprnc,n,MPI_INTEGER,0,mpi%mpi_comm,ierr)
......
......@@ -207,7 +207,8 @@ CONTAINS
!
! some basic arrays allocated in eigen()
!
mem = (dimension%lmplmd+1)*atoms%ntype*4 ! tlmplm%tuu,tlmplm%tdd etc.
mem = ((dimension%lmd* (dimension%lmd+3))/2+1)*atoms%ntype*4 ! tlmplm%tuu,tlmplm%tdd etc.
mem = mem + (dimension%lmd+1)*(2*atoms%llod+1)*max(mlotot,1)*2 ! tlmplm%tuulo ...
mem = mem + (2*atoms%llod+1)**2 * max(mlolotot,1) ! tlmplm%tuloulo
IF (noco%l_noco) mem = mem * 2 ! both spins
......
......@@ -30,8 +30,8 @@ CONTAINS
INTEGER, INTENT(IN) :: jrc, ntyp
REAL, INTENT(IN) :: rnot1, qdel
REAL, INTENT(OUT) :: rhoss(:, :) !(mshd,input%jspins),
REAL, INTENT(OUT) :: eig(dimension%nstd, input%jspins), vbar(input%jspins)
INTEGER, INTENT(OUT) :: nst, lnum(dimension%nstd)
REAL, INTENT(OUT) :: eig(29, input%jspins), vbar(input%jspins)
INTEGER, INTENT(OUT) :: nst, lnum(29)
LOGICAL,OPTIONAL,INTENT(IN)::l_valence
! ..
! .. Local Scalars ..
......@@ -41,11 +41,11 @@ CONTAINS
LOGICAL conv, lastit, l_start
! ..
! .. Local Arrays ..
REAL a(jrc), b(jrc), dens(jrc), occ(dimension%nstd, input%jspins)
REAL rad(jrc), rev(dimension%nstd, input%jspins), ahelp(jrc), ain(jrc),&
REAL a(jrc), b(jrc), dens(jrc), occ(29, input%jspins)
REAL rad(jrc), rev(29, input%jspins), ahelp(jrc), ain(jrc),&
& rh(jrc), vr(jrc), f(0:3),&
& vr1(jrc, input%jspins), vr2(jrc, input%jspins), vx(atoms%msh, input%jspins), vxc(atoms%msh, input%jspins)
INTEGER kappa(dimension%nstd), nprnc(dimension%nstd)
INTEGER kappa(29), nprnc(29)
! ..
! ..
! .. Data statements ..
......
......@@ -55,7 +55,7 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
REAL, ALLOCATABLE :: rat(:,:),eig(:,:,:),sigm(:)
REAL, ALLOCATABLE :: rh(:,:,:),rh1(:,:,:),rhoss(:,:)
REAL, ALLOCATABLE :: vacpar(:)
INTEGER lnum(DIMENSION%nstd,atoms%ntype),nst(atoms%ntype)
INTEGER lnum(29,atoms%ntype),nst(atoms%ntype)
INTEGER jrc(atoms%ntype)
LOGICAL l_found(0:3),llo_found(atoms%nlod),l_enpara,l_st
REAL :: occ(MAXVAL(atoms%econf%num_states),2)
......@@ -67,7 +67,7 @@ SUBROUTINE stden(mpi,sphhar,stars,atoms,sym,DIMENSION,vacuum,&
CALL den%init(stars,atoms,sphhar,vacuum,noco,input%jspins,POTDEN_TYPE_DEN)
ALLOCATE ( rat(atoms%msh,atoms%ntype),eig(DIMENSION%nstd,input%jspins,atoms%ntype) )
ALLOCATE ( rat(atoms%msh,atoms%ntype),eig(29,input%jspins,atoms%ntype) )
ALLOCATE ( rh(atoms%msh,atoms%ntype,input%jspins),rh1(atoms%msh,atoms%ntype,input%jspins) )
ALLOCATE ( vbar(2,atoms%ntype),sigm(vacuum%nmzd) )
ALLOCATE ( rhoss(atoms%msh,input%jspins) )
......
......@@ -374,12 +374,12 @@ SUBROUTINE mcd_init1(thisMCD,banddos,dimension,input,atoms,kpts)
TYPE(t_kpts), INTENT(IN) :: kpts
ALLOCATE (thisMCD%ncore(atoms%ntype))
ALLOCATE (thisMCD%e_mcd(atoms%ntype,input%jspins,dimension%nstd))
ALLOCATE (thisMCD%e_mcd(atoms%ntype,input%jspins,29))
IF (banddos%l_mcd) THEN
thisMCD%emcd_lo = banddos%e_mcd_lo
thisMCD%emcd_up = banddos%e_mcd_up
ALLOCATE (thisMCD%m_mcd(dimension%nstd,(3+1)**2,3*atoms%ntype,2))
ALLOCATE (thisMCD%mcd(3*atoms%ntype,dimension%nstd,dimension%neigd,kpts%nkpt,input%jspins) )
ALLOCATE (thisMCD%m_mcd(29,(3+1)**2,3*atoms%ntype,2))
ALLOCATE (thisMCD%mcd(3*atoms%ntype,29,dimension%neigd,kpts%nkpt,input%jspins) )
IF (.NOT.banddos%dos) WRITE (*,*) 'For mcd-spectra set banddos%dos=T!'
ELSE
ALLOCATE (thisMCD%m_mcd(1,1,1,1))
......
......@@ -6,14 +6,10 @@
MODULE m_types_dimension
TYPE t_dimension
INTEGER :: nspd
INTEGER :: nvd
INTEGER :: nv2d
INTEGER :: neigd !to be removed!!!
INTEGER :: neigd2
INTEGER :: nstd=29
INTEGER :: lmd
INTEGER :: lmplmd
INTEGER :: nbasfcn
END TYPE t_dimension
END MODULE m_types_dimension
......@@ -38,12 +38,14 @@ MODULE m_types_tlmplm
END TYPE t_tlmplm
PUBLIC t_tlmplm,t_rsoc
CONTAINS
SUBROUTINE tlmplm_init(td,lmplmd,lmd,ntype,lmaxd,llod,mlotot,mlolotot,jspins,l_offdiag)
SUBROUTINE tlmplm_init(td,lmd,ntype,lmaxd,llod,mlotot,mlolotot,jspins,l_offdiag)
USE m_judft
CLASS(t_tlmplm),INTENT(INOUT):: td
INTEGER,INTENT(in) :: lmplmd,lmd,ntype,lmaxd,llod,mlotot,mlolotot,jspins
INTEGER,INTENT(in) :: lmd,ntype,lmaxd,llod,mlotot,mlolotot,jspins
LOGICAL,INTENT(IN) :: l_offdiag
INTEGER :: err
INTEGER :: err ,lmplmd
lmplmd=(lmd*(lmd+3))/2
IF (ALLOCATED(td%tuu)) &
DEALLOCATE(td%tuu,td%tud,td%tdd,td%tdu,td%tdulo,td%tuulo,&
......
......@@ -30,7 +30,7 @@ CONTAINS
!
OPEN (741,file='fleur2tddft.dat',&
& form='unformatted',status='unknown')
WRITE (741) sphhar%memd,atoms%lmaxd,dimension%nspd,sphhar%nlhd,atoms%ntype,sym%nsymt
WRITE (741) sphhar%memd,atoms%lmaxd,sphhar%nlhd,atoms%ntype,sym%nsymt
WRITE (741) input%jspins,stars%ng3,stars%ng2,vacuum%nmzxyd,vacuum%nmzd,atoms%jmtd,&
& input%jspins,stars%ng3,stars%ng2,vacuum%nvac,atoms%ntype,sphhar%ntypsd,atoms%nat,&
& sym%invs,sym%invs2,input%film
......
......@@ -682,7 +682,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......@@ -697,7 +697,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......@@ -714,7 +714,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......
......@@ -672,7 +672,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
enddo
......@@ -686,7 +686,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSEIF(l_ms) THEN
......@@ -700,7 +700,7 @@ c*****************************************************************c
! + l_noco,.FALSE.,l_real,l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
ELSE
......
......@@ -265,7 +265,7 @@ CONTAINS
INTEGER :: doublespin,jspin_b,jspin3,jspin4,jspin5
INTEGER :: doublespin_max,nrec5
INTEGER :: count_i,count_j
INTEGER :: n1,n2,ii,jj
INTEGER :: n1,n2,ii,jj,lmplmd
COMPLEX :: interchi,vacchi,amnchi
COMPLEX :: phasfac,phasfac2,cmplx_1
......@@ -299,6 +299,7 @@ CONTAINS
!----<gwf
lmplmd = (dimension%lmd* (dimension%lmd+3))/2
!-----initializations
......@@ -382,7 +383,7 @@ CONTAINS
DIMENSION%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,&
stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,&
cell%volint,sym%symor,atoms%pos,results%ef,noco%l_soc,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,DIMENSION%lmplmd,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,lmplmd,&
sphhar%mlh,sphhar%nmem,sphhar%llh,atoms%lo1l,&
noco%theta,noco%phi)
......@@ -422,7 +423,7 @@ CONTAINS
vacuum%nmzxy,vacuum%nmz,vacuum%delz,sym%zrfs,stars%ig2,&
cell%area,sym%tau,atoms%zatom,stars%ng2,stars%kv2,sym%nop2,&
cell%volint,sym%symor,atoms%pos,results%ef,noco%l_soc,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,DIMENSION%lmplmd,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,lmplmd,&
sphhar%mlh,sphhar%nmem,sphhar%llh,atoms%lo1l,&
noco%theta,noco%phi,&
wann%l_ms,wann%l_sgwf,wann%l_socgwf,wann%aux_latt_const,&
......@@ -465,7 +466,7 @@ CONTAINS
vacuum%nmzxy,vacuum%nmz,vacuum%delz,sym%zrfs,stars%ig2,&
cell%area,sym%tau,atoms%zatom,stars%ng2,stars%kv2,sym%nop2,&
cell%volint,sym%symor,atoms%pos,results%ef,noco%l_soc,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,DIMENSION%lmplmd,&
sphhar%memd,atoms%lnonsph,sphhar%clnu,lmplmd,&
sphhar%mlh,sphhar%nmem,sphhar%llh,atoms%lo1l,&
noco%theta,noco%phi,&
wann%l_ms,wann%l_sgwf,wann%l_socgwf,wann%aux_latt_const,&
......@@ -771,7 +772,7 @@ CONTAINS
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......@@ -787,7 +788,7 @@ CONTAINS
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......@@ -802,7 +803,7 @@ CONTAINS
! + noco%l_noco,.FALSE.,l_real,noco%l_soc,.FALSE.,
! + mpi%n_size,filename=trim(fstart)//fending,
! + layers=vacuum%layers,nstars=vacuum%nstars,
! + ncored=DIMENSION%nstd,nsld=atoms%nat,
! + ncored=29,nsld=atoms%nat,
! + nat=atoms%nat,l_dos=banddos%dos.OR.input%cdinf,
! + l_mcd=banddos%l_mcd,l_orb=banddos%l_orb)
......
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