Set up the value of the interpolation mesh spacing, needed for adaptive smearing [see Eqs. (34-35) YWVS07]. Choose it as the largest of the three Delta_k's for each of the primitive translations b1, b2, and b3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | num_points |
function kmesh_spacing_singleinteger(num_points)
!! Set up the value of the interpolation mesh spacing, needed for
!! adaptive smearing [see Eqs. (34-35) YWVS07]. Choose it as the largest of
!! the three Delta_k's for each of the primitive translations b1, b2, and b3
use w90_parameters, only: recip_lattice
integer, intent(in) :: num_points
real(kind=dp) :: kmesh_spacing_singleinteger
integer :: i
real(kind=dp) :: Delta_k_i(3)
! NOTE: The vectors b_i are stored as *rows* in recip_lattice (argh!).
! Hence I believe Jonathan's original code confused rows with columns
! when computing Delta_k, which he called 'rspace'
! (See my e-mail of 20Sept07)
!
do i = 1, 3
Delta_k_i(i) = sqrt(dot_product(recip_lattice(i, :), recip_lattice(i, :))) &
/num_points
end do
kmesh_spacing_singleinteger = maxval(Delta_k_i)
end function kmesh_spacing_singleinteger