idx_xxf Function

private elemental function idx_xxf(lo, ig, isign, ik, il, ie, is)

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

Arguments

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

Return Value integer


Contents

Source Code


Source Code

  elemental function idx_xxf (lo, ig, isign, ik, il, ie, is)
    implicit none
    integer :: idx_xxf
    type (xxf_layout_type), intent (in) :: lo
    integer, intent (in) :: ig, isign, ik, il, ie, is
    integer, dimension(6) :: i

    i(lo%ik_ord) = ik - 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_xxf = 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_xxf