write_file Subroutine

public subroutine write_file(files, qp, nodes, control, scheme, dims)

Writing output in the file according to the input file type

Arguments

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

Calls

proc~~write_file~4~~CallsGraph proc~write_file~4 write_file proc~close_file close_file proc~write_file~4->proc~close_file write_file_tec_nodal write_file_tec_nodal proc~write_file~4->write_file_tec_nodal proc~open_file open_file proc~write_file~4->proc~open_file proc~setup_file~2 setup_file proc~write_file~4->proc~setup_file~2 write_file_vtk write_file_vtk proc~write_file~4->write_file_vtk write_file_tec write_file_tec proc~write_file~4->write_file_tec debugcall debugcall proc~close_file->debugcall proc~open_file->debugcall proc~setup_file~2->debugcall

Called by

proc~~write_file~4~~CalledByGraph proc~write_file~4 write_file proc~dump_data dump_data proc~dump_data->proc~write_file~4 proc~checkpoint checkpoint proc~checkpoint->proc~dump_data proc~setup_solver setup_solver proc~setup_solver->proc~checkpoint proc~iterate_one_more_time_step iterate_one_more_time_step proc~iterate_one_more_time_step->proc~checkpoint program~main main program~main->proc~iterate_one_more_time_step proc~start_run start_run program~main->proc~start_run proc~start_run->proc~setup_solver

Contents

Source Code


Source Code

    subroutine write_file(files, qp, nodes, control, scheme,  dims)
      !< Writing output in the file according to the input file type
      implicit none
      type(filetype), intent(in) :: files
      type(extent), intent(in) :: dims
      type(controltype), intent(in) :: control
      type(schemetype), intent(in) :: scheme
      type(nodetype), dimension(-2:dims%imx+3, -2:dims%jmx+3,-2:dims%kmx+3), intent(in) :: nodes
      real(wp), dimension(-2:dims%imx+2, -2:dims%jmx+2,-2:dims%kmx+2, 1:dims%n_var), intent(in) :: qp
      integer:: file_handler

      file_handler = files%OUT_FILE_UNIT

      call setup_file(control)
      call open_file(file_handler, files%outfile)

      select case (control%write_file_format)

        case ('vtk')
          call write_file_vtk(file_handler, qp, nodes, control, scheme, dims)

        case ('tecplot')
          call write_file_tec(file_handler, qp, nodes, control, scheme, dims)

        case ('tecplot_nodal')
          call write_file_tec_nodal(file_handler, qp, nodes, control, scheme, dims)

        case DEFAULT
          Fatal_error

      end select

      call close_file(file_handler, files%outfile)

    end subroutine write_file