Tue Oct 19 17:06:11 2021 r83_test(): Python version: Test r83(). r83_CG_test r83_CG applies CG to an R83 matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 9.56662e-16 Norm of error ||x1-x2|| = 2.5017e-15 r83_CG_test Normal end of execution. r83_CR_FA_test r83_CR_FA factors a real tridiagonal matrix; Once the matrix has been factored, we can call r83_CR_SL to solve a linear system. Matrix order N = 5 Demonstrate multiple system solution method. System matrix A: Col: 0 1 2 3 4 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 Solve linear system number 1 Solution: [1. 2. 3. 4. 5.] Solve linear system number 2 Solution: [1. 1. 1. 1. 1.] r83_CR_FA_test Normal end of execution. r83_CR_SL_test r83_CR_SL solves a factored system after r83_CR_FA has factored it.. Matrix order N = 5 Demonstrate multiple system solution method. System matrix A: Col: 0 1 2 3 4 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 Solve linear system number 1 Solution [1. 2. 3. 4. 5.] Solve linear system number 2 Solution [1. 1. 1. 1. 1.] r83_CR_SL_test Normal end of execution. r83_cr_sls_test r83_cr_sls solves linear systems by cyclic reduction after the R83 matrix has been factored by r83_CR_FA. Matrix order N = 5 Demonstrate multiple system solution method. System matrix A: Col: 0 1 2 3 4 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 Solutions: Col: 0 1 Row 0 : 0 1 1 : 0 1 2 : 0 1 3 : 0 1 4 : 3 1 r83_cr_sls_test Normal end of execution. r83_dif2_test r83_dif2 sets an R83 matrix to the second difference. We check three cases, MN. Second difference in R83 format: Col: 0 1 2 3 4 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 -1 Second difference in R83 format: Col: 0 1 2 3 4 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 Second difference in R83 format: Col: 0 1 2 Row --- 0: 2 -1 1: -1 2 -1 2: -1 2 3: -1 r83_dif2_test Normal end of execution. r83_gs_sl_test r83_gs_sl applies Gauss-Seidel iteration with an R83 matrix to solve a linear system A*x=b. Number of variables N = 10 Norm of residual ||Ax-b|| = 3.62558e-05 Norm of error ||x1-x2|| = 0.000424933 r83_gs_sl_test Normal end of execution. r83_indicator_test r83_indicator returns an indicator matrix. We check three cases, MN. R83 indicator matrix: Col: 0 1 2 3 4 Row --- 0: 11 12 1: 21 22 23 2: 32 33 34 R83 indicator matrix: Col: 0 1 2 3 4 Row --- 0: 11 12 1: 21 22 23 2: 32 33 34 3: 43 44 45 4: 54 55 R83 indicator matrix: Col: 0 1 2 Row --- 0: 11 12 1: 21 22 23 2: 32 33 3: 43 r83_indicator_test Normal end of execution. r83_jac_sl_test r83_jac_sl applies Jacobi iteration with an R83 matrix to solve a linear system A*x=b. Number of variables N = 10 Norm of residual ||Ax-b|| = 0.00681921 Norm of error ||x1-x2|| = 0.0127207 r83_jac_sl_test Normal end of execution. r83_mtv_test r83_mv computes b=A'*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 2.18448 2.18448 1: 4.18684 4.18684 2: 2.88839 2.88839 3: 0.128843 0.128843 4: 0 0 Product comparison: 0: 1.77896 1.77896 1: 1.83182 1.83182 2: 3.11467 3.11467 3: 5.99729 5.99729 4: 5.83748 5.83748 Product comparison: 0: 0.701309 0.701309 1: 2.49924 2.49924 2: 3.03047 3.03047 r83_mtv_test Normal end of execution. r83_mv_test r83_mv computes b=A*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 0.912694 0.912694 1: 1.79708 1.79708 2: 5.22137 5.22137 Product comparison: 0: 1.95759 1.95759 1: 2.60688 2.60688 2: 3.20068 3.20068 3: 8.54504 8.54504 4: 0.523292 0.523292 Product comparison: 0: 0.447812 0.447812 1: 3.68778 3.68778 2: 1.91818 1.91818 3: 0.484206 0.484206 4: 0 0 r83_mv_test Normal end of execution. r83_print_test r83_print prints an R83 matrix. R83 matrix: Col: 0 1 2 3 4 Row --- 0: 11 12 1: 21 22 23 2: 32 33 34 3: 43 44 45 4: 54 55 r83_print_test Normal end of execution. 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: 22 23 2: 32 33 34 3: 43 44 4: 54 r83_print_some_test Normal end of execution. r83_random_test r83_random randomizes an R83 matrix. We check three cases, MN. Random R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.53642 0.101479 1: 0.589515 0.241782 0.83632 2: 0.389342 0.436772 0.904995 Random R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.383695 0.93231 1: 0.677258 0.138594 0.505153 2: 0.0111813 0.020563 0.193376 3: 0.880582 0.00183222 0.502496 4: 0.206912 0.261086 Random R83 matrix: Col: 0 1 2 Row --- 0: 0.865021 0.552837 1: 0.806808 0.0183138 0.272387 2: 0.688889 0.0502092 3: 0.376638 r83_random_test Normal end of execution. 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. 0.] Residual A*x-b [0. 0. 0. 0. 0.] Residual A*x-b [0. 0. 0. 0. 0.] r83_res_test Normal end of execution. r83_to_r8ge_test r83_to_r8ge converse an R83 matrix to R8GE format. We check three cases, MN. R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.981383 0.259136 1: 0.213778 0.0416739 0.829418 2: 0.482433 0.817208 0.187286 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.981383 0.259136 0 0 0 1 : 0.213778 0.0416739 0.829418 0 0 2 : 0 0.482433 0.817208 0.187286 0 R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.293463 0.706464 1: 0.658533 0.659985 0.770146 2: 0.145532 0.84033 0.754447 3: 0.265488 0.560492 0.715469 4: 0.14036 0.985116 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.293463 0.706464 0 0 0 1 : 0.658533 0.659985 0.770146 0 0 2 : 0 0.145532 0.84033 0.754447 0 3 : 0 0 0.265488 0.560492 0.715469 4 : 0 0 0 0.14036 0.985116 R83 matrix: Col: 0 1 2 Row --- 0: 0.368131 0.469288 1: 0.488562 0.510918 0.347672 2: 0.0624861 0.116198 3: 0.756858 R8GE matrix: Col: 0 1 2 Row 0 : 0.368131 0.469288 0 1 : 0.488562 0.510918 0.347672 2 : 0 0.0624861 0.116198 3 : 0 0 0.756858 4 : 0 0 0 r83_to_r8ge_test Normal end of execution. r83_zeros_test r83_zeros zeros an R83 matrix. We check three cases, MN. Zeroed R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0 0 1: 0 0 0 2: 0 0 0 Zeroed R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0 0 1: 0 0 0 2: 0 0 0 3: 0 0 0 4: 0 0 Zeroed R83 matrix: Col: 0 1 2 Row --- 0: 0 0 1: 0 0 0 2: 0 0 3: 0 r83_zeros_test Normal end of execution. r83_test: Normal end of execution. Tue Oct 19 17:06:11 2021