Tue May 20 22:27:31 2025 r83_test(): python version: 3.10.12 numpy version: 1.26.4 Test r83(). r83_cg_test(): r83_cg() applies CG to an R83 matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 5.03196e-15 Norm of error ||x1-x2|| = 1.6248e-15 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_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_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_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_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|| = 5.22549e-05 Norm of error ||x1-x2|| = 0.000612448 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_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.00202698 Norm of error ||x1-x2|| = 0.0207161 r83_mtv_test(): r83_mv() computes b=A'*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 0.830063 0.830063 1: 3.97854 3.97854 2: 3.02002 3.02002 3: 2.52163 2.52163 4: 0 0 Product comparison: 0: 1.48926 1.48926 1: 2.01076 2.01076 2: 2.14772 2.14772 3: 7.18995 7.18995 4: 5.42345 5.42345 Product comparison: 0: 2.04839 2.04839 1: 4.45106 4.45106 2: 2.13191 2.13191 r83_mv_test(): r83_mv computes b=A*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 0: 2.02716 2.02716 1: 3.08085 3.08085 2: 3.47696 3.47696 Product comparison: 0: 2.26486 2.26486 1: 3.43185 3.43185 2: 2.57517 2.57517 3: 5.95788 5.95788 4: 7.30417 7.30417 Product comparison: 0: 2.79446 2.79446 1: 3.51776 3.51776 2: 1.89165 1.89165 3: 2.36795 2.36795 4: 0 0 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_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_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.977007 0.896325 1: 0.847885 0.646546 0.797929 2: 0.868675 0.356777 0.588784 Random R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.287181 0.160989 1: 0.0463217 0.127877 0.144245 2: 0.659506 0.177109 0.807853 3: 0.145605 0.297342 0.686041 4: 0.469359 0.723976 Random R83 matrix: Col: 0 1 2 Row --- 0: 0.172882 0.0214186 1: 0.799184 0.613232 0.500572 2: 0.329156 0.927766 3: 0.386987 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_to_r8ge_test(): r83_to_r8ge() converts an R83 matrix to R8GE format. We check three cases, MN. R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.884298 0.95086 1: 0.158444 0.180679 0.467146 2: 0.384381 0.284746 0.519783 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.884298 0.95086 0 0 0 1 : 0.158444 0.180679 0.467146 0 0 2 : 0 0.384381 0.284746 0.519783 0 R83 matrix: Col: 0 1 2 3 4 Row --- 0: 0.252745 0.703156 1: 0.246528 0.514447 0.644021 2: 0.310704 0.239086 0.95731 3: 0.71739 0.690186 0.725509 4: 0.0663729 0.827323 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.252745 0.703156 0 0 0 1 : 0.246528 0.514447 0.644021 0 0 2 : 0 0.310704 0.239086 0.95731 0 3 : 0 0 0.71739 0.690186 0.725509 4 : 0 0 0 0.0663729 0.827323 R83 matrix: Col: 0 1 2 Row --- 0: 0.948184 0.785692 1: 0.565514 0.600615 0.730901 2: 0.0119938 0.779876 3: 0.449165 R8GE matrix: Col: 0 1 2 Row 0 : 0.948184 0.785692 0 1 : 0.565514 0.600615 0.730901 2 : 0 0.0119938 0.779876 3 : 0 0 0.449165 4 : 0 0 0 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_test(): Normal end of execution. Tue May 20 22:27:31 2025