Commit 4cd6f89a authored by Henning Janssen's avatar Henning Janssen

Removed redundant parameters from types_input

parent 83d57793
......@@ -233,7 +233,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
! valence density in the atomic spheres
CALL eigVecCoeffs%init(input,atoms,noco,jspin,noccbd)
IF (gfinp%n.GT.0.AND.(input%tria.OR.input%gfTet)) THEN
IF (gfinp%n.GT.0.AND..FALSE.) THEN! (input%tria.OR.input%gfTet)) THEN
CALL timestart("TetrahedronWeights")
ALLOCATE(dosWeights(gfinp%ne,noccbd),source=0.0)
ALLOCATE(resWeights(gfinp%ne,noccbd),source=0.0)
......@@ -279,7 +279,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
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 (gfinp%n.GT.0.AND.(input%tria.OR.input%gfTet)) DEALLOCATE(dosWeights,resWeights,dosBound)
IF (gfinp%n.GT.0.AND..FALSE.) DEALLOCATE(dosWeights,resWeights,dosBound)
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
......
......@@ -33,7 +33,7 @@ CONTAINS
INTEGER:: jsp
IF (atoms%n_u+atoms%n_hia>0) THEN
CALL u_setup(sym,atoms,sphhar,input,noco,enpara%el0(0:,:,:),inDen,vTot,mpi,results)
CALL u_setup(sym,atoms,sphhar,input,noco,hub1inp,enpara%el0(0:,:,:),inDen,vTot,mpi,results)
END IF
......@@ -44,7 +44,7 @@ CONTAINS
DO jsp=1,MERGE(4,input%jspins,noco%l_mtNocoPot)
!CALL tlmplm_cholesky(sphhar,atoms,DIMENSION,enpara, jsp,1,mpi,vTot%mt(:,0,1,jsp),input,vTot%mmpMat, td,ud)
CALL tlmplm_cholesky(sphhar,atoms,sym,noco,enpara,jsp,mpi,vTot,input,td,ud)
CALL tlmplm_cholesky(sphhar,atoms,sym,noco,enpara,jsp,mpi,vTot,input,hub1inp,td,ud)
IF (input%l_f) CALL write_tlmplm(td,vTot%mmpMat,atoms%n_u+atoms%n_hia>0,jsp,jsp,input%jspins)
END DO
CALL timestop("tlmplm")
......
......@@ -6,7 +6,7 @@
MODULE m_radovlp
CONTAINS
SUBROUTINE rad_ovlp(atoms,usdus,input,vr,epar, uun21,udn21,dun21,ddn21)
SUBROUTINE rad_ovlp(atoms,usdus,input,hub1inp,vr,epar, uun21,udn21,dun21,ddn21)
!***********************************************************************
! calculates the overlap of the radial basis functions with different
! spin directions. These overlapp integrals are needed to calculate
......@@ -22,6 +22,7 @@ MODULE m_radovlp
IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_hub1inp),INTENT(IN) ::hub1inp
TYPE(t_usdus),INTENT(INOUT):: usdus
! .. Array Arguments ..
......@@ -52,7 +53,7 @@ MODULE m_radovlp
!In the case of a spin-polarized calculation with Hubbard 1 we want to treat
!the correlated orbitals with a non-spin-polarized basis
IF(l_hia.AND.input%jspins.EQ.2.AND..NOT.input%l_dftspinpol) THEN
IF(l_hia.AND.input%jspins.EQ.2.AND..NOT.hub1inp%l_dftspinpol) THEN
vrTmp = (vr(:,0,iType,1) + vr(:,0,iType,2))/2.0
ELSE
vrTmp = vr(:,0,iType,ispin)
......
......@@ -7,7 +7,7 @@ MODULE m_tlmplm
!*********************************************************************
CONTAINS
SUBROUTINE tlmplm(n,sphhar,atoms,sym,enpara,&
jspin,jsp,mpi,v,input,td,ud)
jspin,jsp,mpi,v,input,hub1inp,td,ud)
USE m_constants
USE m_intgr, ONLY : intgr3
USE m_genMTBasis
......@@ -16,13 +16,14 @@ CONTAINS
USE m_types
IMPLICIT NONE
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_enpara),INTENT(IN) :: enpara
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_input),INTENT(IN) :: input
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_enpara),INTENT(IN) :: enpara
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_potden),INTENT(IN) :: v
TYPE(t_hub1inp),INTENT(IN) :: hub1inp
TYPE(t_tlmplm),INTENT(INOUT) :: td
TYPE(t_usdus),INTENT(INOUT) :: ud
......@@ -55,7 +56,7 @@ CONTAINS
IF (jsp<3) vr0(:,0)=0.0
DO i=MERGE(1,jspin,jspin>2),MERGE(2,jspin,jspin>2)
CALL genMTBasis(atoms,enpara,v,mpi,n,i,ud,f(:,:,:,i),g(:,:,:,i),flo,input%l_dftspinpol)
CALL genMTBasis(atoms,enpara,v,mpi,n,i,ud,f(:,:,:,i),g(:,:,:,i),flo,hub1inp%l_dftspinpol)
ENDDO
IF (jspin>2) THEN
jspin1=1
......
......@@ -9,7 +9,7 @@ MODULE m_tlmplm_cholesky
!*********************************************************************
CONTAINS
SUBROUTINE tlmplm_cholesky(sphhar,atoms,sym,noco,enpara,&
jspin,mpi,v,input,td,ud)
jspin,mpi,v,input,hub1inp,td,ud)
USE m_tlmplm
USE m_types
USE m_radovlp
......@@ -21,6 +21,7 @@ CONTAINS
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_enpara),INTENT(IN) :: enpara
TYPE(t_hub1inp),INTENT(IN) :: hub1inp
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: jspin!physical spin&spin index for data
......@@ -53,7 +54,7 @@ CONTAINS
IF(jsp>=3) THEN
ALLOCATE(uun21(0:atoms%lmaxd,atoms%ntype),udn21(0:atoms%lmaxd,atoms%ntype),&
dun21(0:atoms%lmaxd,atoms%ntype),ddn21(0:atoms%lmaxd,atoms%ntype) )
CALL rad_ovlp(atoms,ud,input,v%mt,enpara%el0, uun21,udn21,dun21,ddn21)
CALL rad_ovlp(atoms,ud,input,hub1inp,v%mt,enpara%el0, uun21,udn21,dun21,ddn21)
ENDIF
td%tdulo(:,:,:,jsp) = CMPLX(0.0,0.0)
......@@ -66,9 +67,9 @@ CONTAINS
!$OMP PRIVATE(temp,i,l,lm,lmin,lmin0,lmp)&
!$OMP PRIVATE(lmplm,lp,m,mp,n)&
!$OMP PRIVATE(OK,s,in,info)&
!$OMP SHARED(atoms,jspin,jsp,sym,sphhar,enpara,td,ud,v,mpi,input,uun21,udn21,dun21,ddn21)
!$OMP SHARED(atoms,jspin,jsp,sym,sphhar,enpara,td,ud,v,mpi,input,hub1inp,uun21,udn21,dun21,ddn21)
DO n = 1,atoms%ntype
CALL tlmplm(n,sphhar,atoms,sym,enpara,jspin,jsp,mpi,v,input,td,ud)
CALL tlmplm(n,sphhar,atoms,sym,enpara,jspin,jsp,mpi,v,input,hub1inp,td,ud)
OK=.FALSE.
cholesky_loop:DO WHILE(.NOT.OK)
td%h_loc(:,:,n,jsp)=0.0
......@@ -183,7 +184,7 @@ CONTAINS
ENDIF
ENDDO
!$OMP END PARALLEL DO
IF (noco%l_constr) CALL tlmplm_constrained(atoms,v,enpara,input,ud,noco,td)
IF (noco%l_constr) CALL tlmplm_constrained(atoms,v,enpara,input,hub1inp,ud,noco,td)
......@@ -193,7 +194,7 @@ CONTAINS
SUBROUTINE tlmplm_constrained(atoms,v,enpara,input,ud,noco,td)
SUBROUTINE tlmplm_constrained(atoms,v,enpara,input,hub1inp,ud,noco,td)
USE m_radovlp
USE m_types
IMPLICIT NONE
......@@ -204,6 +205,7 @@ CONTAINS
TYPE(t_tlmplm),INTENT(INOUT):: td
TYPE(t_usdus),INTENT(INOUT) :: ud
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_hub1inp),INTENT(IN) :: hub1inp
REAL, ALLOCATABLE :: uun21(:,:),udn21(:,:),dun21(:,:),ddn21(:,:)
COMPLEX :: c
......@@ -212,7 +214,7 @@ CONTAINS
ALLOCATE(uun21(0:atoms%lmaxd,atoms%ntype),udn21(0:atoms%lmaxd,atoms%ntype),&
dun21(0:atoms%lmaxd,atoms%ntype),ddn21(0:atoms%lmaxd,atoms%ntype) )
CALL rad_ovlp(atoms,ud,input,v%mt,enpara%el0, uun21,udn21,dun21,ddn21)
CALL rad_ovlp(atoms,ud,input,hub1inp,v%mt,enpara%el0, uun21,udn21,dun21,ddn21)
DO n = 1,atoms%ntype
!If we do a constraint calculation, we have to calculate the
......
......@@ -9,7 +9,7 @@ MODULE m_sorad
! generates radial spin-orbit matrix elements
!*********************************************************************
CONTAINS
SUBROUTINE sorad(atoms,input,ntyp,vr,enpara,spav,rsoc,usdus)
SUBROUTINE sorad(atoms,input,ntyp,vr,enpara,spav,rsoc,usdus,hub1inp)
USE m_constants, ONLY : c_light
USE m_intgr, ONLY : intgr0
......@@ -24,6 +24,7 @@ CONTAINS
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_usdus),INTENT(INOUT) :: usdus
TYPE(t_rsoc),INTENT(INOUT) :: rsoc
TYPE(t_hub1inp),OPTIONAL,INTENT(IN) :: hub1inp
! ..
! .. Scalar Arguments ..
INTEGER, INTENT (IN) :: ntyp
......@@ -60,10 +61,11 @@ CONTAINS
ENDIF
ENDDO
DO jspin = 1,input%jspins
IF(l_hia.AND.input%jspins.EQ.2.AND..NOT.input%l_dftspinpol) THEN
vrTmp = (vr(:,1)+vr(:,2))/2.0
ELSE
vrTmp = vr(:,jspin)
vrTmp = vr(:,jspin)
IF(l_hia.AND.input%jspins.EQ.2) THEN
IF(PRESENT(hub1inp)) THEN
IF(.NOT.hub1inp%l_dftspinpol) vrTmp = (vr(:,1)+vr(:,2))/2.0
ENDIF
ENDIF
!
!---> calculate normalized function at e: p and q
......
......@@ -26,7 +26,7 @@ CONTAINS
TYPE(t_usdus),INTENT(INOUT) :: usdus
TYPE(t_rsoc),INTENT(OUT) :: rsoc
LOGICAL,INTENT(IN) :: l_angles
TYPE(t_hub1inp),OPTIONAL,INTENT(IN) :: hub1inp
TYPE(t_hub1inp),OPTIONAL, INTENT(IN) :: hub1inp
TYPE(t_hub1data),OPTIONAL,INTENT(INOUT) :: hub1data
! ..
! ..
......@@ -53,7 +53,7 @@ CONTAINS
!Calculate radial soc-matrix elements
DO n = 1,atoms%ntype
CALL sorad(atoms,input,n,vr(:,0,n,:),enpara,noco%l_spav,rsoc,usdus)
CALL sorad(atoms,input,n,vr(:,0,n,:),enpara,noco%l_spav,rsoc,usdus,hub1inp)
END DO
......@@ -73,7 +73,7 @@ CONTAINS
rsoc%rsoploplop(n,:,:,:,:) = rsoc%rsoploplop(n,:,:,:,:)*noco%socscale(n)
ENDIF
ENDDO
!Read in SOC-parameter for shell with hubbard 1
IF(PRESENT(hub1inp).AND.mpi%irank.EQ.0) THEN
DO i_hia = 1, atoms%n_hia
......
......@@ -27,8 +27,6 @@ MODULE m_types_input
INTEGER :: coretail_lmax =0
INTEGER :: itmax =15
REAL :: minDistance=1.0e-5
REAL :: minoccDistance=1.0e-2 !Distances for the density matrix in DFT+Hubbard 1 case
REAL :: minmatDistance=1.0e-3
INTEGER :: maxiter=99
INTEGER :: imix=7
INTEGER :: gw=0
......@@ -71,27 +69,6 @@ MODULE m_types_input
REAL :: ldauMixParam=0.05
REAL :: ldauSpinf=1.0
LOGICAL :: ldauAdjEnpara=.false.
LOGICAL :: l_dftspinpol=.false.
LOGICAL :: l_gfsphavg=.false.
LOGICAL :: l_gfmperp=.false.
LOGICAL :: l_resolvent=.false.
LOGICAL :: l_hist=.false.
INTEGER :: gf_ne
REAL :: gf_ellow
REAL :: gf_elup
INTEGER :: gf_mode=-1
INTEGER :: gf_n
REAL :: gf_alpha
REAL :: gf_et
REAL :: gf_eb
INTEGER :: gf_n1
INTEGER :: gf_n2
INTEGER :: gf_n3
INTEGER :: gf_nmatsub
REAL :: gf_sigma
LOGICAL :: gf_anacont=.false.
LOGICAL :: gf_dosfermi=.false.
LOGICAL :: gfTet=.false. !This switch will be true iff the tetrahedron were calculated from the equdistant grid
LOGICAL :: l_rdmft=.FALSE.
REAL :: rdmftOccEps=0.0
INTEGER :: rdmftStatesBelow=0
......
......@@ -34,7 +34,7 @@ MODULE m_calc_tria
!IF(.NOT.l_tria) CALL juDFT_warn("Triangles may not cover whol BZ",calledby="calc_tria")
input%gfTet = .TRUE.
!input%gfTet = .TRUE.
!Write to types_kpts (the same arrays as in bulk case)
kpts%ntet = ntria
IF(ALLOCATED(kpts%ntetra)) DEALLOCATE(kpts%ntetra)
......
......@@ -40,7 +40,9 @@ SUBROUTINE greensfImag(atoms,gfinp,sym,input,ispin,nbands,dosWeights,resWeights,
COMPLEX weight
COMPLEX, ALLOCATABLE :: im(:,:)
l_tria = (input%tria.OR.input%gfTet).AND..NOT.input%l_hist
!Temporary until input%tria/input%gauss are sorted out
!l_tria = (input%tria.OR.input%gfTet).AND..NOT.input%l_hist
l_tria=.false.
IF(l_tria.AND.(ANY(ind.GT.gfinp%ne).OR.ANY(ind.LT.1))) THEN
CALL juDFT_error("Invalid index",calledby="greensfImag")
......
......@@ -51,8 +51,9 @@ MODULE m_greensfImag21
IF(.NOT.gfinp%l_sphavg) CALL juDFT_error("NOCO-offdiagonal + Radial dependence of onsite-GF not implemented",calledby="onsite21")
l_tria = (input%tria.OR.input%gfTet).AND..NOT.input%l_hist
!Temporary until input%tria/input%gauss are sorted out
!l_tria = (input%tria.OR.input%gfTet).AND..NOT.input%l_hist
l_tria=.false.
!Get the information on the real axis energy mesh
CALL gfinp%eMesh(ef,del,eb)
......
......@@ -8,7 +8,8 @@ MODULE m_writeBasis
CONTAINS
SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,results,eig_id,oneD,sphhar,stars,vacuum)
SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,hub1inp,vTot,vCoul,vx,&
mpi,results,eig_id,oneD,sphhar,stars,vacuum)
USE m_types
USE m_juDFT
......@@ -38,6 +39,7 @@ SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,re
TYPE(t_atoms),INTENT(INOUT) :: atoms
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_hub1inp),INTENT(IN) :: hub1inp
TYPE(t_potden), INTENT(INOUT) :: vTot
TYPE(t_potden), INTENT(INOUT) :: vCoul
TYPE(t_potden), INTENT(INOUT) :: vx
......@@ -350,7 +352,7 @@ SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,re
write(itype_name , '(2a,i0)') TRIM(ADJUSTL(jsp_name)),'/itype_',itype
CALL h5gcreate_f(fileID, TRIM(ADJUSTL(itype_name)), itypeGroupID, hdfError)
CALL genMTBasis(atoms,enpara,vTot,mpi,itype,jsp,usdus,f(:,:,0:,jsp),g(:,:,0:,jsp),flo,input%l_dftspinpol)
CALL genMTBasis(atoms,enpara,vTot,mpi,itype,jsp,usdus,f(:,:,0:,jsp),g(:,:,0:,jsp),flo,hub1inp%l_dftspinpol)
dims(:3)=(/atoms%jmtd,2,atoms%lmaxd+1/)
dimsInt = dims
CALL h5screate_simple_f(3,dims(:3),itypeSpaceID,hdfError)
......
......@@ -17,7 +17,7 @@ MODULE m_usetup
! Extension to multiple U per atom type G.M. 2017 |
!-------------------------------------------------------------------+
CONTAINS
SUBROUTINE u_setup(sym,atoms,sphhar, input,noco,el,inDen,pot,mpi,results)
SUBROUTINE u_setup(sym,atoms,sphhar,input,noco,hub1inp,el,inDen,pot,mpi,results)
USE m_umtx
USE m_uj2f
USE m_nmat_rot
......@@ -34,6 +34,7 @@ CONTAINS
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_hub1inp), INTENT(IN) :: hub1inp
TYPE(t_potden),INTENT(IN) :: inDen
TYPE(t_potden),INTENT(INOUT) :: pot
......@@ -76,7 +77,7 @@ CONTAINS
CALL nmat_rot(atoms%lda_u(:)%phi,atoms%lda_u(:)%theta,zero,3,n_u,input%jspins,atoms%lda_u(:)%l,n_mmp)
! calculate potential matrix and total energy correction
CALL v_mmp(sym,atoms,atoms%lda_u(:),n_u,input%jspins,input%l_dftspinpol,n_mmp,u,f0(:,1),f2(:,1),pot%mmpMat,results%e_ldau)
CALL v_mmp(sym,atoms,atoms%lda_u(:),n_u,input%jspins,hub1inp%l_dftspinpol,n_mmp,u,f0(:,1),f2(:,1),pot%mmpMat,results%e_ldau)
!spin off-diagonal elements (no rotation yet)
IF(noco%l_mperp) THEN
......
......@@ -333,7 +333,7 @@ CONTAINS
vTemp%mmpMat = 0.0 !To avoid errors later on (When ldaUAdjEnpara is T the density
!is carried over after vgen)
CALL timestart("Updating energy parameters")
CALL enpara%update(mpi%mpi_comm,atoms,vacuum,input,vToT)
CALL enpara%update(mpi%mpi_comm,atoms,vacuum,input,vToT,hub1inp)
CALL timestop("Updating energy parameters")
!IF(.not.input%eig66(1))THEN
CALL eigen(mpi,stars,sphhar,atoms,xcpot,sym,kpts,vacuum,input,&
......@@ -376,7 +376,7 @@ CONTAINS
IF (input%gw.GT.0) THEN
IF (mpi%irank.EQ.0) THEN
CALL writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,&
CALL writeBasis(input,noco,kpts,atoms,sym,cell,enpara,hub1inp,vTot,vCoul,vx,mpi,&
results,eig_id,oneD,sphhar,stars,vacuum)
END IF
IF (input%gw.EQ.2) THEN
......@@ -535,11 +535,11 @@ CONTAINS
8130 FORMAT (/,5x,'******* it=',i3,' is completed********',/,/)
WRITE(*,*) "Iteration:",iter," Distance:",results%last_distance
!Write out information if a hubbard 1 Iteration was performed
IF(hub1%l_runthisiter) THEN
WRITE(*,*) "Hubbard 1 Iteration: ", hub1%iter," Distance: ", results%last_mmpMatdistance
IF(hub1data%l_runthisiter) THEN
WRITE(*,*) "Hubbard 1 Iteration: ", hub1data%iter," Distance: ", results%last_mmpMatdistance
WRITE(6,*) "nmmp occupation distance: ", results%last_occdistance
WRITE(6,*) "nmmp element distance: ", results%last_mmpMatdistance
WRITE(6,FMT=8140) hub1%iter
WRITE(6,FMT=8140) hub1data%iter
8140 FORMAT (/,5x,'******* Hubbard 1 it=',i3,' is completed********',/,/)
ENDIF
CALL timestop("Iteration")
......@@ -572,12 +572,12 @@ CONTAINS
.OR. (xcpot%exc_is_MetaGGA() .and. iter == 1))
!If we have converged run hia if the density matrix has not converged
IF(atoms%n_hia>0) THEN
hub1%l_runthisiter = .NOT.l_cont.AND.(input%minoccDistance<=results%last_occdistance&
.OR.input%minmatDistance<=results%last_mmpMatdistance)
hub1data%l_runthisiter = .NOT.l_cont.AND.(hub1inp%minoccDistance<=results%last_occdistance&
.OR.hub1inp%minmatDistance<=results%last_mmpMatdistance)
!Run after first overall iteration to generate a starting density matrix
hub1%l_runthisiter = hub1%l_runthisiter.OR.(iter==1.AND.(hub1%iter == 0&
.AND.ALL(vTot%mmpMat(:,:,atoms%n_u+1:atoms%n_u+atoms%n_hia,:).EQ.0.0)))
hub1%l_runthisiter = hub1%l_runthisiter.AND.(iter < input%itmax)
hub1data%l_runthisiter = hub1data%l_runthisiter.OR.(iter==1.AND.(hub1data%iter == 0&
.AND.ALL(ABS(vTot%mmpMat(:,:,atoms%n_u+1:atoms%n_u+atoms%n_hia,:)).LT.1e-12)))
hub1data%l_runthisiter = hub1data%l_runthisiter.AND.(iter < input%itmax)
!Prevent that the scf loop terminates
l_cont = l_cont.OR.hub1%l_runthisiter
ENDIF
......
......@@ -439,7 +439,7 @@ CONTAINS
ALLOCATE(c_b(n))
CALL MPI_REDUCE(greensfCoeffs%projdos(:,-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,0:,:,jspin),c_b,n,CPP_MPI_COMPLEX,MPI_SUM,0,MPI_COMM_WORLD,ierr)
IF(mpi%irank.EQ.0) CALL CPP_BLAS_ccopy(n,c_b,1,greensfCoeffs%projdos(:,-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,0:,:,jspin),1)
IF(.NOT.input%l_gfsphavg) THEN
IF(.NOT.gfinp%l_sphavg) THEN
CALL MPI_REDUCE(greensfCoeffs%uu(:,-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,0:,:,jspin),c_b,n,CPP_MPI_COMPLEX,MPI_SUM,0,MPI_COMM_WORLD,ierr)
IF(mpi%irank.EQ.0) CALL CPP_BLAS_ccopy(n,c_b,1,greensfCoeffs%uu(:,-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,0:,:,jspin),1)
CALL MPI_REDUCE(greensfCoeffs%du(:,-lmaxU_const:lmaxU_const,-lmaxU_const:lmaxU_const,0:,:,jspin),c_b,n,CPP_MPI_COMPLEX,MPI_SUM,0,MPI_COMM_WORLD,ierr)
......
......@@ -351,7 +351,7 @@ SUBROUTINE eigVecCoeffs_init(thisEigVecCoeffs,input,atoms,noco,jspin,noccbd)
IF(ALLOCATED(thisEigVecCoeffs%bcof)) DEALLOCATE(thisEigVecCoeffs%bcof)
IF(ALLOCATED(thisEigVecCoeffs%ccof)) DEALLOCATE(thisEigVecCoeffs%ccof)
IF (noco%l_mperp.OR.input%l_gfmperp) THEN
IF (noco%l_mperp) THEN
ALLOCATE (thisEigVecCoeffs%acof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat,input%jspins))
ALLOCATE (thisEigVecCoeffs%bcof(noccbd,0:atoms%lmaxd*(atoms%lmaxd+2),atoms%nat,input%jspins))
ALLOCATE (thisEigVecCoeffs%ccof(-atoms%llod:atoms%llod,noccbd,atoms%nlod,atoms%nat,input%jspins))
......
......@@ -90,12 +90,13 @@ CONTAINS
!> This subroutine adjusts the energy parameters to the potential. In particular, it
!! calculated them in case of qn_el>-1,qn_ello>-1
!! Before this was done in lodpot.F
SUBROUTINE update(enpara,mpi_comm,atoms,vacuum,input,v)
SUBROUTINE update(enpara,mpi_comm,atoms,vacuum,input,v,hub1inp)
USE m_types_atoms
USE m_types_vacuum
USE m_types_input
USE m_xmlOutput
USE m_types_potden
USE m_types_hub1inp
USE m_find_enpara
CLASS(t_enpara),INTENT(inout):: enpara
INTEGER,INTENT(IN) :: mpi_comm
......@@ -103,6 +104,7 @@ CONTAINS
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_potden),INTENT(IN) :: v
TYPE(t_hub1inp),INTENT(IN) :: hub1inp
LOGICAL :: l_enpara
......@@ -158,6 +160,7 @@ CONTAINS
ENDDO
ENDDO ! n
!$OMP END PARALLEL DO
IF (irank==0) THEN
WRITE(6,*)
WRITE(6,*) "Updated energy parameters for spin:",jsp
......@@ -243,7 +246,7 @@ CONTAINS
END IF
END DO
IF(atoms%n_hia.GT.0.AND.input%jspins.EQ.2.AND..NOT.input%l_dftspinpol) THEN
IF(atoms%n_hia.GT.0.AND.input%jspins.EQ.2.AND..NOT.hub1inp%l_dftspinpol) THEN
!Set the energy parameters to the same value
!We want the shell where Hubbard 1 is applied to
!be non spin-polarized
......
......@@ -74,7 +74,7 @@ MODULE m_types_greensfCoeffs
IF(gfinp%n.GT.0) THEN
ALLOCATE(thisGREENSFCOEFFS%kkintgr_cutoff(gfinp%n,input%jspins,2),source=0)
ALLOCATE (thisGREENSFCOEFFS%projdos(gfinp%ne,-lmax:lmax,-lmax:lmax,0:MAXVAL(atoms%neq),MAX(1,gfinp%n),spin_dim),source=cmplx_0)
IF(.NOT.input%l_gfsphavg) THEN
IF(.NOT.gfinp%l_sphavg) THEN
ALLOCATE (thisGREENSFCOEFFS%uu(gfinp%ne,-lmax:lmax,-lmax:lmax,0:MAXVAL(atoms%neq),MAX(1,gfinp%n),spin_dim),source=cmplx_0)
ALLOCATE (thisGREENSFCOEFFS%dd(gfinp%ne,-lmax:lmax,-lmax:lmax,0:MAXVAL(atoms%neq),MAX(1,gfinp%n),spin_dim),source=cmplx_0)
ALLOCATE (thisGREENSFCOEFFS%du(gfinp%ne,-lmax:lmax,-lmax:lmax,0:MAXVAL(atoms%neq),MAX(1,gfinp%n),spin_dim),source=cmplx_0)
......
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