test_data_arch Program

Uses

  • program~~test_data_arch~~UsesGraph program~test_data_arch test_data_arch module~data_arch data_arch program~test_data_arch->module~data_arch module~miscellaneous miscellaneous program~test_data_arch->module~miscellaneous iso_fortran_env iso_fortran_env module~data_arch->iso_fortran_env module~miscellaneous->module~data_arch

Various subroutines. Example of use.


Calls

program~~test_data_arch~~CallsGraph program~test_data_arch test_data_arch proc~get_unit~2 get_unit program~test_data_arch->proc~get_unit~2 proc~progress_bar_terminal progress_bar_terminal program~test_data_arch->proc~progress_bar_terminal proc~trans_center2corner trans_center2corner program~test_data_arch->proc~trans_center2corner proc~trans_corner2center trans_corner2center program~test_data_arch->proc~trans_corner2center proc~trans_center2corner_cmpl trans_center2corner_cmpl proc~trans_center2corner->proc~trans_center2corner_cmpl proc~trans_center2corner_real trans_center2corner_real proc~trans_center2corner->proc~trans_center2corner_real proc~trans_corner2center_cmpl trans_corner2center_cmpl proc~trans_corner2center->proc~trans_corner2center_cmpl proc~trans_corner2center_real trans_corner2center_real proc~trans_corner2center->proc~trans_corner2center_real

Variables

Type Attributes Name Initial
real(kind=R8), dimension(nx, ny) :: array_in
real(kind=R8), dimension(nx, ny) :: array_out
integer(kind=I4) :: i
integer(kind=I4) :: j
integer(kind=I4), parameter :: nx = 11
integer(kind=I4), parameter :: ny = 11
character(len=3) :: snx
integer(kind=I4) :: uu

Source Code

program test_data_arch
use data_arch
use miscellaneous, only : get_unit, trans_center2corner, trans_corner2center, progress_bar_terminal
implicit none

   integer(kind=I4) :: uu, i, j
   integer(kind=I4), parameter :: nx = 11, ny = 11
   character(len=3) :: snx

   real(kind=R8), dimension(nx, ny) :: array_in, array_out

   call get_unit(uu)

   open( unit = uu, file = 'out/GLOB_VAR_VALUES.txt' )
      write(uu, '(I9,T40,a)') I4,               'I4'

      write(uu, '(I9,T40,a)') I8,               'I8'
      write(uu, '(I9,T40,a)') R4,               'R4'
      write(uu, '(I9,T40,a)') R8,               'R8'
      write(uu, '(I12,T40,a)') HIG_I4,          'HIG_I4'

      write(uu, '(I9,T40,a)') OPU,              'OPU'
      write(uu, '(I9,T40,a)') IPU,              'IPU'
      write(uu, '(I9,T40,a)') ERU,              'ERU'

      write(uu, '(E20.12,T40,a)') UN,           'UN'

      write(uu, '(E20.12,T40,a)') PI_R4,        'PI_R4'
      write(uu, '(E20.12,T40,a)') PI_R8,        'PI_R8'
      write(uu, '(E20.12,T40,a)') EPS_R4,       'EPS_R4'
      write(uu, '(E20.12,T40,a)') EPS_R8,       'EPS_R8'
      write(uu, '(E20.12,T40,a)') HIG_R8,       'HIG_R8'
      write(uu, '(E20.12,T40,a)') HIG_E8,       'HIG_E8'
      write(uu, '(E20.12,T40,a)') EPS_E8,       'EPS_E8'

      write(uu, '(I9,T40,a)') EXPO_MAX,         'EXPO_MAX'

   close( uu )

   write(snx, '(I3.3)') nx

   write(*, *) '============== INITIAL ARRAY =================='
   array_in = reshape( [ ( 0., i = 1, nx * ny ) ], [nx, ny] )
   array_in( nx/2:nx/2 + 2, ny/2:ny/2 + 2 ) = 1.

   do i = 1, nx
      write(*, '('//snx//'10I1)') ( int(array_in(i, j)), j = 1, ny )
   enddo

   write(*, *) '============ CENTER => CORNER ================='
   call trans_center2corner( tab_in = array_in, tab_out = array_out, long = nx, larg = ny)
   do i = 1, nx
      write(*, '('//snx//'10I1)') ( int(array_out(i, j)), j = 1, ny )
   enddo

   write(*, *) '============== INITIAL ARRAY =================='
   array_in = array_out
   do i = 1, nx
      write(*, '('//snx//'10I1)') ( int(array_in(i, j)), j = 1, ny )
   enddo

   write(*, *) '============ CORNER => CENTER ================='
   call trans_corner2center( tab_in = array_in, tab_out = array_out, long = nx, larg = ny)
   do i = 1, nx
      write(*, '('//snx//'10I1)') ( int(array_out(i, j)), j = 1, ny )
   enddo

   call progress_bar_terminal(val = 0, max_val = 100, init = .true.)
   do i = 10, 100, 10
      call sleep(1)
      call progress_bar_terminal(val = i, max_val = 100, init = .false.)
   enddo

stop
endprogram test_data_arch