Same as kmesh_spacing_singleinteger, but for a kmesh with three different mesh samplings along the three directions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(3) | :: | mesh |
function kmesh_spacing_mesh(mesh)
!! Same as kmesh_spacing_singleinteger, but for a kmesh with three
!! different mesh samplings along the three directions
use w90_parameters, only: recip_lattice
integer, dimension(3), intent(in) :: mesh
real(kind=dp) :: kmesh_spacing_mesh
integer :: i
real(kind=dp) :: Delta_k_i(3)
do i = 1, 3
Delta_k_i(i) = sqrt(dot_product(recip_lattice(i, :), recip_lattice(i, :))) &
/mesh(i)
end do
kmesh_spacing_mesh = maxval(Delta_k_i)
end function kmesh_spacing_mesh