SuperLU: SRC/sreadrb.c File Reference

SuperLU 7.0.1

Functions
sreadrb.c File Reference

Read a matrix stored in Rutherford-Boeing format. More...

`#include <stdio.h>`
`#include <stdlib.h>`
`#include "slu_sdefs.h"`
Include dependency graph for sreadrb.c:

## Functions
static int | sDumpLine (FILE *fp)
| Eat up the rest of the current line. More...
static int | sParseIntFormat (char *buf, int *num, int *size)
static int | sParseFloatFormat (char *buf, int *num, int *size)
static int | ReadVector (FILE *fp, int n, int_t *where, int perline, int persize)
static int | sReadValues (FILE *fp, int n, float *destination, int perline, int persize)
static void | FormFullA (int n, int_t *nonz, float **nzval, int_t **rowind, int_t **colptr)
void | sreadrb (int *nrow, int *ncol, int_t *nonz, float **nzval, int_t **rowind, int_t **colptr)

## Detailed Description

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)

All rights reserved.

The source code is distributed under BSD license, see the file License.txt at the top-level directory.

    -- SuperLU routine (version 4.0) --
    Lawrence Berkeley National Laboratory.
    June 30, 2009

# Purpose

    Read a FLOAT PRECISION matrix stored in Rutherford-Boeing format
    as described below.

    Line 1 (A72, A8)
         Col. 1 - 72   Title (TITLE)
         Col. 73 - 80  Matrix name / identifier (MTRXID)

    Line 2 (I14, 3(1X, I13))
         Col. 1 - 14   Total number of lines excluding header (TOTCRD)
         Col. 16 - 28  Number of lines for pointers (PTRCRD)
         Col. 30 - 42  Number of lines for row (or variable) indices (INDCRD)
         Col. 44 - 56  Number of lines for numerical values (VALCRD)

    Line 3 (A3, 11X, 4(1X, I13))
         Col. 1 - 3    Matrix type (see below) (MXTYPE)
         Col. 15 - 28  Compressed Column: Number of rows (NROW)
                       Elemental: Largest integer used to index variable (MVAR)
         Col. 30 - 42  Compressed Column: Number of columns (NCOL)
                       Elemental: Number of element matrices (NELT)
         Col. 44 - 56  Compressed Column: Number of entries (NNZERO)
                       Elemental: Number of variable indices (NVARIX)
         Col. 58 - 70  Compressed Column: Unused, explicitly zero
                       Elemental: Number of elemental matrix entries (NELTVL)

    Line 4 (2A16, A20)
         Col. 1 - 16   Fortran format for pointers (PTRFMT)
         Col. 17 - 32  Fortran format for row (or variable) indices (INDFMT)
         Col. 33 - 52  Fortran format for numerical values of coefficient matrix
                       (VALFMT)
                       (blank in the case of matrix patterns)

    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.

    First Character:
         R Real matrix
         C Complex matrix
         I integer matrix
         P Pattern only (no numerical values supplied)
         Q Pattern only (numerical values supplied in associated auxiliary value
           file)

    Second Character:
         S Symmetric
         U Unsymmetric
         H Hermitian
         Z Skew symmetric
         R Rectangular

    Third Character:
         A Compressed column form
         E Elemental form

## Function Documentation

## ◆ FormFullA()

static void FormFullA | ( | int | n,
|  | int_t * | nonz,
|  | float ** | nzval,
|  | int_t ** | rowind,
|  | int_t ** | colptr
| ) |  |
| static

    On input, nonz/nzval/rowind/colptr represents lower part of a symmetric
    matrix. On exit, it represents the full matrix with lower and upper parts.

Here is the call graph for this function:

## ◆ ReadVector()

static int ReadVector | ( | FILE * | fp,
|  | int | n,
|  | int_t * | where,
|  | int | perline,
|  | int | persize
| ) |  |
| static

## ◆ sDumpLine()

static int sDumpLine | ( | FILE * | fp | ) |
| static

## ◆ sParseFloatFormat()

static int sParseFloatFormat | ( | char * | buf,
|  | int * | num,
|  | int * | size
| ) |  |
| static

## ◆ sParseIntFormat()

static int sParseIntFormat | ( | char * | buf,
|  | int * | num,
|  | int * | size
| ) |  |
| static

## ◆ sreadrb()

void sreadrb | ( | int * | nrow,
|  | int * | ncol,
|  | int_t * | nonz,
|  | float ** | nzval,
|  | int_t ** | rowind,
|  | int_t ** | colptr
| ) |  |

Here is the call graph for this function:

## ◆ sReadValues()

static int sReadValues | ( | FILE * | fp,
|  | int | n,
|  | float * | destination,
|  | int | perline,
|  | int | persize
| ) |  |
| static