qrFac Subroutine

private subroutine qrFac(m, n, a, lda, pivot, ipvt, lipvt, rdiag, acnorm)

computes a QR factorization using Householder transformations.

This function uses Householder transformations with optional column pivoting to compute a QR factorization of the M by N matrix A. That is, QRFAC determines an orthogonal matrix Q, a permutation matrix P, and an upper trapezoidal matrix R with diagonal elements of nonincreasing magnitude, such that AP = QR.

The Householder transformation for column K, K = 1,2,...,min(M,N), is of the form:

I - ( 1 / U(K) ) * U * U'

where U has zeros in the first K-1 positions.

The form of this transformation and the method of pivoting first appeared in the corresponding LINPACK routine.

Arguments

Type IntentOptional Attributes Name
integer :: m

In - number of rows of A.

integer :: n

In - number of columns of A.

real(kind=dp) :: a(lda,n)

In/Out - before/after QR factosiation size should be the M by N array.

On input, A contains the matrix for which the QR factorization is to be computed. On output, the strict upper trapezoidal part of A contains the strict upper trapezoidal part of R, and the lower trapezoidal part of A contains a factored form of Q, the non-trivial elements of the U vectors described above.

integer :: lda

In - leading dimension of A, which must be no less than M.

logical :: pivot

Out - is TRUE if column pivoting is to be carried out

integer :: ipvt(lipvt)

Out - defines the permutation matrix P such that AP = QR.

Column J of P is column IPVT(J) of the identity matrix. If PIVOT is false, IPVT is not referenced.

integer :: lipvt

In - dimension of IPVT, which should be N if pivoting is used.

real(kind=dp) :: rdiag(n)

Out - contains the diagonal elements of R.

real(kind=dp) :: acnorm(n)

Calls

proc~~qrfac~~CallsGraph proc~qrfac qrFac proc~enorm eNorm proc~qrfac->proc~enorm

Called by

proc~~qrfac~~CalledByGraph proc~qrfac qrFac proc~hybrd hybrd proc~hybrd->proc~qrfac proc~fsolve fsolve proc~fsolve->proc~hybrd proc~solve_junction solve_junction proc~solve_junction->proc~fsolve proc~junction_resolution_from_and_to_ports Junction_resolution_from_and_to_ports proc~junction_resolution_from_and_to_ports->proc~solve_junction proc~main_loop main_loop proc~main_loop->proc~junction_resolution_from_and_to_ports program~reims_p reims_p program~reims_p->proc~main_loop