write_header Subroutine

private subroutine write_header(control)

Write the header in the output file

Arguments

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

Calls

proc~~write_header~~CallsGraph proc~write_header write_header debugcall debugcall proc~write_header->debugcall

Called by

proc~~write_header~~CalledByGraph proc~write_header write_header proc~write_file write_file proc~write_file->proc~write_header

Contents

Source Code


Source Code

    subroutine write_header(control)
      !< Write the header in the output file
      implicit none
      type(controltype), intent(in) :: control
      integer :: n
      integer :: total

      DebugCall('write_output_vtk: write_header')
      write(OUT_FILE_UNIT,'(a)') "variables = x y z "

      total=3
      do n = 1,control%w_count

        select case (trim(control%w_list(n)))
        
          case('Velocity')
            write(OUT_FILE_UNIT, '(a)') " u v w "
            total = total+3

          case('do not write')
            !skip 
            continue

          case Default
            write(OUT_FILE_UNIT, '(a)') trim(control%w_list(n))//" "
            total = total+1

        end select
      end do

      write(OUT_FILE_UNIT, '(a,i4.4,3(a,i5.5),a)') "zone T=block",process_id,"  i=",imx," j=",jmx, " k=",kmx-1, " Datapacking=Block"

      write(OUT_FILE_UNIT,*) "Varlocation=([1-3]=Nodal)"
      write(OUT_FILE_UNIT,'(a,i2.2,a)') "Varlocation=([4-",total,"]=Nodal)"
      write(OUT_FILE_UNIT,"(a,i4.4)") "STRANDID=",1
      write(OUT_FILE_UNIT,"(a,i4.4)") "SOLUTIONTIME=",control%checkpoint_iter_count


    end subroutine write_header