HB_IO_NEW
Harwell Boeing Sparse Matrix Files
Read and Write Utilities
HB_IO_NEW
is a C++ library which
reads and writes files in the
Harwell Boeing sparse matrix format.
It is a version of HB_IO, revised by Reinhard Resch.
Reinhard Resch's improvements include
-
a new function to read files in double precision Fortran format;
-
use of C++ exception handling instead of calling exit(1);
-
use of C++ namespaces;
-
passing string arguments by reference;
-
use of constants instead of macros;
-
adding an interface to Octave;
Note that the most common "flavor" of HB file is an assembled
sparse matrix, but that there are some lesser used options,
including storage of the matrix as unassembled finite element
matrices, and corresponding storage of vectors. These secondary
options are less well documented, and are only marginally supported
in this package.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
HB_IO_NEW is available in
a C++ version.
Related Data and Programs:
CC_IO,
a C++ library which
reads and writes sparse linear systems
stored in the Compressed Column (CC) format.
HB,
a dataset directory which
contains a collection of sparse matrices in the HB format.
HB_IO,
a C++ library which
reads and writes sparse linear systems stored in the Harwell Boeing (HB)
format for sparse matrices. This library is intended to handle the
full range of HB formats.
HB_TO_MSM,
a MATLAB program which
reads an HB file and converts the matrix to MATLAB's sparse matrix format.
HB_TO_ST,
a FORTRAN77 program which
converts the sparse matrix information stored in a Harwell-Boeing
file into a sparse triplet file.
HBSMC,
a dataset directory which
contains the Harwell Boeing Sparse Matrix Collection;
LINPLUS,
a C++ library which
includes routines to manipulate matrices stored in the HB sparse matrix
format.
MM_IO,
a FORTRAN90 library which
reads and writes matrices in the Matrix Market format.
MSM_TO_HB,
a MATLAB program which
takes a matrix in MATLAB's sparse
matrix format and writes it out in the HB format.
ST_IO,
a C++ library which
reads and writes sparse linear systems
stored in the Sparse Triplet (ST) format.
SUPERLU,
a C library which
includes routines which can read and write matrices in the HB format.
Reference:
-
Iain Duff, Roger Grimes, John Lewis,
User's Guide for the Harwell-Boeing Sparse Matrix Collection,
October 1992.
-
Iain Duff, Roger Grimes, John Lewis,
Sparse Matrix Test Problems,
ACM Transactions on Mathematical Software,
Volume 15, pages 1-14, March 1989.
-
http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/
the Matrix Market site.
Source Code:
Examples and Tests:
Data files you may copy include:
-
rse_5.txt,
a sample HBSMC symmetric unassembled "element" matrix file.
-
rua_32.txt,
a sample HBSMC unsymmetric assembled sparse matrix file.
-
rua_32_file.txt,
a full version of "rua_32.txt" written by HB_FILE_WRITE.
-
rua_32_header.txt,
the header of "rua_32.txt" written by HB_HEADER_WRITE.
-
rua_32_rhs.txt,
the headers, structure, values and right hand side of
"rua_32.txt".
-
rua_32_structure.txt,
the headers and structure of "rua_32.txt".
-
rua_32_values.txt,
the headers, structure, and values of "rua_32.txt".
-
rua_32_ax.txt,
a sample HBSMC unsymmetric assembled sparse matrix file,
with exact solutions, and two right hand side vectors
computed from the exact solutions by calling HB_MATVEC_A_MEM.
List of Routines:
-
CH_EQI is true if two characters are equal, disregarding case.
-
CH_IS_DIGIT returns TRUE if a character is a decimal digit.
-
CH_IS_FORMAT_CODE returns TRUE if a character is a FORTRAN format code.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
HB_EXACT_READ reads the exact solution vectors in an HB file.
-
HB_EXACT_WRITE writes the exact solution vectors to an HB file.
-
HB_FILE_READ reads an HB file.
-
HB_FILE_WRITE writes an HB file.
-
HB_GUESS_READ reads the starting guess vectors in an HB file.
-
HB_GUESS_WRITE writes the starting guess vectors to an HB file.
-
HB_HEADER_PRINT prints the header of an HB file.
-
HB_HEADER_READ reads the header of an HB file.
-
HB_HEADER_WRITE writes the header of an HB file.
-
HB_MATVEC_A_MEM multiplies an assembled Harwell Boeing matrix times a vector.
-
HB_RHS_READ reads the right hand side information in an HB file.
-
HB_RHS_WRITE writes the right hand side information to an HB file.
-
HB_STRUCTURE_PRINT prints the structure of an HB matrix.
-
HB_STRUCTURE_READ reads the structure of an HB matrix.
-
HB_STRUCTURE_WRITE writes the structure of an HB matrix.
-
HB_UA_COLUMN_INDEX creates a column index for an unsymmetric assembled matrix.
-
HB_VALUES_PRINT prints the values of an HB matrix.
-
HB_VALUES_READ reads the values of an HB matrix.
-
HB_VALUES_WRITE writes the values of an HB matrix.
-
HB_VECMAT_A_MEM multiplies a vector times an assembled Harwell Boeing matrix.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the smaller of two I4's.
-
I4VEC_PRINT prints an I4VEC.
-
I4VEC_PRINT_PART prints "part" of an I4VEC.
-
R8MAT_PRINT prints an R8MAT.
-
R8CMAT_PRINT_SOME prints some of an R8CMAT.
-
R8VEC_PRINT prints an R8VEC.
-
R8VEC_PRINT_PART prints "part" of an R8VEC.
-
S_LEN_TRIM returns the length of a string to the last nonblank.
-
S_SUBSTRING returns a substring of a given string.
-
S_TO_FORMAT reads a FORTRAN format from a string.
-
S_TRIM promotes the final null forward through trailing blanks.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 08 November 2016.