Blob Blame Raw
<!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/sreadhb.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&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>SRC/sreadhb.c File Reference</h1>Read a matrix stored in Harwell-Boeing format. <a href="#_details">More...</a>
<p>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &quot;<a class="el" href="slu__sdefs_8h-source.html">slu_sdefs.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#752858dee322b95e4175c3f5d42ad6cd">sDumpLine</a> (FILE *fp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Eat up the rest of the current line.  <a href="#752858dee322b95e4175c3f5d42ad6cd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#b0bd0cdb6d30a7cb74e401aa6ac3bce1">sParseIntFormat</a> (char *buf, int *num, int *size)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#97275461fb2f2435189f35f5dd7c3fce">sParseFloatFormat</a> (char *buf, int *num, int *size)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#fbec2a501b92e7e7bb13af2e21520522">ReadVector</a> (FILE *fp, int n, int *where, int perline, int persize)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#d90abece4b82f3f44fdefa92c28bda09">sReadValues</a> (FILE *fp, int n, float *destination, int perline, int persize)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sreadhb_8c.html#ad3b24bf891015e699d67ed53fb3b21b">sreadhb</a> (int *nrow, int *ncol, int *nonz, float **nzval, int **rowind, int **colptr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Auxiliary routines.  <a href="#ad3b24bf891015e699d67ed53fb3b21b"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<pre>
 -- SuperLU routine (version 2.0) --
 Univ. of California Berkeley, Xerox Palo Alto Research Center,
 and Lawrence Berkeley National Lab.
 November 15, 1997</pre><p>
<pre> Purpose
 =======</pre><p>
<pre> Read a FLOAT PRECISION matrix stored in Harwell-Boeing format 
 as described below.</pre><p>
<pre> Line 1 (A72,A8) 
  	Col. 1 - 72   Title (TITLE) 
	Col. 73 - 80  Key (KEY)</pre><p>
<pre> Line 2 (5I14) 
 	Col. 1 - 14   Total number of lines excluding header (TOTCRD) 
 	Col. 15 - 28  Number of lines for pointers (PTRCRD) 
 	Col. 29 - 42  Number of lines for row (or variable) indices (INDCRD) 
 	Col. 43 - 56  Number of lines for numerical values (VALCRD) 
	Col. 57 - 70  Number of lines for right-hand sides (RHSCRD) 
                    (including starting guesses and solution vectors 
		       if present) 
           	      (zero indicates no right-hand side data is present)</pre><p>
<pre> Line 3 (A3, 11X, 4I14) 
   	Col. 1 - 3    Matrix type (see below) (MXTYPE) 
 	Col. 15 - 28  Number of rows (or variables) (NROW) 
 	Col. 29 - 42  Number of columns (or elements) (NCOL) 
	Col. 43 - 56  Number of row (or variable) indices (NNZERO) 
	              (equal to number of entries for assembled matrices) 
 	Col. 57 - 70  Number of elemental matrix entries (NELTVL) 
	              (zero in the case of assembled matrices) 
 Line 4 (2A16, 2A20) 
 	Col. 1 - 16   Format for pointers (PTRFMT) 
	Col. 17 - 32  Format for row (or variable) indices (INDFMT) 
	Col. 33 - 52  Format for numerical values of coefficient matrix (VALFMT) 
 	Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)</pre><p>
<pre> Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present 
    	Col. 1 	      Right-hand side type: 
	         	  F for full storage or M for same format as matrix 
    	Col. 2        G if a starting vector(s) (Guess) is supplied. (RHSTYP) 
    	Col. 3        X if an exact solution vector(s) is supplied. 
	Col. 15 - 28  Number of right-hand sides (NRHS) 
	Col. 29 - 42  Number of row indices (NRHSIX) 
          	      (ignored in case of unassembled matrices)</pre><p>
<pre> The three character type field on line 3 describes the matrix type. 
 The following table lists the permitted values for each of the three 
 characters. As an example of the type field, RSA denotes that the matrix 
 is real, symmetric, and assembled.</pre><p>
<pre> First Character: 
	R Real matrix 
	C Complex matrix 
	P Pattern only (no numerical values supplied)</pre><p>
<pre> Second Character: 
	S Symmetric 
	U Unsymmetric 
	H Hermitian 
	Z Skew symmetric 
	R Rectangular</pre><p>
<pre> Third Character: 
	A Assembled 
	E Elemental matrices (unassembled)</pre><p>
<pre> </pre> <hr><h2>Function Documentation</h2>
<a class="anchor" name="fbec2a501b92e7e7bb13af2e21520522"></a><!-- doxytag: member="sreadhb.c::ReadVector" ref="fbec2a501b92e7e7bb13af2e21520522" args="(FILE *fp, int n, int *where, int perline, int persize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int ReadVector           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>where</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>perline</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>persize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="752858dee322b95e4175c3f5d42ad6cd"></a><!-- doxytag: member="sreadhb.c::sDumpLine" ref="752858dee322b95e4175c3f5d42ad6cd" args="(FILE *fp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sDumpLine           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>fp</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="97275461fb2f2435189f35f5dd7c3fce"></a><!-- doxytag: member="sreadhb.c::sParseFloatFormat" ref="97275461fb2f2435189f35f5dd7c3fce" args="(char *buf, int *num, int *size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sParseFloatFormat           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="b0bd0cdb6d30a7cb74e401aa6ac3bce1"></a><!-- doxytag: member="sreadhb.c::sParseIntFormat" ref="b0bd0cdb6d30a7cb74e401aa6ac3bce1" args="(char *buf, int *num, int *size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sParseIntFormat           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="ad3b24bf891015e699d67ed53fb3b21b"></a><!-- doxytag: member="sreadhb.c::sreadhb" ref="ad3b24bf891015e699d67ed53fb3b21b" args="(int *nrow, int *ncol, int *nonz, float **nzval, int **rowind, int **colptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sreadhb           </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>nrow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>ncol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>nonz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float **&nbsp;</td>
          <td class="paramname"> <em>nzval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int **&nbsp;</td>
          <td class="paramname"> <em>rowind</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int **&nbsp;</td>
          <td class="paramname"> <em>colptr</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="d90abece4b82f3f44fdefa92c28bda09"></a><!-- doxytag: member="sreadhb.c::sReadValues" ref="d90abece4b82f3f44fdefa92c28bda09" args="(FILE *fp, int n, float *destination, int perline, int persize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sReadValues           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&nbsp;</td>
          <td class="paramname"> <em>destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>perline</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>persize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</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&nbsp;
<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>