calculate_largest_wavevector Function

public function calculate_largest_wavevector(channel_indices) result(largest_wavevector_)

Calculates the largest wavevector in the block; called only if there are any open channels

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: channel_indices(:)

holds the indices pointing to the basis arrays

Return Value real(kind=dp)

(output) the largest wavevector in the block


Calls

proc~~calculate_largest_wavevector~~CallsGraph proc~calculate_largest_wavevector calculate_largest_wavevector proc~is_open is_open proc~calculate_largest_wavevector->proc~is_open proc~wavevector_squared_from_energy wavevector_squared_from_energy proc~calculate_largest_wavevector->proc~wavevector_squared_from_energy proc~total_energy total_energy proc~is_open->proc~total_energy proc~wavevector_squared_from_energy->proc~total_energy proc~write_error write_error proc~wavevector_squared_from_energy->proc~write_error proc~write_message write_message proc~write_error->proc~write_message

Called by

proc~~calculate_largest_wavevector~~CalledByGraph proc~calculate_largest_wavevector calculate_largest_wavevector program~scattering SCATTERING program~scattering->proc~calculate_largest_wavevector

Contents


Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: channel_index_
real(kind=dp), private :: wavevector_

Source Code

      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