<!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/sgsrfs.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/sgsrfs.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__sdefs_8h-source.html">slu_sdefs.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="sgsrfs_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="sgsrfs_8c.html#a619758588187cd5ad69a10a808d18f6">sgsrfs</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 SGERFS
</pre> <hr><h2>Define Documentation</h2>
<a class="anchor" name="3641b6d4c21b7a852dbb32c2b693302e"></a><!-- doxytag: member="sgsrfs.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="a619758588187cd5ad69a10a808d18f6"></a><!-- doxytag: member="sgsrfs.c::sgsrfs" ref="a619758588187cd5ad69a10a808d18f6" 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 sgsrfs </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> SGSRFS 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_S, 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_S, 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="sgstrf_8c.html#2428d5d7ef46cf9a08069d9f55901284">sgstrf()</a>. Use column-wise storage scheme,
i.e., U has types: Stype = SLU_NC, Dtype = SLU_S, 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_S, 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_S, Mtype = SLU_GE.
On entry, the solution matrix X, as computed by <a class="el" href="sgstrs_8c.html#9b6e1e555af9cf109ef3a584054a91e2">sgstrs()</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 Mon Nov 22 10:23:48 2010 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>