idx_lz Function

private elemental function idx_lz(lo, ig, ik, it, ie, is)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(lz_layout_type), intent(in) :: lo
integer, intent(in) :: ig
integer, intent(in) :: ik
integer, intent(in) :: it
integer, intent(in) :: ie
integer, intent(in) :: is

Return Value integer


Contents

Source Code


Source Code

  elemental integer function idx_lz (lo, ig, ik, it, ie, is)
    implicit none
    type (lz_layout_type), intent (in) :: lo
    integer, intent (in) :: ig, ik, it, ie, is
    integer, dimension(5) :: i
    i(lo%ik_ord) = ik - 1
    i(lo%it_ord) = it - 1
    i(lo%ie_ord) = ie - 1
    i(lo%is_ord) = is - 1
    i(lo%ig_ord) = ig + lo%ntgrid
    idx_lz = i(1) + lo%dim_size(1)*(i(2) + lo%dim_size(2)*(i(3) + lo%dim_size(3)*(i(4) + lo%dim_size(4)*i(5))))
  end function idx_lz