lu1or3 Subroutine

private subroutine lu1or3(m, n, lena, indc, lenc, locc, iw, lerr, inform)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in) :: m
integer(kind=ip), intent(in) :: n
integer(kind=ip), intent(in) :: lena
integer(kind=ip), intent(in) :: indc(lena)
integer(kind=ip), intent(in) :: lenc(n)
integer(kind=ip), intent(in) :: locc(n)
integer(kind=ip), intent(out) :: iw(m)
integer(kind=ip), intent(out) :: lerr
integer(kind=ip), intent(out) :: inform

Called by

proc~~lu1or3~~CalledByGraph proc~lu1or3 lusol::lu1or3 proc~lu1fac lusol::lu1fac proc~lu1fac->proc~lu1or3 proc~solve lusol_ez_module::solve proc~solve->proc~lu1fac proc~test_1 main::test_1 proc~test_1->proc~solve proc~test_2 main::test_2 proc~test_2->proc~solve program~main~2 main program~main~2->proc~test_1 program~main~2->proc~test_2

Source Code

  subroutine lu1or3( m, n, lena, indc, lenc, locc, iw, lerr, inform )

    integer(ip),   intent(in)    :: m, n, lena
    integer(ip),   intent(in)    :: indc(lena), lenc(n), locc(n)

    integer(ip),   intent(out)   :: lerr, inform
    integer(ip),   intent(out)   :: iw(m)

    !------------------------------------------------------------------
    ! lu1or3  looks for duplicate elements in an m by n matrix A
    ! defined by the column list  indc, lenc, locc.
    ! iw  is used as a work vector of length  m.
    !
    ! xx Feb 1985: Original version.
    ! 17 Oct 2000: indc, indr now have size lena to allow nelem = 0.
    !
    ! 10 Jan 2010: First f90 version.
    ! 12 Dec 2011: Declare intent and local variables.
    !------------------------------------------------------------------

    integer(ip)        :: i, j, l, l1, l2

    iw(1:m) = 0
    lerr    = 0

    do j = 1, n
       if (lenc(j) > 0) then
          l1   = locc(j)
          l2   = l1 + lenc(j) - 1

          do l = l1, l2
             i = indc(l)
             if (iw(i) == j) go to 910
             iw(i) = j
          end do
       end if
    end do

    inform = 0
    return

910 lerr   = l
    inform = 1
    return

  end subroutine lu1or3