olafread.c

Driver for the olaf matrix format.

Summary
olafread.cDriver for the olaf matrix format.
olafReadHeaderReads header from file infile
olafReadReads a matrix in olaf format.

olafReadHeader

void olafReadHeader(FILE *infile,
pastix_int_t *Nrow,
pastix_int_t *Ncol,
pastix_int_t *Nnzero,
char *Type)

Reads header from file infile

header format is :

Nrow
Nnzero

Nrow is equal to Ncol

Parameters

infileFile to read from
NrowNumber of rows
NcolNumber of columns
NnzeroNumber of non zeros
TypeType of the matrix

olafRead

void olafRead(char const *filename,
pastix_int_t *Nrow,
pastix_int_t *Ncol,
pastix_int_t *Nnzero,
pastix_int_t **col,
pastix_int_t **row,
pastix_float_t **val,
char **Type,
char **RhsType,
pastix_float_t **rhs)

Reads a matrix in olaf format.

Header format is described in olafReadHeader, Olaf files contains : colptr, row and avals in the CSC format

 colptr[0]
 colptr[1]
....
 row[0]
 row[1]
 ...
 avals[0]
 avals[1]
 ...

Parameters

filenamePath to the directory containing hfile, ifile, jfile and afile
NrowNumber of rows
NcolNumber of columns
NnzeroNumber of non zeros
colIndex of first element of each column in row and val
rowRow of eah element
valValue of each element
TypeType of the matrix
RhsTypeType of the right hand side.
void olafReadHeader(FILE *infile,
pastix_int_t *Nrow,
pastix_int_t *Ncol,
pastix_int_t *Nnzero,
char *Type)
Reads header from file infile
void olafRead(char const *filename,
pastix_int_t *Nrow,
pastix_int_t *Ncol,
pastix_int_t *Nnzero,
pastix_int_t **col,
pastix_int_t **row,
pastix_float_t **val,
char **Type,
char **RhsType,
pastix_float_t **rhs)
Reads a matrix in olaf format.
Close