read_file Subroutine

public subroutine read_file(files, qp, control, scheme, dims)

Read restart file

Arguments

Type IntentOptional AttributesName
type(filetype), intent(inout) :: files
real(kind=wp), intent(inout), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var), target:: qp
type(controltype), intent(inout) :: control
type(schemetype), intent(in) :: scheme
type(extent), intent(in) :: dims

Calls

proc~~read_file~3~~CallsGraph proc~read_file~3 read_file proc~verify_read_control verify_read_control proc~read_file~3->proc~verify_read_control read_file_tec read_file_tec proc~read_file~3->read_file_tec proc~open_file~2 open_file proc~read_file~3->proc~open_file~2 proc~read_restart_file read_restart_file proc~read_file~3->proc~read_restart_file proc~close_file~2 close_file proc~read_file~3->proc~close_file~2 read_file_vtk read_file_vtk proc~read_file~3->read_file_vtk proc~setup_file~3 setup_file proc~read_file~3->proc~setup_file~3 proc~lcase lcase proc~verify_read_control->proc~lcase debugcall debugcall proc~open_file~2->debugcall proc~close_file~2->debugcall proc~setup_file~3->debugcall

Called by

proc~~read_file~3~~CalledByGraph proc~read_file~3 read_file proc~initstate initstate proc~initstate->proc~read_file~3 proc~setup_state setup_state proc~setup_state->proc~initstate proc~setup_solver setup_solver proc~setup_solver->proc~setup_state proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

    subroutine read_file(files, qp, control, scheme, dims)
      !< Read restart file
      implicit none
      type(filetype), intent(inout) :: files
      type(extent), intent(in) :: dims
      type(controltype), intent(inout) :: control
      type(schemetype) , intent(in) :: scheme
      real(wp), dimension(-2:dims%imx+2, -2:dims%jmx+2, -2:dims%kmx+2, 1:dims%n_var), intent(inout), target :: qp
      call setup_file(control)
      call open_file(files,  control)
      call read_restart_file(files%RESTART_FILE_UNIT, control)
      call verify_read_control(control, scheme)
        
      select case (control%read_file_format)
        
        case ('vtk')
          call read_file_vtk(files%IN_FILE_UNIT, qp, control, scheme, dims)
        
        case ('tecplot')
          call read_file_tec(files%IN_FILE_UNIT, qp, control, scheme, dims)
        
        case DEFAULT
          Fatal_error
      end select

      call close_file(files)
    end subroutine read_file