Writing output in the file according to the input file type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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