slap


slap, a data directory which contains examples of slap files. These are files associated with the Sparse Linear Algebra Package (SLAP) of Anne Greenbaum and Mark Seager. This package includes a file format that may be used to store matrices externally.

File Characteristics:

SLAP files begin with a single header line containing five integers. These integers are written in a FORTRAN FORMAT of '(5I10)', that is, five integers, each written into a field of width 10 characters, and right justified. The format is

        N NELT ISYM IRHS ISOLN
      
The interpretation of these values is as follows:
  1. N, the order of the matrix;
  2. NELT, the number of nonzero values stored;
  3. ISYM, 1 if the matrix is symmetric, and only the lower triangular part is explicitly stored;
  4. IRHS, 1 if a right hand side vector is included;
  5. ISOLN, 1 if a solution vector is included;
Note that, presumably, one would only include a solution vector if one is also including a right hand side. In fact, the slap software, as written, will not properly handle a slap file that contains a solution vector but not a right hand side.

Immediately following the header line comes a series of NELT records, each containing the row, column and value of a nonzero entry of the matrix. Each line is written in a FORTRAN FORMAT of '(1X,I5,1X,I5,1X,E16.7)', that is, a space, a right-justified integer in a field of width 5, a space, another right-justified integer in a field of width 5, a space, and a real number in a field of width 16, with 7 digits after the decimal place and written in an exponential format. For K = 1 to NELT, the format is

        IA(K) JA(K) A(K)
      
The interpretation of these values is as follows:
  1. IA(K), the row index of the K-th element;
  2. JA(K), the column index of the K-th element;
  3. A(K), the value of the K-th element;

If IRHS = 1, then there follow N records containing a right hand side vector. Each line is written in a FORTRAN FORMAT of '(1X,E16.7)', that is, a space, and a real number in a field of width 16, with 7 digits after the decimal place and written in an exponential format. For I = 1 to N, the format is

        RHS(I)
      

If ISOLN = 1, then there follow N records containing a solution vector. Each line is written in a FORTRAN FORMAT of '(1X,E16.7)', that is, a space, and a real number in a field of width 16, with 7 digits after the decimal place and written in an exponential format. For I = 1 to N, the format is

        SOLN(I)
      

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Reference:

  1. Mark Seager,
    A SLAP for the Masses,
    Technical Report: UCRL-100267,
    Lawrence Livermore National Laboratory, December 1988.
  2. Web site:
    https://www.netlib.org/slap/index.html

Sample files:


Last revised on 07 June 2022.