|
kusano |
7d535a |
|
|
kusano |
7d535a |
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
|
|
kusano |
7d535a |
<title>SuperLU: SRC/dreadhb.c File Reference</title>
|
|
kusano |
7d535a |
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Main Page
|
|
kusano |
7d535a |
Data Structures
|
|
kusano |
7d535a |
Files
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SRC/dreadhb.c File ReferenceRead a matrix stored in Harwell-Boeing format. More...
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#include <stdio.h>
|
|
kusano |
7d535a |
#include <stdlib.h>
|
|
kusano |
7d535a |
#include "slu_ddefs.h"
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Functions
|
|
kusano |
7d535a |
int dDumpLine (FILE *fp)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Eat up the rest of the current line.
|
|
kusano |
7d535a |
int dParseIntFormat (char *buf, int *num, int *size)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dParseFloatFormat (char *buf, int *num, int *size)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
static int ReadVector (FILE *fp, int n, int *where, int perline, int persize)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dReadValues (FILE *fp, int n, double *destination, int perline, int persize)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
void dreadhb (int *nrow, int *ncol, int *nonz, double **nzval, int **rowind, int **colptr)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Auxiliary routines.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Detailed Description
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
-- SuperLU routine (version 2.0) --
|
|
kusano |
7d535a |
Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
|
kusano |
7d535a |
and Lawrence Berkeley National Lab.
|
|
kusano |
7d535a |
November 15, 1997
|
|
kusano |
7d535a |
Purpose
|
|
kusano |
7d535a |
=======
|
|
kusano |
7d535a |
Read a DOUBLE PRECISION matrix stored in Harwell-Boeing format
|
|
kusano |
7d535a |
as described below.
|
|
kusano |
7d535a |
Line 1 (A72,A8)
|
|
kusano |
7d535a |
Col. 1 - 72 Title (TITLE)
|
|
kusano |
7d535a |
Col. 73 - 80 Key (KEY)
|
|
kusano |
7d535a |
Line 2 (5I14)
|
|
kusano |
7d535a |
Col. 1 - 14 Total number of lines excluding header (TOTCRD)
|
|
kusano |
7d535a |
Col. 15 - 28 Number of lines for pointers (PTRCRD)
|
|
kusano |
7d535a |
Col. 29 - 42 Number of lines for row (or variable) indices (INDCRD)
|
|
kusano |
7d535a |
Col. 43 - 56 Number of lines for numerical values (VALCRD)
|
|
kusano |
7d535a |
Col. 57 - 70 Number of lines for right-hand sides (RHSCRD)
|
|
kusano |
7d535a |
(including starting guesses and solution vectors
|
|
kusano |
7d535a |
if present)
|
|
kusano |
7d535a |
(zero indicates no right-hand side data is present)
|
|
kusano |
7d535a |
Line 3 (A3, 11X, 4I14)
|
|
kusano |
7d535a |
Col. 1 - 3 Matrix type (see below) (MXTYPE)
|
|
kusano |
7d535a |
Col. 15 - 28 Number of rows (or variables) (NROW)
|
|
kusano |
7d535a |
Col. 29 - 42 Number of columns (or elements) (NCOL)
|
|
kusano |
7d535a |
Col. 43 - 56 Number of row (or variable) indices (NNZERO)
|
|
kusano |
7d535a |
(equal to number of entries for assembled matrices)
|
|
kusano |
7d535a |
Col. 57 - 70 Number of elemental matrix entries (NELTVL)
|
|
kusano |
7d535a |
(zero in the case of assembled matrices)
|
|
kusano |
7d535a |
Line 4 (2A16, 2A20)
|
|
kusano |
7d535a |
Col. 1 - 16 Format for pointers (PTRFMT)
|
|
kusano |
7d535a |
Col. 17 - 32 Format for row (or variable) indices (INDFMT)
|
|
kusano |
7d535a |
Col. 33 - 52 Format for numerical values of coefficient matrix (VALFMT)
|
|
kusano |
7d535a |
Col. 53 - 72 Format for numerical values of right-hand sides (RHSFMT)
|
|
kusano |
7d535a |
Line 5 (A3, 11X, 2I14) Only present if there are right-hand sides present
|
|
kusano |
7d535a |
Col. 1 Right-hand side type:
|
|
kusano |
7d535a |
F for full storage or M for same format as matrix
|
|
kusano |
7d535a |
Col. 2 G if a starting vector(s) (Guess) is supplied. (RHSTYP)
|
|
kusano |
7d535a |
Col. 3 X if an exact solution vector(s) is supplied.
|
|
kusano |
7d535a |
Col. 15 - 28 Number of right-hand sides (NRHS)
|
|
kusano |
7d535a |
Col. 29 - 42 Number of row indices (NRHSIX)
|
|
kusano |
7d535a |
(ignored in case of unassembled matrices)
|
|
kusano |
7d535a |
The three character type field on line 3 describes the matrix type.
|
|
kusano |
7d535a |
The following table lists the permitted values for each of the three
|
|
kusano |
7d535a |
characters. As an example of the type field, RSA denotes that the matrix
|
|
kusano |
7d535a |
is real, symmetric, and assembled.
|
|
kusano |
7d535a |
First Character:
|
|
kusano |
7d535a |
R Real matrix
|
|
kusano |
7d535a |
C Complex matrix
|
|
kusano |
7d535a |
P Pattern only (no numerical values supplied)
|
|
kusano |
7d535a |
Second Character:
|
|
kusano |
7d535a |
S Symmetric
|
|
kusano |
7d535a |
U Unsymmetric
|
|
kusano |
7d535a |
H Hermitian
|
|
kusano |
7d535a |
Z Skew symmetric
|
|
kusano |
7d535a |
R Rectangular
|
|
kusano |
7d535a |
Third Character:
|
|
kusano |
7d535a |
A Assembled
|
|
kusano |
7d535a |
E Elemental matrices (unassembled)
|
|
kusano |
7d535a |
Function Documentation
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dDumpLine
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
FILE *
|
|
kusano |
7d535a |
fp
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dParseFloatFormat
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
char *
|
|
kusano |
7d535a |
buf,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
num,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
size
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dParseIntFormat
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
char *
|
|
kusano |
7d535a |
buf,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
num,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
size
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
void dreadhb
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
nrow,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
ncol,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
nonz,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
double **
|
|
kusano |
7d535a |
nzval,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int **
|
|
kusano |
7d535a |
rowind,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int **
|
|
kusano |
7d535a |
colptr
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int dReadValues
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
FILE *
|
|
kusano |
7d535a |
fp,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
n,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
double *
|
|
kusano |
7d535a |
destination,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
perline,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
persize
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
static int ReadVector
|
|
kusano |
7d535a |
(
|
|
kusano |
7d535a |
FILE *
|
|
kusano |
7d535a |
fp,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
n,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int *
|
|
kusano |
7d535a |
where,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
perline,
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int
|
|
kusano |
7d535a |
persize
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
)
|
|
kusano |
7d535a |
[static]
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
<address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:47 2010 for SuperLU by </small></address>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1.5.5
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|