14 September 2021 10:27:48.828 AM r8st_TEST FORTRAN90 version: Test r8st. r8st_CG_TEST r8st_CG applies the conjugate gradient method to a linear system with r8st matrix. Matrix rows M = 50 Matrix columns N = 50 Matrix nonzeros = 148 Rows 1:10, Cols 1:10: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 6 0.00000 0.00000 0.00000 0.00000 -1.00000 Col: 6 7 8 9 10 Row --- 5 -1.00000 0.00000 0.00000 0.00000 0.00000 6 2.00000 -1.00000 0.00000 0.00000 0.00000 7 -1.00000 2.00000 -1.00000 0.00000 0.00000 8 0.00000 -1.00000 2.00000 -1.00000 0.00000 9 0.00000 0.00000 -1.00000 2.00000 -1.00000 10 0.00000 0.00000 0.00000 -1.00000 2.00000 Solution: 1 1.000000 2 2.000000 3 3.000000 4 4.000000 5 5.000000 6 6.000000 7 7.000000 8 8.000000 ...... .............. 50 50.000000 Maximum residual = 0.568434E-13 r8st_DIAGONAL_TEST r8st_DIAGONAL rearranges an r8st matrix so that the diagonal is listed first. Matrix order M = 6 Matrix order N = 6 Matrix nonzeros NZ_NUM = 20 Before rearrangement: K ROW(K) COL(K) A(K) 1 1 5 15.0000 2 3 6 36.0000 3 4 2 42.0000 4 6 2 62.0000 5 5 3 53.0000 6 2 4 24.0000 7 6 4 64.0000 8 3 5 35.0000 9 1 1 11.0000 10 2 6 26.0000 11 4 4 44.0000 12 6 6 66.0000 13 5 5 55.0000 14 4 1 41.0000 15 4 6 46.0000 16 3 3 33.0000 17 6 1 61.0000 18 2 2 22.0000 19 3 1 31.0000 20 4 3 43.0000 After rearrangement: K ROW(K) COL(K) A(K) 1 1 1 11.0000 2 2 2 22.0000 3 3 3 33.0000 4 4 4 44.0000 5 5 5 55.0000 6 6 6 66.0000 7 6 4 64.0000 8 3 5 35.0000 9 1 5 15.0000 10 2 6 26.0000 11 6 2 62.0000 12 2 4 24.0000 13 5 3 53.0000 14 4 1 41.0000 15 4 6 46.0000 16 4 2 42.0000 17 6 1 61.0000 18 3 6 36.0000 19 3 1 31.0000 20 4 3 43.0000 r8st_DIF2_TEST r8st_DIF2 sets up the second difference as an r8st matrix; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 14 The r8st matrix: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 6 0.00000 0.00000 0.00000 0.00000 -1.00000 r8st_IJ_TO_K_TEST r8st_IJ_TO_K returns the r8st index of (I,J). Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 I J K 1 1 -1 1 2 1 1 3 -1 1 4 -1 1 5 2 2 1 3 2 2 -1 2 3 -1 2 4 -1 2 5 4 3 1 -1 3 2 -1 3 3 -1 3 4 -1 3 5 -1 4 1 5 4 2 6 4 3 7 4 4 -1 4 5 -1 5 1 -1 5 2 -1 5 3 -1 5 4 8 5 5 -1 6 1 -1 6 2 -1 6 3 -1 6 4 9 6 5 -1 7 1 10 7 2 -1 7 3 -1 7 4 -1 7 5 -1 r8st_INDICATOR_TEST r8st_INDICATOR sets up a r8st indicator matrix; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 The r8st indicator matrix: Col: 1 2 3 4 5 Row --- 1 0.00000 12.0000 0.00000 0.00000 15.0000 2 21.0000 0.00000 0.00000 0.00000 25.0000 4 41.0000 42.0000 43.0000 0.00000 0.00000 5 0.00000 0.00000 0.00000 54.0000 0.00000 6 0.00000 0.00000 0.00000 64.0000 0.00000 7 71.0000 0.00000 0.00000 0.00000 0.00000 r8st_JAC_SL_TEST r8st_JAC_SL uses Jacobi iteration to solve a linear system with an r8st matrix. Matrix order M = 10 Matrix order N = 10 Matrix nonzeros NZ_NUM = 28 Iterations per call = 25 Current solution estimate: 1 0.315171 2 0.727797 3 1.14042 4 1.82758 5 2.51474 6 3.59047 7 4.66620 8 6.12820 9 7.59020 10 9.29510 Current solution estimate: 1 0.757545 2 1.51509 3 2.34936 4 3.18363 5 4.14729 6 5.11094 7 6.21581 8 7.32068 9 8.53366 10 9.74665 Current solution estimate: 1 0.910021 2 1.83432 3 2.75863 4 3.72124 5 4.68386 6 5.69666 7 6.70946 8 7.76839 9 8.82731 10 9.91366 r8st_MTV_TEST r8st_MTV computes b=A'*x, where A is an r8st matrix; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 The r8st matrix, in R8GE form: Col: 1 2 3 4 5 Row --- 1 0.00000 0.119186 0.00000 0.00000 0.124939 2 0.311088 0.00000 0.00000 0.00000 0.350227 3 0.00000 0.00000 0.00000 0.00000 0.00000 4 0.538085 0.702438 0.257503 0.00000 0.00000 5 0.00000 0.00000 0.00000 0.815553 0.00000 6 0.00000 0.00000 0.00000 0.174908 0.00000 7 0.251568 0.00000 0.00000 0.00000 0.00000 The vector x: 1 1.00000 2 0.00000 3 0.00000 4 0.00000 5 0.00000 6 0.00000 7 -1.00000 The product A' * x: 1 -0.251568 2 0.119186 3 0.00000 4 0.00000 5 0.124939 r8st_MV_TEST r8st_MV multiplies an r8st matrix by a vector; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 The r8st matrix, in R8GE form: Col: 1 2 3 4 5 Row --- 1 0.00000 0.443098 0.00000 0.00000 0.660065 2 0.699779 0.00000 0.00000 0.00000 0.512113 3 0.00000 0.00000 0.00000 0.00000 0.00000 4 0.227162 0.224333 0.851200 0.00000 0.00000 5 0.00000 0.00000 0.00000 0.856832 0.00000 6 0.00000 0.00000 0.00000 0.376293 0.00000 7 0.237420E-01 0.00000 0.00000 0.00000 0.00000 The vector x: 1 1.00000 2 0.00000 3 0.00000 4 0.00000 5 -1.00000 The product A * x: 1 -0.660065 2 0.187666 3 0.00000 4 0.227162 5 0.00000 6 0.00000 7 0.237420E-01 r8st_PRINT_TEST r8st_PRINT prints a r8st matrix; In this example, we have listed several matrix locations TWICE. r8st_PRINT should compute the sum of these values. In particular, we want A(1,2) = 112 and A(3,4) = 234. Matrix rows M = 5 Matrix columns N = 7 Matrix nonzeros = 12 The r8st matrix: Col: 1 2 3 4 5 Row --- 1 0.00000 112.000 0.00000 14.0000 0.00000 2 21.0000 0.00000 0.00000 24.0000 0.00000 3 0.00000 0.00000 0.00000 234.000 0.00000 4 0.00000 0.00000 0.00000 0.00000 45.0000 5 51.0000 52.0000 0.00000 0.00000 0.00000 Col: 6 7 Row --- 1 0.00000 17.0000 4 46.0000 0.00000 r8st_RANDOM_TEST r8st_RANDOM randomizes a r8st indicator matrix; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 The r8st matrix: Col: 1 2 3 4 5 Row --- 1 0.00000 0.879166 0.00000 0.00000 0.133945 2 0.565102 0.00000 0.00000 0.00000 0.653242 4 0.335342 0.358172 0.693758 0.00000 0.00000 5 0.00000 0.00000 0.00000 0.861115 0.00000 6 0.00000 0.00000 0.00000 0.244911 0.00000 7 0.903311 0.00000 0.00000 0.00000 0.00000 r8st_READ_TEST r8st_READ_SIZE reads the size of an r8st matrix. r8st_READ reads an r8st matrix from a file. r8st_READ_SIZE reports matrix size data: Matrix rows M = 100 Matrix columns N = 100 Matrix nonzeros NZ_NUM = 298 Initial 10x10 block of recovered r8st matrix: Col: 1 2 3 4 5 Row --- 1 101.000 102.000 0.00000 0.00000 0.00000 2 201.000 202.000 203.000 0.00000 0.00000 3 0.00000 302.000 303.000 304.000 0.00000 4 0.00000 0.00000 403.000 404.000 405.000 5 0.00000 0.00000 0.00000 504.000 505.000 6 0.00000 0.00000 0.00000 0.00000 605.000 Col: 6 7 8 9 10 Row --- 5 506.000 0.00000 0.00000 0.00000 0.00000 6 606.000 607.000 0.00000 0.00000 0.00000 7 706.000 707.000 708.000 0.00000 0.00000 8 0.00000 807.000 808.000 809.000 0.00000 9 0.00000 0.00000 908.000 909.000 910.000 10 0.00000 0.00000 0.00000 1009.00 1010.00 r8st_RES_TEST r8st_RES computes r=b-A*x, where A is an R8S3 matrix. Matrix order M = 5 Matrix order N = 4 Matrix nonzeros NZ_NUM = 11 x: 1 1.00000 2 2.00000 3 3.00000 4 4.00000 r=b-A*x: 1 0.00000 2 0.00000 3 0.00000 4 0.00000 5 0.00000 r8st_TO_R8GE_TEST r8st_TO_R8GE converts an r8st matrix to R8GE format. Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 14 The r8st matrix: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 6 0.00000 0.00000 0.00000 0.00000 -1.00000 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 6 0.00000 0.00000 0.00000 0.00000 -1.00000 7 0.00000 0.00000 0.00000 0.00000 0.00000 r8st_TO_R8NCF_TEST r8st_TO_R8NCF converts an r8st matrix to R8NCF format. Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 14 The r8st matrix: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 6 0.00000 0.00000 0.00000 0.00000 -1.00000 The R8NCF matrix: Col: 1 2 3 4 5 Row --- 1 2.00000 -1.00000 0. 0. 0. 2 -1.00000 2.00000 -1.00000 0. 0. 3 0. -1.00000 2.00000 -1.00000 0. 4 0. 0. -1.00000 2.00000 -1.00000 5 0. 0. 0. -1.00000 2.00000 6 0. 0. 0. 0. -1.00000 r8st_WRITE_TEST r8st_WRITE writes an r8st matrix to a file. Matrix rows M = 100 Matrix columns N = 100 Matrix nonzeros NZ_NUM = 298 Initial 10x10 block of R8S3 matrix: Col: 1 2 3 4 5 Row --- 1 101.000 102.000 0.00000 0.00000 0.00000 2 201.000 202.000 203.000 0.00000 0.00000 3 0.00000 302.000 303.000 304.000 0.00000 4 0.00000 0.00000 403.000 404.000 405.000 5 0.00000 0.00000 0.00000 504.000 505.000 6 0.00000 0.00000 0.00000 0.00000 605.000 Col: 6 7 8 9 10 Row --- 5 506.000 0.00000 0.00000 0.00000 0.00000 6 606.000 607.000 0.00000 0.00000 0.00000 7 706.000 707.000 708.000 0.00000 0.00000 8 0.00000 807.000 808.000 809.000 0.00000 9 0.00000 0.00000 908.000 909.000 910.000 10 0.00000 0.00000 0.00000 1009.00 1010.00 r8st_WRITE wrote the matrix data to "r8st_matrix.txt". r8st_ZEROS_TEST r8st_ZEROS zeros up a r8st indicator matrix; Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 The r8st zero matrix: Col: 1 2 3 4 5 Row --- r8st_TEST Normal end of execution. 14 September 2021 10:27:48.830 AM