Commit 6827f484 authored by Gregor Michalicek's avatar Gregor Michalicek

Rename cdnvalKLoop into cdnvalJob

+integrate weights array into t_cdnvalJob type
parent 9a64cbe9
...@@ -10,8 +10,8 @@ USE m_juDFT ...@@ -10,8 +10,8 @@ USE m_juDFT
CONTAINS CONTAINS
SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atoms,enpara,stars,& SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,&
vacuum,dimension,sphhar,sym,obsolete,vTot,oneD,coreSpecInput,cdnvalKLoop,den,regCharges,dos,results,& vacuum,dimension,sphhar,sym,obsolete,vTot,oneD,coreSpecInput,cdnvalJob,den,regCharges,dos,results,&
moments,mcd,slab,orbcomp) moments,mcd,slab,orbcomp)
!************************************************************************************ !************************************************************************************
...@@ -61,7 +61,6 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom ...@@ -61,7 +61,6 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom
TYPE(t_enpara), INTENT(IN) :: enpara TYPE(t_enpara), INTENT(IN) :: enpara
TYPE(t_obsolete), INTENT(IN) :: obsolete TYPE(t_obsolete), INTENT(IN) :: obsolete
TYPE(t_banddos), INTENT(IN) :: banddos TYPE(t_banddos), INTENT(IN) :: banddos
TYPE(t_sliceplot), INTENT(IN) :: sliceplot
TYPE(t_input), INTENT(IN) :: input TYPE(t_input), INTENT(IN) :: input
TYPE(t_vacuum), INTENT(IN) :: vacuum TYPE(t_vacuum), INTENT(IN) :: vacuum
TYPE(t_noco), INTENT(IN) :: noco TYPE(t_noco), INTENT(IN) :: noco
...@@ -73,7 +72,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom ...@@ -73,7 +72,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom
TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_coreSpecInput), INTENT(IN) :: coreSpecInput TYPE(t_coreSpecInput), INTENT(IN) :: coreSpecInput
TYPE(t_potden), INTENT(IN) :: vTot TYPE(t_potden), INTENT(IN) :: vTot
TYPE(t_cdnvalKLoop), INTENT(IN) :: cdnvalKLoop TYPE(t_cdnvalJob), INTENT(IN) :: cdnvalJob
TYPE(t_potden), INTENT(INOUT) :: den TYPE(t_potden), INTENT(INOUT) :: den
TYPE(t_regionCharges), INTENT(INOUT) :: regCharges TYPE(t_regionCharges), INTENT(INOUT) :: regCharges
TYPE(t_dos), INTENT(INOUT) :: dos TYPE(t_dos), INTENT(INOUT) :: dos
...@@ -170,11 +169,11 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom ...@@ -170,11 +169,11 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom
skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype)) skip_tt = dot_product(enpara%skiplo(:atoms%ntype,jspin),atoms%neq(:atoms%ntype))
IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt IF (noco%l_soc.OR.noco%l_noco) skip_tt = 2 * skip_tt
ALLOCATE (we(MAXVAL(cdnvalKLoop%noccbd(:)))) ALLOCATE (we(MAXVAL(cdnvalJob%noccbd(:))))
ALLOCATE (eig(MAXVAL(cdnvalKLoop%noccbd(:)))) ALLOCATE (eig(MAXVAL(cdnvalJob%noccbd(:))))
jsp = MERGE(1,jspin,noco%l_noco) jsp = MERGE(1,jspin,noco%l_noco)
DO ikpt = cdnvalKLoop%ikptStart, cdnvalKLoop%nkptExtended, cdnvalKLoop%ikptIncrement DO ikpt = cdnvalJob%ikptStart, cdnvalJob%nkptExtended, cdnvalJob%ikptIncrement
IF (ikpt.GT.kpts%nkpt) THEN IF (ikpt.GT.kpts%nkpt) THEN
#ifdef CPP_MPI #ifdef CPP_MPI
...@@ -185,17 +184,13 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom ...@@ -185,17 +184,13 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom
CALL lapw%init(input,noco, kpts,atoms,sym,ikpt,cell,.false., mpi) CALL lapw%init(input,noco, kpts,atoms,sym,ikpt,cell,.false., mpi)
skip_t = skip_tt skip_t = skip_tt
noccbd = cdnvalKLoop%noccbd(ikpt) noccbd = cdnvalJob%noccbd(ikpt)
nStart = cdnvalKLoop%nStart(ikpt) nStart = cdnvalJob%nStart(ikpt)
nEnd = cdnvalKLoop%nEnd(ikpt) nEnd = cdnvalJob%nEnd(ikpt)
we(1:noccbd) = cdnvalJob%weights(1:noccbd,ikpt)
we = 0.0
we(1:noccbd) = results%w_iks(nStart:nEnd,ikpt,jsp)
IF (sliceplot%slice.AND.input%pallst) we(:) = kpts%wtkpt(ikpt)
we(:noccbd) = 2.0 * we(:noccbd) / input%jspins ! add in spin-doubling factor
eig(1:noccbd) = results%eig(nStart:nEnd,ikpt,jsp) eig(1:noccbd) = results%eig(nStart:nEnd,ikpt,jsp)
IF (cdnvalKLoop%l_evp) THEN IF (cdnvalJob%l_evp) THEN
IF (nStart > skip_tt) skip_t = 0 IF (nStart > skip_tt) skip_t = 0
IF (nEnd <= skip_tt) skip_t = noccbd IF (nEnd <= skip_tt) skip_t = noccbd
IF ((nStart <= skip_tt).AND.(nEnd > skip_tt)) skip_t = mod(skip_tt,noccbd) IF ((nStart <= skip_tt).AND.(nEnd > skip_tt)) skip_t = mod(skip_tt,noccbd)
...@@ -240,7 +235,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom ...@@ -240,7 +235,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,sliceplot,noco, input,banddos,cell,atom
! perform Brillouin zone integration and summation over the ! perform Brillouin zone integration and summation over the
! bands in order to determine the energy parameters for each atom and angular momentum ! bands in order to determine the energy parameters for each atom and angular momentum
CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,& CALL eparas(ispin,atoms,noccbd,mpi,ikpt,noccbd,we,eig,&
skip_t,cdnvalKLoop%l_evp,eigVecCoeffs,usdus,regCharges,dos,mcd,banddos%l_mcd) skip_t,cdnvalJob%l_evp,eigVecCoeffs,usdus,regCharges,dos,mcd,banddos%l_mcd)
IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos) IF (noco%l_mperp.AND.(ispin==jsp_end)) CALL qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
......
...@@ -75,7 +75,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -75,7 +75,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
TYPE(t_mcd) :: mcd TYPE(t_mcd) :: mcd
TYPE(t_slab) :: slab TYPE(t_slab) :: slab
TYPE(t_orbcomp) :: orbcomp TYPE(t_orbcomp) :: orbcomp
TYPE(t_cdnvalKLoop) :: cdnvalKLoop TYPE(t_cdnvalJob) :: cdnvalJob
!Local Scalars !Local Scalars
...@@ -98,9 +98,9 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,& ...@@ -98,9 +98,9 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
jspmax = input%jspins jspmax = input%jspins
IF (noco%l_mperp) jspmax = 1 IF (noco%l_mperp) jspmax = 1
DO jspin = 1,jspmax DO jspin = 1,jspmax
CALL cdnvalKLoop%init(mpi,input,kpts,banddos,noco,results,jspin,sliceplot) CALL cdnvalJob%init(mpi,input,kpts,banddos,noco,results,jspin,sliceplot)
CALL cdnval(eig_id,mpi,kpts,jspin,sliceplot,noco,input,banddos,cell,atoms,enpara,stars,vacuum,dimension,& CALL cdnval(eig_id,mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,vacuum,dimension,&
sphhar,sym,obsolete,vTot,oneD,coreSpecInput,cdnvalKLoop,outDen,regCharges,dos,results,moments,mcd,slab,orbcomp) sphhar,sym,obsolete,vTot,oneD,coreSpecInput,cdnvalJob,outDen,regCharges,dos,results,moments,mcd,slab,orbcomp)
END DO END DO
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
......
This diff is collapsed.
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