idx_yxf Function

private elemental function idx_yxf(lo, ig, isign, it, il, ie, is)

Return the global index in the yxf_lo layout given the dimensional indices

Arguments

Type IntentOptional Attributes Name
type(yxf_layout_type), intent(in) :: lo
integer, intent(in) :: ig
integer, intent(in) :: isign
integer, intent(in) :: it
integer, intent(in) :: il
integer, intent(in) :: ie
integer, intent(in) :: is

Return Value integer


Contents

Source Code


Source Code

  elemental function idx_yxf (lo, ig, isign, it, il, ie, is)
    implicit none
    integer :: idx_yxf
    type (yxf_layout_type), intent (in) :: lo
    integer, intent (in) :: ig, isign, it, il, ie, is
    integer, dimension(6) :: i

    i(lo%it_ord) = it - 1
    i(lo%il_ord) = il - 1
    i(lo%ie_ord) = ie - 1
    i(lo%is_ord) = is - 1
    i(lo%ig_ord) = ig + lo%ntgrid
    i(lo%isgn_ord) = isign - 1
    idx_yxf = 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) + lo%dim_size(5)*i(6)))))
  end function idx_yxf