Calculates the largest wavevector in the block; called only if there are any open channels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | channel_indices(:) |
holds the indices pointing to the basis arrays |
(output) the largest wavevector in the block
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | channel_index_ | ||||
real(kind=dp), | private | :: | wavevector_ |
function calculate_largest_wavevector(channel_indices) &
result(largest_wavevector_)
!! Calculates the largest wavevector in the block;
!! called only if there are any open channels
!---------------------------------------------------------------------!
integer(int32), intent(in) :: channel_indices(:)
!! holds the indices pointing to the basis arrays
real(dp) :: largest_wavevector_
!! (output) the largest wavevector in the block
!---------------------------------------------------------------------!
integer(int32) :: channel_index_
real(dp) :: wavevector_
!---------------------------------------------------------------------!
wavevector_ = 0.0_dp
!---------------------------------------------------------------------!
do channel_index_ = 1, size(channel_indices)
if (is_open(internal_energies(channel_indices(channel_index_)))) then
wavevector_ = sqrt( wavevector_squared_from_energy( &
internal_energies(channel_indices(channel_index_))) )
largest_wavevector_ = max(largest_wavevector_, wavevector_)
endif
enddo
!---------------------------------------------------------------------!
end function calculate_largest_wavevector