counts the energetically accessible channels in the given block
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | channel_indices(:) |
holds the indices pointing to the basis arrays |
(output) number of open channels
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | channel_index_ |
function count_open_channels_in_block(channel_indices) &
result(number_of_open_channels_)
!! counts the energetically accessible channels in the given block
!---------------------------------------------------------------------!
integer(int32), intent(in) :: channel_indices(:)
!! holds the indices pointing to the basis arrays
integer(int32) :: number_of_open_channels_
!! (output) number of open channels
!---------------------------------------------------------------------!
integer(int32) :: channel_index_
!---------------------------------------------------------------------!
number_of_open_channels_ = 0
do channel_index_ = 1, size(channel_indices)
if (is_open(internal_energies(channel_indices(channel_index_)))) then
number_of_open_channels_ = number_of_open_channels_ + 1
endif
enddo
!---------------------------------------------------------------------!
end function count_open_channels_in_block