Skip to main content

Module harwell_boeing

Module harwell_boeing 

Source
Expand description

Harwell-Boeing sparse matrix files (SciPy’s io.hb_read and io.hb_write).

A Harwell-Boeing file is fixed-width Fortran text: a title and key, the numbers of lines in each section, the matrix type (RUA: real, unsymmetric, assembled), the dimensions and number of entries, the Fortran formats of the sections, and then the 1-based column pointers, row indices and values of the matrix in compressed sparse column form.

Reading supports real and pattern matrices, unsymmetric, rectangular, symmetric and skew-symmetric (expanded to the full matrix, as for Matrix Market), with any integer format and E, D or F real formats; writing produces RUA files laid out as SciPy’s. Complex and elemental matrices and right-hand sides are not supported (nor by SciPy).

See the book entry Scientific data files.

Structs§

HarwellBoeing
A sparse matrix in compressed sparse column form, as read from or written to a Harwell-Boeing file (0-based).

Functions§

hb_decode
Parses a Harwell-Boeing file (SciPy’s hb_read). Symmetric and skew-symmetric matrices, which store one triangle, are expanded to the full matrix.
hb_encode
Writes a Harwell-Boeing file (SciPy’s hb_write), as a real unsymmetric assembled (RUA) matrix with SciPy’s choice of formats: integers as wide as the largest needs plus one, as many per 80-column line as fit, and values in (3E25.16).
read_hb_file
Reads a Harwell-Boeing file.
write_hb_file
Writes a Harwell-Boeing file.