setup_file Subroutine

private subroutine setup_file(control)

Setup the file type based on the input

Arguments

Type IntentOptional AttributesName
type(controltype), intent(in) :: control

Calls

proc~~setup_file~2~~CallsGraph proc~setup_file~2 setup_file debugcall debugcall proc~setup_file~2->debugcall

Called by

proc~~setup_file~2~~CalledByGraph proc~setup_file~2 setup_file proc~write_file~4 write_file proc~write_file~4->proc~setup_file~2 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 setup_file(control)
      !< Setup the file type based on the input
      implicit none
      type(controltype), intent(in) :: control
      DebugCall('write_output_vtk: setup_file')
      if (control%write_file_format == "vtk") then
        file_format = ".vtk"
      elseif (control%write_file_format == "tecplot" .or. control%write_file_format == "tecplot_nodal") then
        file_format = ".dat"
      else
        print*, "File format not recoganised. Accepted formats are"
        print*, "'vtk', 'tecplot' and 'tecplot_nodal' "
      end if

      if (control%write_data_format == "ASCII") then
        data_format = "formatted"
      elseif (control%write_data_format == "BINARY") then
        data_format = "unformatted"
      else
        print*, "Data format not recoganised. Accepted formats are"
        print*, "'ASCII' and 'BINARY' "
      end if

    end subroutine setup_file