FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(p_layout_type), | intent(in) | :: | lo | |||
integer, | intent(in) | :: | ik | |||
integer, | intent(in) | :: | il | |||
integer, | intent(in) | :: | ie | |||
integer, | intent(in) | :: | is |
elemental function idx_parity (lo, ik, il, ie, is)
implicit none
integer :: idx_parity
type (p_layout_type), intent (in) :: lo
integer, intent (in) :: ik, il, ie, is
select case (layout)
case ('yxels')
idx_parity = ik-1 + lo%naky*(ie-1 + lo%negrid*(il-1 + lo%nlambda*(is-1)))
case ('yxles')
idx_parity = ik-1 + lo%naky*(il-1 + lo%nlambda*(ie-1 + lo%negrid*(is-1)))
case ('lexys')
idx_parity = il-1 + lo%nlambda*(ie-1 + lo%negrid*(ik-1 + lo%naky*(is-1)))
case ('lxyes')
idx_parity = il-1 + lo%nlambda*(ik-1 + lo%naky*(ie-1 + lo%negrid*(is-1)))
case ('lyxes')
idx_parity = il-1 + lo%nlambda*(ik-1 + lo%naky*(ie-1 + lo%negrid*(is-1)))
case ('xyles')
idx_parity = ik-1 + lo%naky*(il-1 + lo%nlambda*(ie-1 + lo%negrid*(is-1)))
end select
end function idx_parity