LUfactorization to compute the solution to the system of linear equations with a square matrix
Aand multiple right-hand sides, and provides error bounds on the solution.
LUfactorization to compute the solution to a real or complex system of linear equations
Error bounds on the solution and a condition estimate are also provided.
In the following description,
afstands for the subarray
p?gesvxperforms the following steps:
- Iffact='E', real scaling factorsRandCare computed to equilibrate the system::trans='N'diag(R)*A*diag(C) *diag(C)-1*X= diag(R)*B:trans='T'(diag(R)*A*diag(C))T*diag(R)-1*X= diag(C)*B:trans='C'(diag(R)*A*diag(C))H*diag(R)-1*X= diag(C)*BWhether or not the system will be equilibrated depends on the scaling of the matrixA, but if equilibration is used,Ais overwritten bydiag(andR)*A*diag(C)Bbydiag((ifR)*Bortrans='N')diag((ifc)*Bortrans='T''C').
- Iforfact='N''E', theLUdecomposition is used to factor the matrixA(after equilibration ifasfact='E'), whereA=PLUPis a permutation matrix,Lis a unit lower triangular matrix, andUis upper triangular.
- The factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than relative machine precision, steps 4 - 6 are skipped.
- The system of equations is solved forXusing the factored form ofA.
- Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
- If equilibration was used, the matrixXis premultiplied by diag(C) (ifor diag(trans='N')R) (ifortrans='T''C') so that it solves the original system before equilibration.
- (global) Must be'F','N', or'E'.Specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.Ifthen, on entry,fact='F'afandipivcontain the factored form ofA. Ifequedis not'N', the matrixAhas been equilibrated with scaling factors given byrandc. Arraysa,af, andipivare not modified.If, the matrixfact='N'Ais copied toafand factored.If, the matrixfact='E'Ais equilibrated if necessary, then copied toafand factored.
- (global) Must be'N','T', or'C'.Specifies the form of the system of equations:If, the system has the formtrans='N'A*X=B(No transpose);If, the system has the formtrans='T'A*TX=B(Transpose);If, the system has the formtrans='C'AH*X=B(Conjugate transpose);
- (global) The number of linear equations; the order of the submatrixA(.n≥0)
- (global) The number of right hand sides; the number of columns of the distributed submatricesBandX(.nrhs≥0)
- (local)Pointers into the local memory to arrays of local size,a:lld_a*LOCc(ja+n-1),af:lld_af*LOCc(ja+n-1),b:lld_b*LOCc(jb+nrhs-1).work:lworkThe arrayacontains the matrixA. Ifandfact='F'equedis not'N', thenAmust have been equilibrated by the scaling factors inrand/orc.The arrayafis an input argument if. In this case it contains on entry the factored form of the matrixfact='F'A, that is, the factorsLandUfrom the factorizationas computed byA=P*L*Up?getrf. Ifequedis not'N', thenafis the factored form of the equilibrated matrixA.The arraybcontains on entry the matrixBwhose columns are the right-hand sides for the systems of equations.workis a workspace array. The size ofworkis (lwork).
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the submatrix, respectively.A(ia:ia+n-1,ja:ja+n-1)
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- (global) The row and column indices in the global matrixAFindicating the first row and the first column of the subarray, respectively.af
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixAF.
- (global) The row and column indices in the global matrixBindicating the first row and the first column of the submatrix, respectively.B(ib:ib+n-1,jb:jb+nrhs-1)
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixB.
- (local) Array of size.LOCr(m_a)+mb_aThe arrayipivis an input argument if.fact='F'On entry, it contains the pivot indices from the factorizationas computed byA=P*L*Up?getrf; (local) rowiof the matrix was interchanged with the (global) rowipiv[.i- 1]This array must be aligned with.A(ia:ia+n-1,*)
- (global) Must be'N','R','C', or'B'.equedis an input argument iffact='F'. It specifies the form of equilibration that was done:If, no equilibration was done (always true ifequed='N');fact='N'If, row equilibration was done, that is,equed='R'Ahas been premultiplied by diag(r);If, column equilibration was done, that is,equed='C'Ahas been postmultiplied by diag(c);If, both row and column equilibration was done;equed='B'Ahas been replaced bydiag(.r)*A*diag(c)
- (local)Arrays of sizeandLOCr(m_a), respectLOCc(n_a)