read_scalar Subroutine

private subroutine read_scalar(var, name, index)

Read scalar from the vtk file

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(out), dimension(index:imx-index,index:jmx-index,index:kmx-index):: var
character(len=*), intent(in) :: name
integer, intent(in) :: index

Calls

proc~~read_scalar~~CallsGraph proc~read_scalar read_scalar debugcall debugcall proc~read_scalar->debugcall

Called by

proc~~read_scalar~~CalledByGraph proc~read_scalar read_scalar proc~read_file read_file proc~read_file->proc~read_scalar

Contents

Source Code


Source Code

    subroutine read_scalar(var, name,  index)
      !< Read scalar from the vtk file
      implicit none
      integer, intent(in) :: index
      real(wp), dimension(index:imx-index,index:jmx-index,index:kmx-index), intent(out) :: var
      character(len=*), intent(in) :: name

      DebugCall('read_output_vtk'//trim(name))
      read(IN_FILE_UNIT, *) !'SCALARS '//trim(name)//' FLOAT'
      read(IN_FILE_UNIT, *) !'LOOKUP_TABLE default'
      do k = 1, kmx - 1
       do j = 1, jmx - 1
        do i = 1, imx - 1
          read(IN_FILE_UNIT, *) var(i, j, k)
        end do
       end do
      end do
      read(IN_FILE_UNIT, *)

    end subroutine read_scalar