calc_ord Subroutine

private subroutine calc_ord()

Note

Function that returns the vector PARAM%order that contains the heights order.

Arguments

None

Calls

proc~~calc_ord~~CallsGraph proc~calc_ord calc_ord init_order init_order proc~calc_ord->init_order sort_array2 sort_array2 proc~calc_ord->sort_array2

Called by

proc~~calc_ord~~CalledByGraph proc~calc_ord calc_ord proc~read_job read_job proc~read_job->proc~calc_ord proc~prg_surf prg_surf proc~prg_surf->proc~read_job program~main main program~main->proc~prg_surf

Source Code

   subroutine calc_ord()
   !================================================================================================
   !<@note Function that returns the vector PARAM%order that contains the heights order.
   !<
   !<@endnote
   !------------------------------------------------------------------------------------------------
   implicit none

      integer(kind=I4) :: l, w, h

      real(kind=R8), allocatable, dimension(:) :: tab_tmp

      w = PARAM%width
      h = PARAM%height
      l = PARAM%npts

      allocate( tab_tmp(1:l) )

      tab_tmp(1:l) = reshape( PARAM%surf(1:w, 1:h), [l] )

      call init_order( order = PARAM%order(1:l),        &  ! OUT
                           n = l )                         ! IN

      call sort_array2( tab_inout =     tab_tmp(1:l),       &  ! IN
                             tab0 = PARAM%order(1:l),       &  ! OUT
                                n = l )                        ! IN

      deallocate( tab_tmp )

   return
   endsubroutine calc_ord