c Changed stop to return and added error argument, cperm. c Sivan Toledo 2/97. c c ludfs : Depth-first search to allocate storage for U c subroutine ludfs (jcol, a, arow, acolst, lastlu, lurow, lcolst, 1 ucolst, rperm, cperm, dense, 1 found, parent, child, 1 error) c c Input parameters: c jcol current column number. c a, arow, acolst the matrix A; see lufact for format. c rperm row permutation P. c perm(r) = s > 0 means row r of A is row s < jcol of PA. c perm(r) = 0 means row r of A has not yet been used as a c pivot and is therefore still below the diagonal. c cperm column permutation. c c Modified parameters (see below for exit values): c lastlu last used position in lurow array. c lurow, lcolst, ucolst nonzero structure of Pt(L-I+U); c see lufact for format. c dense current column as a dense vector. c found integer array for marking nonzeros in this column of c Pt(L-I+U) that have been allocated space in lurow. c Also, marks reached columns in depth-first search. c found(i)=jcol if i was found in this column. c parent parent(i) is the parent of vertex i in the dfs, c or 0 if i is a root of the search. c child child(i) is the index in lurow of the next unexplored c child of vertex i. c Note that parent and child are also indexed according to c the vertex numbering of A, not PA; thus child(i) is c the position of a nonzero in column rperm(i), c not column i. c c Output parameters: c error 0 if successful, 1 otherwise c c On entry: c found(*)