lu7cyc Subroutine

private subroutine lu7cyc(kfirst, klast, p)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: kfirst
integer(kind=ip), intent(in) :: klast
integer(kind=ip), intent(inout) :: p(klast)

Called by

proc~~lu7cyc~~CalledByGraph proc~lu7cyc lusol::lu7cyc proc~lu8rpc lusol::lu8rpc proc~lu8rpc->proc~lu7cyc

Source Code

  subroutine lu7cyc( kfirst, klast, p )

    integer(ip),   intent(in)    :: kfirst, klast
    integer(ip),   intent(inout) :: p(klast)

    !------------------------------------------------------------------
    ! lu7cyc performs a cyclic permutation on the row or column ordering
    ! stored in p, moving entry kfirst down to klast.
    ! If kfirst .ge. klast, lu7cyc should not be called.
    ! Sometimes klast = 0 and nothing should happen.
    !
    ! 09 May 1988: First f77 version.
    ! 13 Dec 2011: First f90 version.
    !------------------------------------------------------------------

    integer(ip)      :: ifirst, k

    if (kfirst < klast) then
       ifirst = p(kfirst)

       do k = kfirst, klast - 1
          p(k) = p(k+1)
       end do

       p(klast) = ifirst
    end if

  end subroutine lu7cyc