calculate_number_of_steps Function

public function calculate_number_of_steps(largest_wavevector_, k_potential_depth_) result(number_of_steps_)

Calculates the number of steps on the intermolecular (R) grid in current block. This is done either directly (if r_step > 0) or through the number of steps per half de Broglie wavelength

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: largest_wavevector_

the largest wavevector in the block

real(kind=dp), intent(in) :: k_potential_depth_

correction from the depth of the potential well converted to wavevector units

Return Value integer(kind=int32)

number of steps on the \(R\) grid


Called by

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

Contents


Source Code

      function calculate_number_of_steps(largest_wavevector_,                  &
         k_potential_depth_) result(number_of_steps_)
         !! Calculates the number of steps on the intermolecular (R) grid in
         !! current block. This is done either directly (if r_step > 0)
         !! or through the number of steps per half de Broglie wavelength
         !---------------------------------------------------------------------!
         real(dp), intent(in) :: largest_wavevector_
            !! the largest wavevector in the block
         real(dp), intent(in) :: k_potential_depth_
            !! correction from the depth of the potential well converted
            !! to wavevector units
         integer(int32) :: number_of_steps_
            !! number of steps on the \\(R\\) grid
         !---------------------------------------------------------------------!
         if (r_step <= 0) then
            number_of_steps_ = nint( (r_max-r_min) / PI                        &
               * ((largest_wavevector_+k_potential_depth_)*steps))
         else
            number_of_steps_ = nint((r_max-r_min)/r_step)+1
         endif
         !---------------------------------------------------------------------!
      end function calculate_number_of_steps