Numerical Computing with Modern Fortran

Richard J. Hanson and Tim Hopkins

Chapter 4: Sparse Matrices, Defined Operations, Overloaded Assignment

Source Code:

  1. in zip format
  2. in gzipped tar format

This executable puts the sparse matrix utilities and defined operations through tests. Each of the defined operations .p., .t., and defined + (for HB represented matrices) are tested by comparing with dense matrix operations.

There is a single executable file which the makefile will generate

Sample output from testSparseStruct

Test   Status        Description
  1    Passed        set and getExpansion factor tests

  2    Passed        HB Matrix Agrees with Dense Equivalent Matrix.

  3    Passed        HB Matrix Accumulation test

  4    Passed        HB Matrix (.t.) Agrees with Dense Matrix Transpose.

  5    Passed        HB Matrix * Vector (.p.) Agrees with Dense Matrix * Vector

  6    Passed        Vector * HB Matrix (.p.) Agrees with Vector * Dense Matrix

  7    Passed        HB Matrix + HB Matrix Agrees with Dense Matrix Sum.
Donate · Contact Us · Site Map · Join SIAM · My Account
Facebook Twitter Youtube linkedin google+