20 January 2017 10:10:56 AM R83_PRB C version Test R83. R83_CG_TEST R83_CG applies CG to an R83 matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 8.47455e-16 Norm of error ||x1-x2|| = 4.1616e-16 R83_CR_FA_TEST: R83_CR_FA factors an R83 matrix using cyclic reduction; Matrix order N = 10 The matrix is NOT symmetric. The matrix: Col: 1 2 3 4 5 Row --- 1 4.000000 2.000000 2 1.000000 8.000000 3.000000 3 2.000000 12.000000 4.000000 4 3.000000 16.000000 5.000000 5 4.000000 20.000000 6 5.000000 Col: 6 7 8 9 10 Row --- 5 6.000000 6 24.000000 7.000000 7 6.000000 28.000000 8.000000 8 7.000000 32.000000 9.000000 9 8.000000 36.000000 10.000000 10 9.000000 40.000000 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 R83_CR_SL_TEST: R83_CR_SL solves a linear system A*x=b with R83 matrix using cyclic reduction, after factorization by R83_CR_FA. Matrix order N = 10 The matrix is NOT symmetric. The matrix: Col: 1 2 3 4 5 Row --- 1 4.000000 2.000000 2 1.000000 8.000000 3.000000 3 2.000000 12.000000 4.000000 4 3.000000 16.000000 5.000000 5 4.000000 20.000000 6 5.000000 Col: 6 7 8 9 10 Row --- 5 6.000000 6 24.000000 7.000000 7 6.000000 28.000000 8.000000 8 7.000000 32.000000 9.000000 9 8.000000 36.000000 10.000000 10 9.000000 40.000000 Solution: 0 1.000000 1 2.000000 2 3.000000 3 4.000000 4 5.000000 5 6.000000 6 7.000000 7 8.000000 8 9.000000 9 10.000000 R83_CR_SLS_TEST R83_CR_SLS solves multiple linear systems A*x=b1:bn with R83 matrix using cyclic reduction, after factorization by R83_CR_FA. Matrix order N = 5 Number of linear systems = 2 Demonstrate multiple system solution method. System matrix: Col: 1 2 3 4 5 Row --- 1 2.000000 -1.000000 2 -1.000000 2.000000 -1.000000 3 -1.000000 2.000000 -1.000000 4 -1.000000 2.000000 -1.000000 5 -1.000000 2.000000 RHS: Col: 1 2 Row --- 1 0 1 2 0 0 3 0 0 4 0 0 5 6 1 Solutions: Col: 1 2 Row --- 1 1 1 2 2 1 3 3 1 4 4 1 5 5 1 R83_DIF2_TEST R83_DIF2 sets up the second difference matrix. We check three cases, MN. The R83 matrix: Col: 1 2 3 4 5 Row --- 1 2.000000 -1.000000 2 -1.000000 2.000000 -1.000000 3 -1.000000 2.000000 -1.000000 The R83 matrix: Col: 1 2 3 4 5 Row --- 1 2.000000 -1.000000 2 -1.000000 2.000000 -1.000000 3 -1.000000 2.000000 -1.000000 4 -1.000000 2.000000 -1.000000 5 -1.000000 2.000000 The R83 matrix: Col: 1 2 3 Row --- 1 2.000000 -1.000000 2 -1.000000 2.000000 -1.000000 3 -1.000000 2.000000 4 -1.000000 R83_GS_SL_TEST R83_GS_SL solves a linear system using Gauss-Seidel iteration. Matrix order N = 10 Iterations per call = 25 Current estimated solution: 0 0.634606 1 1.326504 2 2.095665 3 2.954509 4 3.907410 5 4.950882 6 6.074424 7 7.261901 8 8.493295 9 9.746648 Current estimated solution: 0 0.953567 1 1.914504 2 2.885328 3 3.867570 4 4.861732 5 5.867333 6 6.883019 7 7.906746 8 8.935991 9 9.967996 Current estimated solution: 0 0.994126 1 1.989185 2 2.985494 3 3.983248 4 4.982509 5 5.983218 6 6.985202 7 7.988203 8 8.991903 9 9.995951 R83_INDICATOR_TEST R83_INDICATOR sets up an R83 indicator matrix. We check three cases, MN. The R83 indicator matrix: Col: 1 2 3 4 5 Row --- 1 11.000000 12.000000 2 21.000000 22.000000 23.000000 3 32.000000 33.000000 34.000000 The R83 indicator matrix: Col: 1 2 3 4 5 Row --- 1 11.000000 12.000000 2 21.000000 22.000000 23.000000 3 32.000000 33.000000 34.000000 4 43.000000 44.000000 45.000000 5 54.000000 55.000000 The R83 indicator matrix: Col: 1 2 3 Row --- 1 11.000000 12.000000 2 21.000000 22.000000 23.000000 3 32.000000 33.000000 4 43.000000 R83_JAC_SL_TEST R83_JAC_SL solves a linear system using Jacobi iteration, for an R83 matrix. Matrix order N = 10 Iterations per call = 25 The right hand side: 0 0.000000 1 0.000000 2 0.000000 3 0.000000 4 0.000000 5 0.000000 6 0.000000 7 0.000000 8 0.000000 9 11.000000 Current estimated solution: 0 0.315171 1 0.727797 2 1.140423 3 1.827580 4 2.514737 5 3.590467 6 4.666197 7 6.128201 8 7.590205 9 9.295102 Current estimated solution: 0 0.757545 1 1.515091 2 2.349361 3 3.183631 4 4.147287 5 5.110943 6 6.215812 7 7.320681 8 8.533664 9 9.746648 Current estimated solution: 0 0.910021 1 1.834323 2 2.758626 3 3.721242 4 4.683859 5 5.696660 6 6.709462 7 7.768388 8 8.827314 9 9.913657 R83_MTV_TEST R83_MTV computes b=A'*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 2.13105 2.13105 1: 3.19882 3.19882 2: 0.904971 0.904971 3: 0.32987 0.32987 4: 0 0 Product comparison: 0: 2.13105 2.13105 1: 3.19882 3.19882 2: 1.3448 1.3448 3: 2.97599 2.97599 4: 3.80469 3.80469 Product comparison: 0: 2.13105 2.13105 1: 3.19882 3.19882 2: 1.3448 1.3448 R83_MV_TEST R83_MV computes b=A*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 1.87744 1.87744 1: 2.27806 2.27806 2: 2.04317 2.04317 Product comparison: 0: 1.87744 1.87744 1: 2.27806 2.27806 2: 1.77866 1.77866 3: 5.11343 5.11343 4: 2.25344 2.25344 Product comparison: 0: 1.87744 1.87744 1: 2.27806 2.27806 2: 1.60335 1.60335 3: 0.32987 0.32987 4: 0 0 R83_PRINT_TEST R83_PRINT prints an R83 matrix. The R83 matrix: Col: 1 2 3 4 Row --- 1 11.000000 12.000000 2 21.000000 22.000000 23.000000 3 32.000000 33.000000 34.000000 4 43.000000 44.000000 5 54.000000 R83_PRINT_SOME_TEST R83_PRINT_SOME prints some of an R83 matrix. Rows 1-4, Cols 1-3: Col: 1 2 3 Row --- 1 11.000000 12.000000 2 21.000000 22.000000 23.000000 3 32.000000 33.000000 4 43.000000 R83_RANDOM_TEST R83_RANDOM randomizes an R83 matrix. The R83 matrix: Col: 1 2 3 4 Row --- 1 0.218418 0.829509 2 0.956318 0.561695 0.066119 3 0.415307 0.257578 0.043829 4 0.109957 0.633966 5 0.061727 R83_RES_TEST R83_RES computes b-A*x, where A is an R83 matrix. We check three cases, MN. Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 3 0.000000 4 0.000000 Residual A*x-b: 0 0.000000 1 0.000000 2 0.000000 3 0.000000 4 0.000000 R83_TO_R8GE_TEST R83_TO_R8GE converts an R83 matrix to R8GE format. We check three cases, MN. The R83 matrix: The R8GE matrix: The R83 matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 2 0.956318 0.561695 0.066119 3 0.415307 0.257578 0.109957 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 0 0 0 2 0.956318 0.561695 0.0661187 0 0 3 0 0.415307 0.257578 0.109957 0 The R83 matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 2 0.956318 0.561695 0.066119 3 0.415307 0.257578 0.043829 4 0.109957 0.633966 0.449539 5 0.061727 0.401306 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.829509 0 0 0 2 0.956318 0.561695 0.0661187 0 0 3 0 0.415307 0.257578 0.043829 0 4 0 0 0.109957 0.633966 0.449539 5 0 0 0 0.0617272 0.401306 R83_ZEROS_TEST R83_ZEROS zeros an R83 matrix. The R83 matrix: Col: 1 2 3 4 Row --- 1 0.000000 0.000000 2 0.000000 0.000000 0.000000 3 0.000000 0.000000 0.000000 4 0.000000 0.000000 5 0.000000 R83_PRB Normal end of execution. 20 January 2017 10:10:56 AM