apply_pbc Function

private function apply_pbc(array, shift) result(s_array)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: array(:,:)
integer, intent(in) :: shift(2)

Return Value integer, (size(array,1),size(array,2))


Contents

Source Code


Source Code

    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