Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | array(:,:) | |||
integer, | intent(in) | :: | shift(2) |
function apply_pbc(array, shift) result(s_array)
integer, intent(in) :: array(:, :), shift(2)
integer :: s_array(size(array, 1), size(array, 2))
! i have to be sure about the sign conventions here..
s_array = eoshift(array, shift(1), dim=2)
s_array = eoshift(s_array, -shift(2), dim=1)
end function apply_pbc