get_unit Subroutine

public subroutine get_unit(iunit)

Arguments

Type IntentOptional AttributesName
integer(kind=I4), intent(out) :: iunit

Called by

proc~~get_unit~~CalledByGraph proc~get_unit get_unit proc~write_surf write_surf proc~write_surf->proc~get_unit proc~run_test run_test proc~run_test->proc~get_unit proc~test_rough_fe test_rough_fe proc~run_test->proc~test_rough_fe proc~test_bearing_x_fe test_bearing_x_fe proc~run_test->proc~test_bearing_x_fe proc~test_pocket_fe test_pocket_fe proc~run_test->proc~test_pocket_fe proc~test_bearing_y_fe test_bearing_y_fe proc~run_test->proc~test_bearing_y_fe proc~test_rough_ms test_rough_ms proc~run_test->proc~test_rough_ms proc~test_slider_fe test_slider_fe proc~run_test->proc~test_slider_fe proc~test_slider_ms test_slider_ms proc~run_test->proc~test_slider_ms proc~save_profile_y_comp_air_pocket save_profile_y_comp_air_pocket proc~save_profile_y_comp_air_pocket->proc~get_unit proc~save_profile_x_fe save_profile_x_fe proc~save_profile_x_fe->proc~get_unit proc~save_profile_x_ms save_profile_x_ms proc~save_profile_x_ms->proc~get_unit proc~read_surf read_surf proc~read_surf->proc~get_unit proc~write_surffile write_surffile proc~write_surffile->proc~get_unit proc~save_profile_x_comp_slider save_profile_x_comp_slider proc~save_profile_x_comp_slider->proc~get_unit proc~save_profile_x_comp_air_pocket save_profile_x_comp_air_pocket proc~save_profile_x_comp_air_pocket->proc~get_unit proc~open_surffile open_surffile proc~open_surffile->proc~get_unit proc~read_config read_config proc~read_config->proc~get_unit proc~trans_surf_txt trans_surf_txt proc~trans_surf_txt->proc~get_unit proc~save_ms_field save_ms_field proc~save_ms_field->proc~write_surf program~main main program~main->proc~run_test program~main->proc~read_config proc~save_fe_field save_fe_field proc~save_fe_field->proc~write_surf proc~solve_ms_prob solve_ms_prob proc~solve_ms_prob->proc~save_ms_field proc~solve_fe_prob solve_fe_prob proc~solve_fe_prob->proc~save_fe_field proc~test_rough_fe->proc~solve_fe_prob proc~test_bearing_x_fe->proc~solve_fe_prob proc~test_pocket_fe->proc~solve_fe_prob proc~test_bearing_y_fe->proc~solve_fe_prob proc~test_rough_ms->proc~solve_ms_prob proc~test_slider_fe->proc~solve_fe_prob proc~test_slider_ms->proc~solve_ms_prob

Contents

Source Code


Source Code

subroutine get_unit(iunit)
implicit none
integer(kind=I4), intent(out) :: iunit
   integer(kind=I4) :: i
   integer(kind=I4) :: ios
   logical(kind=I4) :: lopen
   iunit = 0
   do i = 10, 99

    if (i /= OPU .and. i /= IPU .and. i /= ERU) then
      inquire (unit = i, opened = lopen, iostat = ios)
      if (ios == 0) then
         if ( .not. lopen ) then
            iunit = i
            return
         endif
      endif
    endif

   enddo

return
endsubroutine get_unit