1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SuperLU: SRC/sgssv.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SuperLU
 <span id="projectnumber">5.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_1e771ff450ae847412a8c28572c155bb.html">SRC</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">sgssv.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Solves the system of linear equations A*X=B.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="slu__sdefs_8h_source.html">slu_sdefs.h</a>"</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for sgssv.c:</div>
<div class="dyncontent">
<div class="center"><img src="sgssv_8c__incl.png" border="0" usemap="#SRC_2sgssv_8c" alt=""/></div>
<map name="SRC_2sgssv_8c" id="SRC_2sgssv_8c">
<area shape="rect" id="node2" href="slu__sdefs_8h.html" title="Header file for real operations. " alt="" coords="274,80,363,107"/><area shape="rect" id="node9" href="slu__Cnames_8h.html" title="Macros defining how C routines will be called. " alt="" coords="521,155,628,181"/><area shape="rect" id="node10" href="supermatrix_8h.html" title="Defines matrix types. " alt="" coords="652,155,753,181"/><area shape="rect" id="node11" href="slu__util_8h.html" title="Utility header file. " alt="" coords="281,155,355,181"/><area shape="rect" id="node13" href="superlu__enum__consts_8h.html" title="enum constants header file " alt="" coords="269,229,428,256"/></map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6d5d8cc5159f2230fc059d0e382a63b8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sgssv_8c.html#a6d5d8cc5159f2230fc059d0e382a63b8">sgssv</a> (<a class="el" href="structsuperlu__options__t.html">superlu_options_t</a> *options, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *<a class="el" href="ilu__zdrop__row_8c.html#ac900805a486cbb8489e3c176ed6e0d8e">A</a>, int *perm_c, int *perm_r, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *L, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *U, <a class="el" href="structSuperMatrix.html">SuperMatrix</a> *B, <a class="el" href="structSuperLUStat__t.html">SuperLUStat_t</a> *stat, int *info)</td></tr>
<tr class="memdesc:a6d5d8cc5159f2230fc059d0e382a63b8"><td class="mdescLeft"> </td><td class="mdescRight">Driver routines. <a href="#a6d5d8cc5159f2230fc059d0e382a63b8">More...</a><br/></td></tr>
<tr class="separator:a6d5d8cc5159f2230fc059d0e382a63b8"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)</p>
<p>All rights reserved.</p>
<p>The source code is distributed under BSD license, see the file License.txt at the top-level directory.</p>
<pre>
-- SuperLU routine (version 3.0) --
Univ. of California Berkeley, Xerox Palo Alto Research Center,
and Lawrence Berkeley National Lab.
October 15, 2003
</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a6d5d8cc5159f2230fc059d0e382a63b8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sgssv </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structsuperlu__options__t.html">superlu_options_t</a> * </td>
<td class="paramname"><em>options</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">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"><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"><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="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>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<pre>
<h1>Purpose
</h1>
</pre><pre></pre><pre>SGSSV solves the system of linear equations A*X=B, using the
LU factorization from SGSTRF. It performs the following steps:</pre><pre> 1. If A is stored column-wise (A->Stype = SLU_NC):</pre><pre> 1.1. Permute the columns of A, forming A*Pc, where Pc
is a permutation matrix. For more details of this step,
see <a class="el" href="sp__preorder_8c.html" title="Permute and performs functions on columns of orginal matrix. ">sp_preorder.c</a>.</pre><pre> 1.2. Factor A as Pr*A*Pc=L*U with the permutation Pr determined
by Gaussian elimination with partial pivoting.
L is unit lower triangular with offdiagonal entries
bounded by 1 in magnitude, and U is upper triangular.</pre><pre> 1.3. Solve the system of equations A*X=B using the factored
form of A.</pre><pre> 2. If A is stored row-wise (A->Stype = SLU_NR), apply the
above algorithm to the transpose of A:</pre><pre> 2.1. Permute columns of transpose(A) (rows of A),
forming transpose(A)*Pc, where Pc is a permutation matrix.
For more details of this step, see <a class="el" href="sp__preorder_8c.html" title="Permute and performs functions on columns of orginal matrix. ">sp_preorder.c</a>.</pre><pre> 2.2. Factor A as Pr*transpose(A)*Pc=L*U with the permutation Pr
determined by Gaussian elimination with partial pivoting.
L is unit lower triangular with offdiagonal entries
bounded by 1 in magnitude, and U is upper triangular.</pre><pre> 2.3. Solve the system of equations A*X=B using the factored
form of A.</pre><pre> See <a class="el" href="supermatrix_8h.html" title="Defines matrix types. ">supermatrix.h</a> for the definition of '<a class="el" href="structSuperMatrix.html">SuperMatrix</a>' structure.</pre><pre><h1>Arguments
</h1>
</pre><pre></pre><pre>options (input) superlu_options_t*
The structure defines the input parameters to control
how the LU decomposition will be performed and how the
system will be solved.</pre><pre>A (input) SuperMatrix*
Matrix A in A*X=B, of dimension (A->nrow, A->ncol). The number
of linear equations is A->nrow. Currently, the type of A can be:
Stype = SLU_NC or SLU_NR; Dtype = SLU_S; Mtype = SLU_GE.
In the future, more general A may be handled.</pre><pre>perm_c (input/output) int*
If A->Stype = SLU_NC, column permutation vector of size A->ncol
which defines the permutation matrix Pc; perm_c[i] = j means
column i of A is in position j in A*Pc.
If A->Stype = SLU_NR, column permutation vector of size A->nrow
which describes permutation of columns of transpose(A)
(rows of A) as described above.</pre><pre> If options->ColPerm = MY_PERMC or options->Fact = SamePattern or
options->Fact = SamePattern_SameRowPerm, it is an input argument.
On exit, perm_c may be overwritten by the product of the input
perm_c and a permutation that postorders the elimination tree
of Pc'*A'*A*Pc; perm_c is not changed if the elimination tree
is already in postorder.
Otherwise, it is an output argument.</pre><pre>perm_r (input/output) int*
If A->Stype = SLU_NC, row permutation vector of size A->nrow,
which defines the permutation matrix Pr, and is determined
by partial pivoting. perm_r[i] = j means row i of A is in
position j in Pr*A.
If A->Stype = SLU_NR, permutation vector of size A->ncol, which
determines permutation of rows of transpose(A)
(columns of A) as described above.</pre><pre> If options->RowPerm = MY_PERMR or
options->Fact = SamePattern_SameRowPerm, perm_r is an
input argument.
otherwise it is an output argument.</pre><pre>L (output) SuperMatrix*
The factor L from the factorization
Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
Uses compressed row subscripts storage for supernodes, i.e.,
L has types: Stype = SLU_SC, Dtype = SLU_S, Mtype = SLU_TRLU.</pre><pre>U (output) SuperMatrix*
The factor U from the factorization
Pr*A*Pc=L*U (if A->Stype = SLU_NC) or
Pr*transpose(A)*Pc=L*U (if A->Stype = SLU_NR).
Uses column-wise storage scheme, i.e., U has types:
Stype = SLU_NC, Dtype = SLU_S, Mtype = SLU_TRU.</pre><pre>B (input/output) SuperMatrix*
B has types: Stype = SLU_DN, Dtype = SLU_S, Mtype = SLU_GE.
On entry, the right hand side matrix.
On exit, the solution matrix if info = 0;</pre><pre>stat (output) SuperLUStat_t*
Record the statistics on runtime and floating-point operation count.
See util.h for the definition of '<a class="el" href="structSuperLUStat__t.html">SuperLUStat_t</a>'.</pre><pre>info (output) int*
= 0: successful exit
> 0: if info = i, and i is
<= A->ncol: U(i,i) is exactly zero. The factorization has
been completed, but the factor U is exactly singular,
so the solution could not be computed.
> A->ncol: number of bytes allocated when memory allocation
failure occurred, plus A->ncol.
</pre>
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="sgssv_8c_a6d5d8cc5159f2230fc059d0e382a63b8_cgraph.png" border="0" usemap="#sgssv_8c_a6d5d8cc5159f2230fc059d0e382a63b8_cgraph" alt=""/></div>
<map name="sgssv_8c_a6d5d8cc5159f2230fc059d0e382a63b8_cgraph" id="sgssv_8c_a6d5d8cc5159f2230fc059d0e382a63b8_cgraph">
<area shape="rect" id="node2" href="input__error_8c.html#a5832852b8f6777484b6f55dd79e67d86" title="input_error" alt="" coords="405,5,488,32"/><area shape="rect" id="node3" href="slu__sdefs_8h.html#abb3d30eea43abc536793244e7564e70d" title="Supernodal LU factor related. " alt="" coords="360,917,533,944"/><area shape="rect" id="node4" href="slu__util_8h.html#a0c6777573bbfe81917cd381e0090d355" title="Timer function. " alt="" coords="389,360,505,387"/><area shape="rect" id="node5" href="get__perm__c_8c.html#aaecb6e6e7a3e97356050bcfdf2573796" title="get_perm_c" alt="" coords="164,487,255,513"/><area shape="rect" id="node10" href="memory_8c.html#a49bbe20102e5b541c8e8963afa2bd46a" title="intMalloc" alt="" coords="605,993,680,1020"/><area shape="rect" id="node11" href="slu__util_8h.html#adf9c573cbfb4520a5ea820702d27cfa5" title="sp_preorder" alt="" coords="164,715,255,741"/><area shape="rect" id="node17" href="slu__util_8h.html#a72be96e75e58564c4322ef9ef73ca65f" title="sp_ienv" alt="" coords="609,2083,676,2109"/><area shape="rect" id="node19" href="sgstrf_8c.html#a7f9874cec10809f11998cc3d9cb88f8b" title="sgstrf" alt="" coords="182,1500,237,1527"/><area shape="rect" id="node42" href="sgstrs_8c.html#a9b6e1e555af9cf109ef3a584054a91e2" title="sgstrs" alt="" coords="180,183,239,209"/><area shape="rect" id="node49" href="slu__util_8h.html#a4de38e1c0ef18dd0791cb206c7f5348f" title="A is of type Stype==NCP. " alt="" coords="113,2235,306,2261"/><area shape="rect" id="node50" href="slu__util_8h.html#a2c43be55861c6e4ee5b806ac16cc382c" title="Deallocate the structure pointing to the actual storage of the matrix. " alt="" coords="137,2286,282,2327"/><area shape="rect" id="node6" href="get__perm__c_8c.html#a90f30e2b284864f6a800a98ceaff8fbc" title="getata" alt="" coords="417,411,476,437"/><area shape="rect" id="node7" href="get__perm__c_8c.html#a486ee50799ff66abe91efa46a5950a57" title="at_plus_a" alt="" coords="407,563,486,589"/><area shape="rect" id="node8" href="get__perm__c_8c.html#ae92c26cd488b7a86b8277cee2773d8ef" title="get_colamd" alt="" coords="402,461,491,488"/><area shape="rect" id="node9" href="get__perm__c_8c.html#a792508355b6bef974fcd9e214de40c8e" title="genmmd_" alt="" coords="407,512,486,539"/><area shape="rect" id="node12" href="slu__util_8h.html#a8a3ba6cbe163f9c12f6f10ee8ba98fc7" title="print_int_vec" alt="" coords="399,816,495,843"/><area shape="rect" id="node13" href="sp__preorder_8c.html#ac79059104ae6abf212c41986820d358c" title="check_perm" alt="" coords="400,664,493,691"/><area shape="rect" id="node14" href="sp__coletree_8c.html#a657d6b291654432e815392c2a00d2b84" title="sp_symetree" alt="" coords="398,715,495,741"/><area shape="rect" id="node15" href="slu__util_8h.html#af8198f26bef3c82fbb8601fc5a8e0d9e" title="sp_coletree" alt="" coords="402,765,491,792"/><area shape="rect" id="node16" href="slu__util_8h.html#a44084fde835d2ccaa25e9fd942a72b7a" title="TreePostorder" alt="" coords="591,765,695,792"/><area shape="rect" id="node18" href="SRC_2sp__ienv_8c.html#a89d63af74d9accdbcd7e859b687130cc" title="input_error" alt="" coords="747,2083,829,2109"/><area shape="rect" id="node20" href="slu__sdefs_8h.html#af68715ec86cde90aa31fec07164d6ea6" title="Memory-related. " alt="" coords="400,968,493,995"/><area shape="rect" id="node21" href="memory_8c.html#adbbe5a57b4ed64564c887fb52d798c54" title="Set up pointers for integer working arrays. " alt="" coords="408,1931,485,1957"/><area shape="rect" id="node22" href="slu__util_8h.html#ab0dfb6551008bcad5e758defdbd13006" title="Fills an integer array with a given value. " alt="" coords="623,1905,662,1932"/><area shape="rect" id="node23" href="slu__sdefs_8h.html#ab5b2859bf1ef1900506dfa702574c6ad" title="Set up pointers for real working arrays. " alt="" coords="401,2133,492,2160"/><area shape="rect" id="node24" href="heap__relax__snode_8c.html#a059d36bb76b7562c9bb2cbd7870e7ffe" title="heap_relax_snode" alt="" coords="383,1120,510,1147"/><area shape="rect" id="node25" href="relax__snode_8c.html#ad70bc12cb9031ab8aba4a37a18be46e3" title="relax_snode" alt="" coords="401,1981,493,2008"/><area shape="rect" id="node26" href="slu__sdefs_8h.html#ad9d54c8dfc11f1e034b4b7175be60ffb" title="ssnode_dfs" alt="" coords="402,1323,491,1349"/><area shape="rect" id="node27" href="slu__sdefs_8h.html#a9af26d0426eb0bb63755880f2e67e7b7" title="Expand the data structures for L and U during the factorization. " alt="" coords="587,1272,699,1299"/><area shape="rect" id="node28" href="slu__sdefs_8h.html#a60e60255360fae0b1458da070690a3a2" title="Performs numeric block updates within the relaxed snode. " alt="" coords="395,1373,498,1400"/><area shape="rect" id="node29" href="slu__sdefs_8h.html#ad7ddf03faedae25b4d73e0b6b33bf50c" title="spivotL" alt="" coords="415,1424,479,1451"/><area shape="rect" id="node30" href="slu__sdefs_8h.html#a297455c494a78c098b2bf418edbc6b16" title="Diagnostic print of column "jcol" in the U/L factor. " alt="" coords="399,1475,494,1501"/><area shape="rect" id="node31" href="slu__sdefs_8h.html#a77baf210393e04fa71d4e73b5e60e556" title="spanel_dfs" alt="" coords="404,1525,489,1552"/><area shape="rect" id="node32" href="slu__sdefs_8h.html#a51486936a9ff5079afed80eb5bf8a3e0" title="spanel_bmod" alt="" coords="397,2032,496,2059"/><area shape="rect" id="node33" href="scolumn__dfs_8c.html#ac9a044320fe8bfbb051a344686a4cb7d" title="scolumn_dfs" alt="" coords="399,1576,495,1603"/><area shape="rect" id="node34" href="scolumn__bmod_8c.html#ac89043410fd16fe2b8d3b2c902fec9f7" title="scolumn_bmod" alt="" coords="391,1171,502,1197"/><area shape="rect" id="node35" href="scopy__to__ucol_8c.html#ab44d465713c602e68295999c003daf7d" title="scopy_to_ucol" alt="" coords="393,1221,500,1248"/><area shape="rect" id="node36" href="slu__sdefs_8h.html#acf9da2c45289246ef663fc4a96d1ad78" title="spruneL" alt="" coords="413,1627,481,1653"/><area shape="rect" id="node37" href="slu__util_8h.html#ab71db926d60d7b8fd739df197b766366" title="Reset repfnz[] for the current column. " alt="" coords="400,1677,493,1704"/><area shape="rect" id="node38" href="slu__cdefs_8h.html#a8086902aa8be3fc7d04c3c82ec3a79dc" title="Count the total number of nonzeros in factors L and U, and in the symmetrically reduced L..." alt="" coords="413,1728,481,1755"/><area shape="rect" id="node39" href="slu__cdefs_8h.html#a7061332d759d7e4d73c1b2e5cb0bf2bf" title="Fix up the data storage lsub for L-subscripts. It removes the subscript sets for structural pruning..." alt="" coords="418,1779,475,1805"/><area shape="rect" id="node40" href="slu__sdefs_8h.html#a9035f0d2a50cf5d8e29287572bd1be83" title="Free the working storage used by factor routines. " alt="" coords="395,1829,498,1856"/><area shape="rect" id="node41" href="slu__sdefs_8h.html#af4386b0d87e1c8886b58fcf9d243bc12" title="sCreate_SuperNode_Matrix" alt="" coords="355,1069,538,1096"/><area shape="rect" id="node43" href="sgstrs_8c.html#ad582f185cce067a3f9dd4225248af758" title="sprint_soln" alt="" coords="404,259,489,285"/><area shape="rect" id="node44" href="slu__cdefs_8h.html#a3e1230bff11a9e47c35555299bcdcf1b" title="floatCalloc" alt="" coords="405,309,489,336"/><area shape="rect" id="node45" href="slu__cdefs_8h.html#a42361c3ce2ba81d149ffba01fbd6f138" title="floatMalloc" alt="" coords="404,56,489,83"/><area shape="rect" id="node46" href="slu__sdefs_8h.html#a68de665c44346f6eacfe87e9f3c2a1e6" title="strsm_" alt="" coords="415,107,478,133"/><area shape="rect" id="node47" href="slu__sdefs_8h.html#ab822504d3d60a944da04997b4f91e067" title="BLAS. " alt="" coords="411,157,483,184"/><area shape="rect" id="node48" href="sgstrs_8c.html#aa8bbeb2abbd5a10ac13fa9b48504691c" title="Solves a dense UNIT lower triangular system. " alt="" coords="415,208,478,235"/></map>
</div>
</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Oct 17 2020 14:25:32 for SuperLU by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
|