QR_MUMPS
Functions/Subroutines
dqrm_detect_singletons.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine dqrm_detect_singletons (graph, scol, srow, mrperm, mcperm, nrsing, ncsing)
 This subroutine detects singletons in a matrix. More...
 
integer function flip (i)
 
integer function unflip (i)
 

Function/Subroutine Documentation

subroutine dqrm_detect_singletons ( type(dqrm_spmat_type graph,
integer, dimension(:), allocatable  scol,
integer, dimension(:), allocatable  srow,
integer, dimension(:), allocatable  mrperm,
integer, dimension(:), allocatable  mcperm,
integer  nrsing,
integer  ncsing 
)

This subroutine detects singletons in a matrix.

For more deatils please refer to:

[1] T. Davis "Multifrontal multithreaded rank-revealing sparse QR factorization" Accepted for publication on ACM TOMS, 2010

The following code largely gathers from the SPQR package singleton detection. Once the singletons are detected, the graph is purged by eliminating all the singleton rows and columns

Parameters
[in]graphthe input graph by columns (a qrm_spmat in csc format)
[out]scolit is a pointer to integer(:) and on output it will return the set of singletons. Need not be allocated on entry but on exit it will be of size graphn
[out]srowit is a pointer to integer(:) and on output it will return the column singletons. Need not be allocated on entry but on exit it will be of size graphn
[out]mrperman integer array storing the mapping to the row indices of the purged matrix. mrperm(j) = k means that column j of the purged graph corresponds to column k in the original matrix. A row permutation is later computed on the purged matrix and, thus, mrperm will be used to map this permutation back on the original matrix.
[out]mcperman integer array storing the mapping to the row indices of the purged matrix. mcperm(j) = k means that row j of the purged graph corresponds to row k in the original matrix. Because the ordering method will be executed on the purged graph, this array is necessary to map the computed ordering onto the columns of A.
[out]ncsingthe number of column singletons found
[out]nrsingthe number of row singletons found

Definition at line 82 of file dqrm_detect_singletons.F90.

References dqrm_spmat_mod::dqrm_spmat_convert(), dqrm_spmat_mod::dqrm_spmat_destroy(), flip(), and unflip().

Referenced by dqrm_analyse().

integer function dqrm_detect_singletons::flip ( integer  i)

Definition at line 303 of file dqrm_detect_singletons.F90.

Referenced by _qrm_detect_singletons(), and dqrm_detect_singletons().

integer function dqrm_detect_singletons::unflip ( integer  i)

Definition at line 310 of file dqrm_detect_singletons.F90.

Referenced by _qrm_detect_singletons(), and dqrm_detect_singletons().