<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>SuperLU: SRC/cgsrfs.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> </div> <div class="contents"> <h1>SRC/cgsrfs.c File Reference</h1>Improves computed solution to a system of inear equations. <a href="#_details">More...</a> <p> <code>#include <math.h></code><br> <code>#include "<a class="el" href="slu__cdefs_8h-source.html">slu_cdefs.h</a>"</code><br> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="cgsrfs_8c.html#3641b6d4c21b7a852dbb32c2b693302e">ITMAX</a> 5</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="cgsrfs_8c.html#45c3a69a2e1025c59b2d96be63f65b71">cgsrfs</a> (<a class="el" href="superlu__enum__consts_8h.html#0c4e17b2d5cea33f9991ccc6a6678d62">trans_t</a> trans, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *<a class="el" href="ilu__zdrop__row_8c.html#c900805a486cbb8489e3c176ed6e0d8e">A</a>, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *L, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *U, int *perm_c, int *perm_r, char *equed, float *R, float *C, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *B, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *X, float *ferr, float *berr, <a class="el" href="structSuperLUStat__t.html">SuperLUStat_t</a> *stat, int *info)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <pre> -- SuperLU routine (version 3.0) -- Univ. of California Berkeley, Xerox Palo Alto Research Center, and Lawrence Berkeley National Lab. October 15, 2003</pre><p> <pre> Modified from lapack routine CGERFS </pre> <hr><h2>Define Documentation</h2> <a class="anchor" name="3641b6d4c21b7a852dbb32c2b693302e"></a><!-- doxytag: member="cgsrfs.c::ITMAX" ref="3641b6d4c21b7a852dbb32c2b693302e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define ITMAX 5 </td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="45c3a69a2e1025c59b2d96be63f65b71"></a><!-- doxytag: member="cgsrfs.c::cgsrfs" ref="45c3a69a2e1025c59b2d96be63f65b71" args="(trans_t trans, SuperMatrix *A, SuperMatrix *L, SuperMatrix *U, int *perm_c, int *perm_r, char *equed, float *R, float *C, SuperMatrix *B, SuperMatrix *X, float *ferr, float *berr, SuperLUStat_t *stat, int *info)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void cgsrfs </td> <td>(</td> <td class="paramtype"><a class="el" href="superlu__enum__consts_8h.html#0c4e17b2d5cea33f9991ccc6a6678d62">trans_t</a> </td> <td class="paramname"> <em>trans</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>L</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>U</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>perm_c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>perm_r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char * </td> <td class="paramname"> <em>equed</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>R</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>C</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>B</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperMatrix.html">SuperMatrix</a> * </td> <td class="paramname"> <em>X</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>ferr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float * </td> <td class="paramname"> <em>berr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSuperLUStat__t.html">SuperLUStat_t</a> * </td> <td class="paramname"> <em>stat</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>info</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <pre> Purpose =======</pre><p> <pre> CGSRFS improves the computed solution to a system of linear equations and provides error bounds and backward error estimates for the solution.</pre><p> <pre> If equilibration was performed, the system becomes: (diag(R)*A_original*diag(C)) * X = diag(R)*B_original.</pre><p> <pre> See <a class="el" href="supermatrix_8h.html" title="Defines matrix types.">supermatrix.h</a> for the definition of 'SuperMatrix' structure.</pre><p> <pre> Arguments =========</pre><p> <pre> trans (input) trans_t Specifies the form of the system of equations: = NOTRANS: A * X = B (No transpose) = TRANS: A'* X = B (Transpose) = CONJ: A**H * X = B (Conjugate transpose)</pre><p> <pre> A (input) SuperMatrix* The original matrix A in the system, or the scaled A if equilibration was done. The type of A can be: Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_GE.</pre><p> <pre> L (input) SuperMatrix* The factor L from the factorization Pr*A*Pc=L*U. Use compressed row subscripts storage for supernodes, i.e., L has types: Stype = SLU_SC, Dtype = SLU_C, Mtype = SLU_TRLU.</pre><p> <pre> U (input) SuperMatrix* The factor U from the factorization Pr*A*Pc=L*U as computed by <a class="el" href="cgstrf_8c.html#9c9f2ce12946612c7426a10352ac5984">cgstrf()</a>. Use column-wise storage scheme, i.e., U has types: Stype = SLU_NC, Dtype = SLU_C, Mtype = SLU_TRU.</pre><p> <pre> perm_c (input) int*, dimension (A->ncol) Column permutation vector, which defines the permutation matrix Pc; perm_c[i] = j means column i of A is in position j in A*Pc.</pre><p> <pre> perm_r (input) int*, dimension (A->nrow) Row permutation vector, which defines the permutation matrix Pr; perm_r[i] = j means row i of A is in position j in Pr*A.</pre><p> <pre> equed (input) Specifies the form of equilibration that was done. = 'N': No equilibration. = 'R': Row equilibration, i.e., A was premultiplied by diag(R). = 'C': Column equilibration, i.e., A was postmultiplied by diag(C). = 'B': Both row and column equilibration, i.e., A was replaced by diag(R)*A*diag(C).</pre><p> <pre> R (input) float*, dimension (A->nrow) The row scale factors for A. If equed = 'R' or 'B', A is premultiplied by diag(R). If equed = 'N' or 'C', R is not accessed.</pre><p> <pre> C (input) float*, dimension (A->ncol) The column scale factors for A. If equed = 'C' or 'B', A is postmultiplied by diag(C). If equed = 'N' or 'R', C is not accessed.</pre><p> <pre> B (input) SuperMatrix* B has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE. The right hand side matrix B. if equed = 'R' or 'B', B is premultiplied by diag(R).</pre><p> <pre> X (input/output) SuperMatrix* X has types: Stype = SLU_DN, Dtype = SLU_C, Mtype = SLU_GE. On entry, the solution matrix X, as computed by <a class="el" href="cgstrs_8c.html#19517b9d29e4faf9ae777ca6fb9d415b">cgstrs()</a>. On exit, the improved solution matrix X. if *equed = 'C' or 'B', X should be premultiplied by diag(C) in order to obtain the solution to the original system.</pre><p> <pre> FERR (output) float*, dimension (B->ncol) The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.</pre><p> <pre> BERR (output) float*, dimension (B->ncol) The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution).</pre><p> <pre> stat (output) SuperLUStat_t* Record the statistics on runtime and floating-point operation count. See util.h for the definition of 'SuperLUStat_t'.</pre><p> <pre> info (output) int* = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value</pre><p> <pre> Internal Parameters ===================</pre><p> <pre> ITMAX is the maximum number of steps of iterative refinement.</pre><p> <pre> </pre> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Aug 25 13:43:49 2011 for SuperLU by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>