out Subroutine

public impure subroutine out(t, c, ns, mx, my, lout)

This routine prints the values of the individual species densities at the current time t, to logical unit lout.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: t
real(kind=rk), intent(in) :: c(ns,mx,my)
integer, intent(in) :: ns
integer, intent(in) :: mx
integer, intent(in) :: my
integer, intent(in) :: lout

Calls

proc~~out~~CallsGraph proc~out out proc~to_string to_string proc~out->proc~to_string

Called by

proc~~out~~CalledByGraph proc~out out program~example_web example_web program~example_web->proc~out

Variables

Type Visibility Attributes Name Initial
logical, public, save :: first = .true.
integer, public :: i
integer, public :: jx
integer, public :: jy

Source Code

   impure subroutine out(t, c, ns, mx, my, lout)
   !! This routine prints the values of the individual species densities at the current time
   !! `t`, to logical unit `lout`.
      real(rk), intent(in) :: t
      real(rk), intent(in) :: c(ns, mx, my)
      integer, intent(in) :: ns
      integer, intent(in) :: mx
      integer, intent(in) :: my
      integer, intent(in) :: lout

      logical, save :: first = .true.
      integer :: i, jx, jy

      if (first) then
         write (lout, '(a16)', advance='no') 't'
         do i = 1, ns
            do jy = 1, my
               do jx = 1, mx
                  write (lout, '(1x, a16)', advance='no') &
                     "c("//to_string(i)//","//to_string(jx)//","//to_string(jy)//")"
               end do
            end do
         end do
         write (lout, *) ''
         first = .false.
      end if

      write (lout, '(es16.5e3)', advance="no") t
      do i = 1, ns
         do jy = 1, my
            do jx = 1, mx
               write (lout, '(1x, es16.5e3)', advance="no") c(i, jx, jy)
            end do
         end do
      end do
      write (lout, *) ''

   end subroutine out