Wrapper routine used to reduce number of Fourier calls
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(3) | :: | kpt | ||
real(kind=dp), | intent(out) | :: | eig(num_wann) | |||
complex(kind=dp), | intent(out), | dimension(:, :) | :: | UU | ||
complex(kind=dp), | intent(out), | dimension(:, :) | :: | HH | ||
complex(kind=dp), | intent(out), | dimension(:, :, :, :) | :: | JJp_list | ||
complex(kind=dp), | intent(out), | dimension(:, :, :, :) | :: | JJm_list | ||
real(kind=dp), | intent(in), | optional | dimension(:) | :: | occ |
subroutine wham_get_eig_UU_HH_JJlist(kpt, eig, UU, HH, JJp_list, JJm_list, occ)
!========================================================!
! !
!! Wrapper routine used to reduce number of Fourier calls
! Added the optional occ parameter !
!========================================================!
use w90_parameters, only: num_wann
use w90_get_oper, only: HH_R, get_HH_R
use w90_postw90_common, only: pw90common_fourier_R_to_k_new
use w90_utility, only: utility_diagonalize
real(kind=dp), dimension(3), intent(in) :: kpt
real(kind=dp), intent(out) :: eig(num_wann)
complex(kind=dp), dimension(:, :), intent(out) :: UU
complex(kind=dp), dimension(:, :), intent(out) :: HH
complex(kind=dp), dimension(:, :, :, :), intent(out) :: JJp_list
complex(kind=dp), dimension(:, :, :, :), intent(out) :: JJm_list
real(kind=dp), intent(in), optional, dimension(:) :: occ
integer :: i
complex(kind=dp), allocatable :: delHH(:, :, :)
call get_HH_R
allocate (delHH(num_wann, num_wann, 3))
call pw90common_fourier_R_to_k_new(kpt, HH_R, OO=HH, &
OO_dx=delHH(:, :, 1), &
OO_dy=delHH(:, :, 2), &
OO_dz=delHH(:, :, 3))
call utility_diagonalize(HH, num_wann, eig, UU)
do i = 1, 3
if (present(occ)) then
call wham_get_JJp_JJm_list(delHH(:, :, i), UU, eig, JJp_list(:, :, :, i), JJm_list(:, :, :, i), occ=occ)
else
call wham_get_JJp_JJm_list(delHH(:, :, i), UU, eig, JJp_list(:, :, :, i), JJm_list(:, :, :, i))
endif
enddo
end subroutine wham_get_eig_UU_HH_JJlist