Commit aef7be8e authored by Gregor Michalicek's avatar Gregor Michalicek

Introduce more subroutines to t_denCoeffsOffdiag type

parent 57b086ad
......@@ -59,10 +59,6 @@ CONTAINS
USE m_forcea12
USE m_forcea21
USE m_checkdopall
USE m_int21 ! integrate (spin) off-diagonal radial functions
USE m_int21lo ! -"- for u_lo
USE m_rhomt21 ! calculate (spin) off-diagonal MT-density coeff's
USE m_rhonmt21 ! -"- non-MT-density coeff's
USE m_cdnmt ! calculate the density and orbital moments etc.
USE m_orbmom ! coeffd for orbital moments
USE m_qmtsl ! These subroutines divide the input%film into vacuum%layers
......@@ -82,7 +78,7 @@ CONTAINS
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_enpara), INTENT(INOUT) :: enpara
TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_obsolete), INTENT(IN) :: obsolete
TYPE(t_banddos), INTENT(IN) :: banddos
TYPE(t_sliceplot), INTENT(IN) :: sliceplot
......@@ -113,10 +109,10 @@ CONTAINS
! .. Local Scalars ..
INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp
INTEGER :: i,ie,ivac,j,k,l,n,ilo,nbands,noccbd
INTEGER :: i,ie,ivac,j,k,l,ilo,nbands,noccbd,iType
INTEGER :: skip_t,skip_tt
INTEGER :: nStart,nEnd,nbasfcn
LOGICAL :: l_evp,l_orbcomprot,l_real, l_write
LOGICAL :: l_orbcomprot,l_real, l_write
! ...Local Arrays ..
INTEGER, ALLOCATABLE :: jsym(:),ksym(:)
......@@ -186,24 +182,17 @@ CONTAINS
l_write = input%cdinf.AND.mpi%irank==0
DO n = 1,atoms%ntype
DO iType = 1,atoms%ntype
DO ispin = jsp_start, jsp_end
CALL genMTBasis(atoms,enpara,vTot,mpi,n,ispin,l_write,usdus,f(:,:,0:,ispin),g(:,:,0:,ispin),flo(:,:,:,ispin))
CALL genMTBasis(atoms,enpara,vTot,mpi,iType,ispin,l_write,usdus,f(:,:,0:,ispin),g(:,:,0:,ispin),flo(:,:,:,ispin))
END DO
IF (noco%l_mperp) THEN
DO l = 0,atoms%lmax(n)
CALL int_21(f,g,atoms,n,l,denCoeffsOffdiag)
END DO
DO ilo = 1, atoms%nlo(n)
CALL int_21lo(f,g,atoms,n,flo,ilo,denCoeffsOffdiag)
END DO
END IF
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,n,jspin)
IF (banddos%l_mcd) CALL mcd_init(atoms,input,dimension,vTot%mt(:,0,:,:),g,f,mcd,iType,jspin)
IF(l_cs) CALL corespec_rme(atoms,input,n,dimension%nstd,input%jspins,jspin,results%ef,&
IF(l_cs) CALL corespec_rme(atoms,input,iType,dimension%nstd,input%jspins,jspin,results%ef,&
dimension%msh,vTot%mt(:,0,:,:),f,g)
END DO
DEALLOCATE (f,g,flo)
......@@ -351,10 +340,7 @@ CONTAINS
END IF
END DO !---> end loop over ispin
IF (noco%l_mperp) THEN
CALL rhomt21(atoms,we,noccbd,eigVecCoeffs,denCoeffsOffdiag)
IF (denCoeffsOffdiag%l_fmpl) CALL rhonmt21(atoms,sphhar,we,noccbd,sym,eigVecCoeffs,denCoeffsOffdiag)
END IF
IF (noco%l_mperp) CALL denCoeffsOffdiag%calcCoefficients(atoms,sphhar,sym,eigVecCoeffs,we,noccbd)
199 CONTINUE
IF ((banddos%dos .OR. banddos%vacdos .OR. input%cdinf) ) THEN
......
......@@ -9,25 +9,13 @@ MODULE m_int21
!-----------------------------------------------------------
CONTAINS
SUBROUTINE int_21(f,g,atoms,ityp,l,denCoeffsOffdiag)
USE m_types
IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_denCoeffsOffdiag), INTENT(INOUT) :: denCoeffsOffdiag
INTEGER, INTENT (IN) :: l,ityp
REAL, INTENT (IN) :: f(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,dimension%jspd)
REAL, INTENT (IN) :: g(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,dimension%jspd)
CALL int_21_arrays(f,g,atoms,ityp,l,denCoeffsOffdiag%uu21n,denCoeffsOffdiag%ud21n,&
denCoeffsOffdiag%du21n,denCoeffsOffdiag%dd21n)
END SUBROUTINE int_21
SUBROUTINE int_21_arrays(f,g,atoms,ityp,l,uu21n,ud21n,du21n,dd21n)
SUBROUTINE int_21(f,g,atoms,ityp,l,uu21n,ud21n,du21n,dd21n)
USE m_intgr, ONLY : intgr3
USE m_types
USE m_types_setup
IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
INTEGER, INTENT (IN) :: l,ityp
......@@ -55,5 +43,6 @@ CONTAINS
+ g(:atoms%jri(ityp),2,l,2)*g(:atoms%jri(ityp),2,l,1)
CALL intgr3(uu_tmp,atoms%rmsh(:,ityp),atoms%dx(ityp),atoms%jri(ityp),dd21n(l,ityp))
END SUBROUTINE int_21_arrays
END SUBROUTINE int_21
END MODULE m_int21
......@@ -10,14 +10,17 @@ MODULE m_int21lo
!
!-----------------------------------------------------------
CONTAINS
SUBROUTINE int_21lo(f,g,atoms,n, flo,ilo,denCoeffsOffdiag)
SUBROUTINE int_21lo(f,g,atoms,n,flo,ilo,uulo21n,ulou21n,dulo21n,ulod21n,uloulop21n)
USE m_intgr, ONLY : intgr3
USE m_types
USE m_types
USE m_types_setup
IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_denCoeffsOffdiag), INTENT(INOUT) :: denCoeffsOffdiag
TYPE(t_atoms), INTENT(IN) :: atoms
REAL, INTENT(INOUT) :: uulo21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: ulou21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: dulo21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: ulod21n(atoms%nlod,atoms%ntype)
REAL, INTENT(INOUT) :: uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype)
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ilo,n
......@@ -38,22 +41,22 @@ CONTAINS
DO iri = 1, atoms%jri(n)
uu_tmp(iri) = f(iri,1,l,2)*flo(iri,1,ilo,1)+ f(iri,2,l,2)*flo(iri,2,ilo,1)
ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%uulo21n(ilo,n))
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uulo21n(ilo,n))
DO iri = 1, atoms%jri(n)
uu_tmp(iri) = f(iri,1,l,1)*flo(iri,1,ilo,2)+ f(iri,2,l,1)*flo(iri,2,ilo,2)
ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%ulou21n(ilo,n))
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulou21n(ilo,n))
!
! --> norm of product of du and ulo:
!
DO iri = 1, atoms%jri(n)
uu_tmp(iri) = g(iri,1,l,2)*flo(iri,1,ilo,1) + g(iri,2,l,2)*flo(iri,2,ilo,1)
ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%dulo21n(ilo,n))
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),dulo21n(ilo,n))
DO iri = 1, atoms%jri(n)
uu_tmp(iri) = g(iri,1,l,1)*flo(iri,1,ilo,2) + g(iri,2,l,1)*flo(iri,2,ilo,2)
ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%ulod21n(ilo,n))
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulod21n(ilo,n))
!
! --> norm of product of ulo and ulo':
!
......@@ -63,10 +66,10 @@ CONTAINS
DO iri = 1, atoms%jri(n)
uu_tmp(iri) = flo(iri,1,ilo,2)*flo(iri,1,ilop,1) + flo(iri,2,ilo,2)*flo(iri,2,ilop,1)
ENDDO
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),denCoeffsOffdiag%uloulop21n(ilo,ilop,n))
CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uloulop21n(ilo,ilop,n))
ELSE
denCoeffsOffdiag%uloulop21n(ilo,ilop,n) = 0.0
uloulop21n(ilo,ilop,n) = 0.0
ENDIF
ENDDO
......
......@@ -7,22 +7,33 @@ MODULE m_rhomt21
! FF
! ***************************************************************
CONTAINS
SUBROUTINE rhomt21(atoms,we,ne,eigVecCoeffs,denCoeffsOffdiag)
SUBROUTINE rhomt21(atoms,we,ne,eigVecCoeffs,uu21,ud21,du21,dd21,uulo21,dulo21,ulou21,ulod21,uloulop21)
USE m_types_setup
USE m_types_cdnval
USE m_types
IMPLICIT NONE
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs
TYPE(t_denCoeffsOffdiag),INTENT(INOUT) :: denCoeffsOffdiag
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ne
INTEGER, INTENT(IN) :: ne
! .. Array Arguments ..
REAL, INTENT (IN) :: we(:)!(nobd)
REAL, INTENT(IN) :: we(:)!(nobd)
COMPLEX, INTENT(INOUT) :: uu21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ud21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: du21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dd21(atoms%lmaxd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: uulo21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dulo21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ulou21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ulod21(atoms%nlod,atoms%ntype)
COMPLEX, INTENT(INOUT) :: uloulop21(atoms%nlod,atoms%nlod,atoms%ntype)
! .. Local Scalars ..
INTEGER i,l,lm ,itype,na,natom,lo,lop,m
INTEGER i,l,lm,itype,na,natom,lo,lop,m
natom = 0
DO itype = 1,atoms%ntype
DO na = 1,atoms%neq(itype)
......@@ -35,14 +46,10 @@ CONTAINS
lm = l* (l+1) + m
!---> sum over occupied bands
DO i = 1,ne
denCoeffsOffdiag%uu21(l,itype) = denCoeffsOffdiag%uu21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
denCoeffsOffdiag%ud21(l,itype) = denCoeffsOffdiag%ud21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
denCoeffsOffdiag%du21(l,itype) = denCoeffsOffdiag%du21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
denCoeffsOffdiag%dd21(l,itype) = denCoeffsOffdiag%dd21(l,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
uu21(l,itype) = uu21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
ud21(l,itype) = ud21(l,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
du21(l,itype) = du21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%acof(i,lm,natom,1)
dd21(l,itype) = dd21(l,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%bcof(i,lm,natom,1)
ENDDO ! i = 1,ne
ENDDO ! m = -l,l
ENDDO ! l
......@@ -55,14 +62,10 @@ CONTAINS
DO m = -l,l
lm = l* (l+1) + m
DO i = 1,ne
denCoeffsOffdiag%uulo21(lo,itype) = denCoeffsOffdiag%uulo21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
denCoeffsOffdiag%dulo21(lo,itype) = denCoeffsOffdiag%dulo21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
denCoeffsOffdiag%ulou21(lo,itype) = denCoeffsOffdiag%ulou21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
denCoeffsOffdiag%ulod21(lo,itype) = denCoeffsOffdiag%ulod21(lo,itype) +&
we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
uulo21(lo,itype) = uulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
dulo21(lo,itype) = dulo21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,2))*eigVecCoeffs%ccof(m,i,lo,natom,1)
ulou21(lo,itype) = ulou21(lo,itype) + we(i)* CONJG(eigVecCoeffs%acof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
ulod21(lo,itype) = ulod21(lo,itype) + we(i)* CONJG(eigVecCoeffs%bcof(i,lm,natom,1))*eigVecCoeffs%ccof(m,i,lo,natom,2)
ENDDO
ENDDO
!---> contribution of local orbital - local orbital terms
......@@ -71,8 +74,8 @@ CONTAINS
IF (atoms%llo(lop,itype).EQ.l) THEN
DO m = -l,l
DO i = 1,ne
denCoeffsOffdiag%uloulop21(lop,lo,itype) = denCoeffsOffdiag%uloulop21(lop,lo,itype)+&
we(i)*CONJG(eigVecCoeffs%ccof(m,i,lop,natom,2))*eigVecCoeffs%ccof(m,i,lo, natom,1)
uloulop21(lop,lo,itype) = uloulop21(lop,lo,itype)+&
we(i)*CONJG(eigVecCoeffs%ccof(m,i,lop,natom,2))*eigVecCoeffs%ccof(m,i,lo, natom,1)
ENDDO ! i = 1,ne
ENDDO ! m = -l,l
ENDIF
......
......@@ -11,24 +11,28 @@ MODULE m_rhonmt21
! pk`00 ff`01 gb`02
! *************************************************************
CONTAINS
SUBROUTINE rhonmt21(atoms,sphhar,we,ne,sym,eigVecCoeffs,denCoeffsOffdiag)
SUBROUTINE rhonmt21(atoms,sphhar,we,ne,sym,eigVecCoeffs,uunmt21,udnmt21,dunmt21,ddnmt21)
USE m_gaunt,ONLY:gaunt1
USE m_types
USE m_types_setup
USE m_types_cdnval
IMPLICIT NONE
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs
TYPE(t_denCoeffsOffdiag),INTENT(INOUT) :: denCoeffsOffdiag
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_eigVecCoeffs), INTENT(IN) :: eigVecCoeffs
! .. Scalar Arguments ..
INTEGER,INTENT(IN) :: ne
INTEGER, INTENT(IN) :: ne
! .. Array Arguments ..
REAL, INTENT(IN) :: we(:)!(nobd)
REAL, INTENT(IN) :: we(:)!(nobd)
COMPLEX, INTENT(INOUT) :: uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
COMPLEX, INTENT(INOUT) :: ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype)
! .. Local Scalars ..
COMPLEX coef, cconst, cil, coef1
......@@ -65,14 +69,14 @@ CONTAINS
IF (ABS(coef) >= 0 ) THEN
DO nb = 1,ne
cconst= we(nb) * coef
denCoeffsOffdiag%uunmt21(llp,lh,nn) = denCoeffsOffdiag%uunmt21(llp,lh,nn)+ &
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
denCoeffsOffdiag%udnmt21(llp,lh,nn) = denCoeffsOffdiag%udnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
denCoeffsOffdiag%dunmt21(llp,lh,nn) = denCoeffsOffdiag%dunmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
denCoeffsOffdiag%ddnmt21(llp,lh,nn) = denCoeffsOffdiag%ddnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
uunmt21(llp,lh,nn) = uunmt21(llp,lh,nn)+ &
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
udnmt21(llp,lh,nn) = udnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%acof(nb,lmp,nt,2))
dunmt21(llp,lh,nn) = dunmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%acof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
ddnmt21(llp,lh,nn) = ddnmt21(llp,lh,nn)+&
cconst * eigVecCoeffs%bcof(nb,lm,nt,1)*CONJG(eigVecCoeffs%bcof(nb,lmp,nt,2))
ENDDO ! nb
ENDIF ! (coef >= 0)
......
......@@ -47,14 +47,15 @@ io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f global/radsra.f math/intgr.F global/differ.f math/inwint.f
math/outint.f
math/outint.f xc-pot/gaunt.f math/grule.f
)
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90
global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90)
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77})
......
......@@ -44,7 +44,7 @@ MODULE m_radovlp
CALL radfun(l,itype,ispin,epar(l,itype,ispin),vr(:,0,itype,ispin), atoms,&
f(1,1,l,ispin),g(1,1,l,ispin),usdus, nodeu,noded,wronk)
ENDDO
CALL int_21_arrays(f,g,atoms,itype,l,uun21,udn21,dun21,ddn21)
CALL int_21(f,g,atoms,itype,l,uun21,udn21,dun21,ddn21)
ENDDO
ENDDO
......
......@@ -18,6 +18,7 @@ types/types_usdus.F90
types/types_cdnval.f90
types/types_field.F90
types/types_regionCharges.f90
types/types_denCoeffsOffdiag.f90
)
set(inpgen_F90 ${inpgen_F90}
......@@ -38,4 +39,5 @@ types/types_setup.F90
types/types_usdus.F90
types/types_cdnval.f90
types/types_regionCharges.f90
types/types_denCoeffsOffdiag.f90
)
......@@ -22,4 +22,6 @@ MODULE m_types
USE m_types_cdnval
USE m_types_field
USE m_types_regionCharges
USE m_types_denCoeffsOffdiag
END MODULE m_types
......@@ -60,46 +60,6 @@ PRIVATE
PROCEDURE,PASS :: init => denCoeffs_init
END TYPE t_denCoeffs
TYPE t_denCoeffsOffdiag
LOGICAL :: l_fmpl
! spherical
COMPLEX, ALLOCATABLE :: uu21(:,:)
COMPLEX, ALLOCATABLE :: dd21(:,:)
COMPLEX, ALLOCATABLE :: du21(:,:)
COMPLEX, ALLOCATABLE :: ud21(:,:)
! nonspherical
COMPLEX, ALLOCATABLE :: uunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: ddnmt21(:,:,:)
COMPLEX, ALLOCATABLE :: dunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: udnmt21(:,:,:)
! spherical - LOs
COMPLEX, ALLOCATABLE :: uulo21(:,:)
COMPLEX, ALLOCATABLE :: dulo21(:,:)
COMPLEX, ALLOCATABLE :: ulou21(:,:)
COMPLEX, ALLOCATABLE :: ulod21(:,:)
COMPLEX, ALLOCATABLE :: uloulop21(:,:,:)
! norms
REAL, ALLOCATABLE :: uu21n(:,:)
REAL, ALLOCATABLE :: ud21n(:,:)
REAL, ALLOCATABLE :: du21n(:,:)
REAL, ALLOCATABLE :: dd21n(:,:)
REAL, ALLOCATABLE :: uulo21n(:,:)
REAL, ALLOCATABLE :: dulo21n(:,:)
REAL, ALLOCATABLE :: ulou21n(:,:)
REAL, ALLOCATABLE :: ulod21n(:,:)
REAL, ALLOCATABLE :: uloulop21n(:,:,:)
CONTAINS
PROCEDURE,PASS :: init => denCoeffsOffdiag_init
END TYPE t_denCoeffsOffdiag
TYPE t_force
COMPLEX, ALLOCATABLE :: f_a12(:,:)
COMPLEX, ALLOCATABLE :: f_a21(:,:)
......@@ -202,7 +162,7 @@ PRIVATE
PROCEDURE,PASS :: init => gVacMap_init
END TYPE t_gVacMap
PUBLIC t_orb, t_denCoeffs, t_denCoeffsOffdiag, t_force, t_slab, t_eigVecCoeffs
PUBLIC t_orb, t_denCoeffs, t_force, t_slab, t_eigVecCoeffs
PUBLIC t_mcd, t_moments, t_orbcomp, t_cdnvalKLoop, t_gVacMap
CONTAINS
......@@ -338,113 +298,6 @@ SUBROUTINE denCoeffs_init(thisDenCoeffs, atoms, sphhar, jsp_start, jsp_end)
END SUBROUTINE denCoeffs_init
SUBROUTINE denCoeffsOffdiag_init(thisDenCoeffsOffdiag, atoms, noco, sphhar, l_fmpl)
USE m_types_setup
IMPLICIT NONE
CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sphhar), INTENT(IN) :: sphhar
LOGICAL, INTENT(IN) :: l_fmpl
thisDenCoeffsOffdiag%l_fmpl = l_fmpl
IF (noco%l_mperp) THEN
ALLOCATE (thisDenCoeffsOffdiag%uu21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ud21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%du21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dd21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uulo21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dulo21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulou21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulod21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21(atoms%nlod,atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uu21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ud21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%du21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dd21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uulo21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dulo21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulou21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulod21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype))
ELSE
ALLOCATE (thisDenCoeffsOffdiag%uu21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ud21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%du21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dd21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uulo21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dulo21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulou21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulod21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21(1,1,1))
ALLOCATE (thisDenCoeffsOffdiag%uu21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ud21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%du21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dd21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uulo21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dulo21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulou21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulod21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21n(1,1,1))
END IF
IF (noco%l_mperp.AND.l_fmpl) THEN
ALLOCATE (thisDenCoeffsOffdiag%uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
ELSE
ALLOCATE (thisDenCoeffsOffdiag%uunmt21(1,1,1))
ALLOCATE (thisDenCoeffsOffdiag%udnmt21(1,1,1))
ALLOCATE (thisDenCoeffsOffdiag%dunmt21(1,1,1))
ALLOCATE (thisDenCoeffsOffdiag%ddnmt21(1,1,1))
END IF
thisDenCoeffsOffdiag%uu21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%ud21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%du21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%dd21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%uulo21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%dulo21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%ulou21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%ulod21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%uloulop21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%uu21n = 0.0
thisDenCoeffsOffdiag%ud21n = 0.0
thisDenCoeffsOffdiag%du21n = 0.0
thisDenCoeffsOffdiag%dd21n = 0.0
thisDenCoeffsOffdiag%uulo21n = 0.0
thisDenCoeffsOffdiag%dulo21n = 0.0
thisDenCoeffsOffdiag%ulou21n = 0.0
thisDenCoeffsOffdiag%ulod21n = 0.0
thisDenCoeffsOffdiag%uloulop21n = 0.0
thisDenCoeffsOffdiag%uunmt21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%udnmt21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%dunmt21 = CMPLX(0.0,0.0)
thisDenCoeffsOffdiag%ddnmt21 = CMPLX(0.0,0.0)
END SUBROUTINE denCoeffsOffdiag_init
SUBROUTINE force_init1(thisForce,input,atoms)
USE m_types_setup
......
!--------------------------------------------------------------------------------
! Copyright (c) 2018 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.
!--------------------------------------------------------------------------------
MODULE m_types_denCoeffsOffdiag
IMPLICIT NONE
PRIVATE
TYPE t_denCoeffsOffdiag
LOGICAL :: l_fmpl
! spherical
COMPLEX, ALLOCATABLE :: uu21(:,:)
COMPLEX, ALLOCATABLE :: dd21(:,:)
COMPLEX, ALLOCATABLE :: du21(:,:)
COMPLEX, ALLOCATABLE :: ud21(:,:)
! nonspherical
COMPLEX, ALLOCATABLE :: uunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: ddnmt21(:,:,:)
COMPLEX, ALLOCATABLE :: dunmt21(:,:,:)
COMPLEX, ALLOCATABLE :: udnmt21(:,:,:)
! spherical - LOs
COMPLEX, ALLOCATABLE :: uulo21(:,:)
COMPLEX, ALLOCATABLE :: dulo21(:,:)
COMPLEX, ALLOCATABLE :: ulou21(:,:)
COMPLEX, ALLOCATABLE :: ulod21(:,:)
COMPLEX, ALLOCATABLE :: uloulop21(:,:,:)
! norms
REAL, ALLOCATABLE :: uu21n(:,:)
REAL, ALLOCATABLE :: ud21n(:,:)
REAL, ALLOCATABLE :: du21n(:,:)
REAL, ALLOCATABLE :: dd21n(:,:)
REAL, ALLOCATABLE :: uulo21n(:,:)
REAL, ALLOCATABLE :: dulo21n(:,:)
REAL, ALLOCATABLE :: ulou21n(:,:)
REAL, ALLOCATABLE :: ulod21n(:,:)
REAL, ALLOCATABLE :: uloulop21n(:,:,:)
CONTAINS
PROCEDURE,PASS :: init => denCoeffsOffdiag_init
PROCEDURE :: addRadFunScalarProducts
PROCEDURE :: calcCoefficients
END TYPE t_denCoeffsOffdiag
PUBLIC t_denCoeffsOffdiag
CONTAINS
SUBROUTINE denCoeffsOffdiag_init(thisDenCoeffsOffdiag, atoms, noco, sphhar, l_fmpl)
USE m_types_setup
IMPLICIT NONE
CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sphhar), INTENT(IN) :: sphhar
LOGICAL, INTENT(IN) :: l_fmpl
thisDenCoeffsOffdiag%l_fmpl = l_fmpl
IF (noco%l_mperp) THEN
ALLOCATE (thisDenCoeffsOffdiag%uu21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ud21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%du21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dd21(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uulo21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dulo21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulou21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulod21(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21(atoms%nlod,atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uu21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ud21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%du21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dd21n(0:atoms%lmaxd,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uulo21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%dulo21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulou21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%ulod21n(atoms%nlod,atoms%ntype))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype))
ELSE
ALLOCATE (thisDenCoeffsOffdiag%uu21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ud21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%du21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dd21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uulo21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%dulo21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulou21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ulod21(1,1))
ALLOCATE (thisDenCoeffsOffdiag%uloulop21(1,1,1))
ALLOCATE (thisDenCoeffsOffdiag%uu21n(1,1))
ALLOCATE (thisDenCoeffsOffdiag%ud21n(1,1))