16 October 2023 3:36:56.268 PM setmat_test(): FORTRAN77 version Test setmat(). TEST01 Demonstration of symmetric triangle storage. Columns 1 to 5 Row 1 11.0000 21.0000 31.0000 41.0000 51.0000 2 21.0000 22.0000 32.0000 42.0000 52.0000 3 31.0000 32.0000 33.0000 43.0000 53.0000 4 41.0000 42.0000 43.0000 44.0000 54.0000 5 51.0000 52.0000 53.0000 54.0000 55.0000 ANAMAT analyzes matrix structure. using 4 intervals. AMIN= 11.0000000 AMAX= 55.0000000 Columns 1 to 5 11234 12234 22334 33344 44444 Symmetric triangle storage. Sum of absolute values of entries= 1005.00000 Matrix has 25 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is not upper Hessenberg. The matrix is symmetric. The matrix is not antisymmetric. The matrix is not diagonally dominant. The matrix is not banded. SHOMAT displays the storage of a matrix in memory. Memory Row I Column J 1 1 1 2 1 2 3 2 2 4 1 3 5 2 3 6 3 3 7 1 4 8 2 4 9 3 4 10 4 4 11 1 5 12 2 5 13 3 5 14 4 5 15 5 5 TEST02 Demonstration of upper triangle storage. Columns 1 to 5 Row 1 11.0000 12.0000 13.0000 14.0000 15.0000 2 22.0000 23.0000 24.0000 25.0000 3 33.0000 34.0000 35.0000 4 44.0000 45.0000 5 55.0000 ANAMAT analyzes matrix structure. using 4 intervals. AMIN= 11.0000000 AMAX= 55.0000000 Columns 1 to 5 11111 .2222 ..333 ...44 ....4 Upper triangle storage. Sum of absolute values of entries= 405.000000 Matrix has 15 nonzero entries. The matrix is upper triangular. The matrix is not lower triangular. The matrix is upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is not diagonally dominant. The matrix is banded. Upper bandwidth MU= 4 Lower bandwidth ML= 0 TEST03 Use SETMAT to store a band matrix. Use PRIMAT to print it out. Columns 1 to 5 Row 1 2.00000 3.00000 4.00000 2 1.00000 2.00000 3.00000 4.00000 3 1.00000 2.00000 3.00000 4.00000 4 1.00000 2.00000 3.00000 5 1.00000 2.00000 6 1.00000 Columns 6 to 8 Row 4 4.00000 5 3.00000 4.00000 6 2.00000 3.00000 4.00000 7 1.00000 2.00000 3.00000 8 1.00000 2.00000 ANAMAT analyzes matrix structure. using 3 intervals. AMIN= 1.00000000 AMAX= 4.00000000 Columns 1 to 8 233..... 1233.... .1233... ..1233.. ...1233. ....1233 .....123 ......12 LINPACK banded storage used. Sum of absolute values of entries= 68.0000000 Matrix has 28 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is not diagonally dominant. The matrix is banded. Upper bandwidth MU= 2 Lower bandwidth ML= 1 ADDMAT adds 10 to the diagonal. Columns 1 to 5 Row 1 12.0000 3.00000 4.00000 2 1.00000 12.0000 3.00000 4.00000 3 1.00000 12.0000 3.00000 4.00000 4 1.00000 12.0000 3.00000 5 1.00000 12.0000 6 1.00000 Columns 6 to 8 Row 4 4.00000 5 3.00000 4.00000 6 12.0000 3.00000 4.00000 7 1.00000 12.0000 3.00000 8 1.00000 12.0000 ANAMAT analyzes matrix structure. using 3 intervals. AMIN= 1.00000000 AMAX= 12.0000000 Columns 1 to 8 311..... 1311.... .1311... ..1311.. ...1311. ....1311 .....131 ......13 LINPACK banded storage used. Sum of absolute values of entries= 148.000000 Matrix has 28 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is strictly diagonally dominant. The matrix is banded. Upper bandwidth MU= 2 Lower bandwidth ML= 1 SHOMAT displays the storage of a matrix in memory. Memory Row I Column J 1 0 0 2 0 0 3 0 0 4 1 1 5 2 1 6 0 0 7 0 0 8 1 2 9 2 2 10 3 2 11 0 0 12 1 3 13 2 3 14 3 3 15 4 3 16 0 0 17 2 4 18 3 4 19 4 4 20 5 4 21 0 0 22 3 5 23 4 5 24 5 5 25 6 5 26 0 0 27 4 6 28 5 6 29 6 6 30 7 6 31 0 0 32 5 7 33 6 7 34 7 7 35 8 7 36 0 0 37 6 8 38 7 8 39 8 8 TEST04 Now we switch to a border-banded matrix. ZERMAT zeroes out old information. SETMAT stores new values. PRISYS prints the matrix and right hand side. NORMAT normalizes the matrix and a right hand side. Columns 1 to 4 and RHS Row 1 -16.0000 8.00000 1.00000 2 0.0 2.00000 0.0 2.00000 3 100.000 99.0000 98.0000 3.00000 4 17.0000 0.0 4.00000 5 1.00000 0.0 3.00000 14.0000 5.00000 Columns 5 to 5 and RHS Row 1 10.0000 1.00000 2 9.00000 2.00000 3 8.00000 3.00000 4 16.0000 4.00000 5 15.0000 5.00000 ANAMAT analyzes matrix structure. using 5 intervals. AMIN= 1.00000000 AMAX= 100.000000 Columns 1 to 5 11..1 .1..1 .5551 ..1.1 1.111 Border banded storage used. Sum of absolute values of entries= 416.000000 Matrix has 15 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is not upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is not diagonally dominant. The matrix is not banded. NORMAT row-normalizes the matrix and right hand side. Columns 1 to 4 and RHS Row 1 -1.00000 0.500000 0.625000E-01 2 0.0 0.222222 0.0 0.222222 3 1.00000 0.990000 0.980000 0.300000E-01 4 1.00000 0.0 0.235294 5 0.666667E-01 0.0 0.200000 0.933333 0.333333 Columns 5 to 5 and RHS Row 1 0.625000 0.625000E-01 2 1.00000 0.222222 3 0.800000E-01 0.300000E-01 4 0.941176 0.235294 5 1.00000 0.333333 ANAMAT analyzes matrix structure. using 5 intervals. AMIN= 6.66666701E-02 AMAX= 1.00000000 Columns 1 to 5 53..3 .1..5 .5551 ..5.5 1.155 Border banded storage used. Sum of absolute values of entries= 10.5383987 Matrix has 15 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is not upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is not diagonally dominant. The matrix is not banded. SHOMAT displays the storage of a matrix in memory. Memory Row I Column J 1 0 0 2 0 0 3 1 1 4 2 1 5 0 0 6 1 2 7 2 2 8 3 2 9 0 0 10 2 3 11 3 3 12 4 3 13 0 0 14 3 4 15 4 4 16 0 0 17 1 5 18 2 5 19 3 5 20 4 5 21 5 1 22 5 2 23 5 3 24 5 4 25 5 5 TEST05 Demonstration of matrix-vector multiplication. Columns 1 to 5 Row 1 2.00000 -1.00000 2 -1.00000 2.00000 -1.00000 3 -1.00000 2.00000 -1.00000 4 -1.00000 2.00000 -1.00000 5 -1.00000 2.00000 ANAMAT analyzes matrix structure. using 4 intervals. AMIN= 1.00000000 AMAX= 2.00000000 Columns 1 to 5 41... 141.. .141. ..141 ...14 LINPACK banded storage used. Sum of absolute values of entries= 18.0000000 Matrix has 13 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is upper Hessenberg. The matrix is symmetric. The matrix is not antisymmetric. The matrix is weakly diagonally dominant. The matrix is banded. Upper bandwidth MU= 1 Lower bandwidth ML= 1 X A*X 1.00000 0.00000 2.00000 0.00000 3.00000 0.00000 4.00000 0.00000 5.00000 6.00000 TEST06 Now use compressed storage mode. DIFMAT computes the jacobian of a function, which involves at most 3 variables. Nonzero column indices: 0 1 4 1 2 5 2 3 0 3 4 0 4 5 0 Columns 1 to 5 Row 1 1.99965 -0.999914 2 -0.999827 1.99983 -1.00000 3 -0.999827 2.00000 4 -1.00000 1.99983 5 -0.999827 2.00000 ANAMAT analyzes matrix structure. using 4 intervals. AMIN= 0.999827385 AMAX= 2.00000000 Columns 1 to 5 4..1. 14..1 .14.. ..14. ...14 Compressed storage used. Sum of absolute values of entries= 15.9987049 Matrix has 11 nonzero entries. The matrix is not upper triangular. The matrix is not lower triangular. The matrix is upper Hessenberg. The matrix is not symmetric. The matrix is not antisymmetric. The matrix is weakly diagonally dominant. The matrix is banded. Upper bandwidth MU= 3 Lower bandwidth ML= 1 SHOMAT displays the storage of a matrix in memory. Memory Row I Column J 1 0 0 2 1 1 3 1 4 4 2 1 5 2 2 6 2 5 7 3 2 8 3 3 9 0 0 10 4 3 11 4 4 12 0 0 13 5 4 14 5 5 setmat_test(): Normal end of execution. 16 October 2023 3:36:56.269 PM