validate_r_range Subroutine

private subroutine validate_r_range()

Checks if read R values are consistent with r_min and r_max.

Arguments

None

Calls

proc~~validate_r_range~~CallsGraph proc~validate_r_range validate_r_range proc~float_to_character float_to_character proc~validate_r_range->proc~float_to_character proc~write_error write_error proc~validate_r_range->proc~write_error proc~write_message write_message proc~write_error->proc~write_message

Called by

proc~~validate_r_range~~CalledByGraph proc~validate_r_range validate_r_range proc~read_radial_coupling_terms read_radial_coupling_terms proc~read_radial_coupling_terms->proc~validate_r_range program~scattering SCATTERING program~scattering->proc~read_radial_coupling_terms

Contents

Source Code


Source Code

      subroutine validate_r_range
         !! Checks if read R values are consistent with r_min and r_max.
         !---------------------------------------------------------------------!
         if (r_min < r_grid(1)) then
            close(s_matrix_unit)
            if (print_partial_cross_sections) close(partial_file_unit)
            call write_error("r_min value provided by the user (" //           &
               trim(adjustl(float_to_character(r_min, "(F10.4)"))) //          &
               ") is smaller than r_min supplied in " //                       &
               trim(adjustl(coupling_terms_file_name)) // " ( "//              &
               trim(adjustl(float_to_character(r_grid(1), "(F10.4)"))) // ")")
         endif
         !---------------------------------------------------------------------!
         if (r_max > r_grid(number_of_r_points)) then
            close(s_matrix_unit)
            if (print_partial_cross_sections) close(partial_file_unit)
            call write_error("r_max value provided by the user (" //           &
               trim(adjustl(float_to_character(r_max, "(F10.4)"))) //          &
               ") is larger than r_max supplied in " //                        &
               trim(adjustl(coupling_terms_file_name)) // " ( "//  &
               trim(adjustl(float_to_character(r_grid(number_of_r_points),     &
               "(F10.4)"))) // ")")
         endif
         !---------------------------------------------------------------------!
      end subroutine validate_r_range