Commit ec32f16a authored by Matthias Redies's avatar Matthias Redies

switch branch

parent e79ac50b
......@@ -4,7 +4,9 @@
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_cdngen
USE m_types
TYPE(t_potden) :: comparison_kinED_pw
CONTAINS
......@@ -72,9 +74,10 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
! Local type instances
TYPE(t_noco) :: noco_new
TYPE(t_regionCharges) :: regCharges
TYPE(t_dos) :: dos
TYPE(t_moments) :: moments
TYPE(t_regionCharges) :: regCharges, fake_regCharges
TYPE(t_dos) :: dos, fake_dos
TYPE(t_moments) :: moments, fake_moments
TYPE(t_results) :: fake_results
TYPE(t_mcd) :: mcd
TYPE(t_slab) :: slab
TYPE(t_orbcomp) :: orbcomp
......@@ -111,6 +114,12 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
CALL cdnvalJob%init(mpi,input,kpts,noco,results,jspin,sliceplot,banddos)
CALL cdnval(eig_id,mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,vacuum,dimension,&
sphhar,sym,vTot,oneD,cdnvalJob,outDen,regCharges,dos,results,moments,coreSpecInput,mcd,slab,orbcomp)
fake_regCharges = regCharges
fake_dos = dos
fake_results = results
fake_moments = moments
CALL calc_kinED_pw(eig_id,mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,vacuum,dimension,&
sphhar,sym,vTot,oneD,cdnvalJob,comparison_kinED_pw,fake_regCharges,fake_dos,fake_results,fake_moments)
END DO
! calculate kinetic energy density for MetaGGAs
......
......@@ -125,7 +125,8 @@ CONTAINS
f_ik(:,ikpt) = e_i * w_i
ENDDO
END SUBROUTINE calc_EnergyDen_auxillary_weights
SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,&
SUBROUTINE calc_kinED_pw(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,stars,&
vacuum,dimension,sphhar,sym,vTot,oneD,cdnvalJob,kinED,regCharges,dos,results,&
moments,coreSpecInput,mcd,slab,orbcomp)
......@@ -206,7 +207,7 @@ CONTAINS
INTEGER :: ikpt,jsp_start,jsp_end,ispin,jsp
INTEGER :: iErr,nbands,noccbd,iType
INTEGER :: skip_t,skip_tt,nStart,nEnd,nbasfcn
LOGICA :: l_orbcomprot, l_real, l_dosNdir, l_corespec
LOGICAL :: l_orbcomprot, l_real, l_dosNdir, l_corespec
! Local Arrays
REAL, ALLOCATABLE :: we(:)
......@@ -221,7 +222,7 @@ CONTAINS
TYPE (t_eigVecCoeffs) :: eigVecCoeffs
TYPE (t_usdus) :: usdus
TYPE (t_mat) :: zMat, zPrime
TYPE(t_potden), :: kinED_comp(3)
TYPE (t_potden) :: kinED_comp(3)
TYPE (t_gVacMap) :: gVacMap
CALL timestart("cdnval")
......@@ -318,6 +319,8 @@ CONTAINS
nbasfcn = MERGE(lapw%nv(1)+lapw%nv(2)+2*atoms%nlotot,lapw%nv(1)+atoms%nlotot,noco%l_noco)
CALL zMat%init(l_real,nbasfcn,noccbd)
CALL read_eig(eig_id,ikpt,jsp,n_start=nStart,n_end=nEnd,neig=nbands,zmat=zMat)
call set_zPrime(zMat, kpts%bk(:,ikpt), lapw, zPrime)
#ifdef CPP_MPI
CALL MPI_BARRIER(mpi%mpi_comm,iErr) ! Synchronizes the RMA operations
#endif
......@@ -409,5 +412,25 @@ CONTAINS
CALL timestop("cdnval")
END SUBROUTINE cdnval
write (*,*) "done calc_kinED_pw"
END SUBROUTINE calc_kinED_pw
subroutine set_zPrime(zMat, kpt, lapw, zPrime)
USE m_types
implicit none
TYPE (t_mat), intent(in) :: zMat
REAL, intent(in) :: kpt(3)
TYPE(t_lapw), intent(in) :: lapw
TYPE (t_mat) :: zPrime
call zPrime%init(zMat)
if(zPrime%l_real) then
write (*,*) "zMat is real"
else
write (*,*) "zMat is complex"
endif
end subroutine set_zPrime
END MODULE m_metagga
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