Tue May 20 22:27:32 2025 r83v_test(): python version: 3.10.12 numpy version: 1.26.4 Test r83v(). r83v_cg_test() r83v_cg() applies CG to an R83V matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 1.46465307296144e-14 Norm of error ||x1-x2|| = 3.815009926328233e-15 R83V_COPY_TEST R83V_COPY copies an R83V matrix. Indicator matrix A: Col: 1 2 3 4 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 5: 54 B = copy of A: Col: 1 2 3 4 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 5: 54 R83V_CR_FA_TEST R83V_CR_FA factors an R83V matrix Once the matrix has been factored, we can call R83V_CR_SL to solve a linear system. Matrix order N = 5 Demonstrate multiple system solution method. System matrix A: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Solve linear system number 1 Solution: 0: 1 1: 2 2: 3 3: 4 4: 5 Solve linear system number 2 Solution: 0: 1 1: 1 2: 1 3: 1 4: 1 R83V_CR_SL_TEST R83V_CR_SL solves a factored system after R83V_CR_FA has factored it. Matrix order N = 5 Demonstrate multiple system solution method. Input matrix A: Col: 1 2 3 4 5 Row --- 1: 4 2 2: 1 4 2 3: 1 4 2 4: 1 4 2 5: 1 4 Solution: 0: 1 1: 2 2: 3 3: 4 4: 5 R83V_CR_SLS_TEST R83V_CR_SLS solves multiple linear systems A*x1:xn=b1:bn after R83V_CR_FA has factored it. Matrix order N = 5 Demonstrate multiple system solution method. Input matrix A: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Right hand sides b1:b2 Col: 0 1 Row 0 : 0 1 1 : 0 0 2 : 0 0 3 : 0 0 4 : 6 1 Solutions x1:x2 Col: 0 1 Row 0 : 1 1 1 : 2 1 2 : 3 1 3 : 4 1 4 : 5 1 R83V_DIF2_TEST R83V_DIF2 sets an R83V matrix to the second difference. We check three cases, MN. Second difference in R83V format: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 Second difference in R83V format: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Second difference in R83V format: Col: 1 2 3 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 4: -1 R83V_FS_TEST R83V_FS factors and solves a linear system for an R83V matrix. Matrix order N = 10 The right hand side: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 11 Solution: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 8: 9 9: 10 R83V_GS_SL_TEST R83V_GS_SL applies Gauss-Seidel iteration with an R83V matrix to solve a linear system A*x=b. Current solution estimate: 0: 0.634606 1: 1.3265 2: 2.09566 3: 2.95451 4: 3.90741 5: 4.95088 6: 6.07442 7: 7.2619 8: 8.4933 9: 9.74665 Current solution estimate: 0: 0.953567 1: 1.9145 2: 2.88533 3: 3.86757 4: 4.86173 5: 5.86733 6: 6.88302 7: 7.90675 8: 8.93599 9: 9.968 Current solution estimate: 0: 0.994126 1: 1.98918 2: 2.98549 3: 3.98325 4: 4.98251 5: 5.98322 6: 6.9852 7: 7.9882 8: 8.9919 9: 9.99595 R83V_INDICATOR_TEST R83V_INDICATOR sets an R83V indicator matrix. We check three cases, MN. R83V indicator matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 R83V indicator matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 R83V indicator matrix: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 R83V_JAC_SL_TEST R83V_JAC_SL applies Jacobi iteration with an R83V matrix to solve a linear system A*x=b. Current solution: 0: 0.315171 1: 0.727797 2: 1.14042 3: 1.82758 4: 2.51474 5: 3.59047 6: 4.6662 7: 6.1282 8: 7.5902 9: 9.2951 Current solution: 0: 0.757545 1: 1.51509 2: 2.34936 3: 3.18363 4: 4.14729 5: 5.11094 6: 6.21581 7: 7.32068 8: 8.53366 9: 9.74665 Current solution: 0: 0.910021 1: 1.83432 2: 2.75863 3: 3.72124 4: 4.68386 5: 5.69666 6: 6.70946 7: 7.76839 8: 8.82731 9: 9.91366 r83v_mtv_test() r83v_mv() computes b=A*x, where A is an R83V matrix. We check three cases, MN. Product comparison: 0: 1.52085 1.52085 1: 4.37276 4.37276 2: 1.63685 1.63685 3: 2.92631 2.92631 4: 0 0 Product comparison: 0: 1.73363 1.73363 1: 1.84369 1.84369 2: 2.46151 2.46151 3: 9.16526 9.16526 4: 5.89569 5.89569 Product comparison: 0: 0.65625 0.65625 1: 3.37529 3.37529 2: 4.59726 4.59726 r83v_mv_test(): r83v_mv() computes b=A*x, where A is an R83V matrix. We check three cases, MN. Product comparison: 0: 2.03035 2.03035 1: 2.37692 2.37692 2: 4.42424 4.42424 Product comparison: 0: 1.83305 1.83305 1: 2.90703 2.90703 2: 5.11044 5.11044 3: 5.69403 5.69403 4: 3.6592 3.6592 Product comparison: 0: 2.26652 2.26652 1: 2.36904 2.36904 2: 1.64493 1.64493 3: 2.05764 2.05764 4: 0 0 R83V_PRINT_TEST R83V_PRINT prints an R83V matrix. R83V matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 r83v_print_some_test(): r83v_print_some() prints some of an R83V matrix. Rows 2-5, Cols 2-4: Col: 2 3 4 Row --- 2: 22 23 3: 32 33 34 4: 43 44 5: 54 r83v_random_test(): r83v_random() randomizes an R83V matrix. We check three cases, MN. Random R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.384482 0.605951 2: 0.406753 0.232342 0.657703 3: 0.320101 0.122593 0.999066 Random R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.950388 0.258523 2: 0.309771 0.958803 0.135004 3: 0.689513 0.892356 0.0607869 4: 0.198164 0.105285 0.43965 5: 0.761838 0.11607 Random R83V matrix: Col: 1 2 3 Row --- 1: 0.448638 0.296118 2: 0.214265 0.815221 0.836992 3: 0.370719 0.352328 4: 0.284166 r83v_res_test(): r83v_res() computes b-A*x, where A is an R83V matrix. We check three cases, MN. Residual A*x-b: 0: 0 1: 0 2: 0 Residual A*x-b: 0: 0 1: 0 2: 0 3: 0 4: 0 Residual A*x-b: 0: 0 1: 0 2: 0 3: 0 4: 0 r83v_to_r8ge_test(): r83v_to_r8ge() converts an R83V matrix to R8GE format. We check three cases, MN. R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.825907 0.767383 2: 0.405818 0.912988 0.155126 3: 0.290423 0.739099 0.287832 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.825907 0.767383 0 0 0 1 : 0.405818 0.912988 0.155126 0 0 2 : 0 0.290423 0.739099 0.287832 0 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.880845 0.253917 2: 0.755433 0.0955894 0.618502 3: 0.789422 0.0484426 0.628104 4: 0.44964 0.371964 0.968178 5: 0.171063 0.990239 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.880845 0.253917 0 0 0 1 : 0.755433 0.0955894 0.618502 0 0 2 : 0 0.789422 0.0484426 0.628104 0 3 : 0 0 0.44964 0.371964 0.968178 4 : 0 0 0 0.171063 0.990239 R83V matrix: Col: 1 2 3 Row --- 1: 0.585206 0.00402849 2: 0.538307 0.507233 0.682024 3: 0.930226 0.633521 4: 0.334367 R8GE matrix: Col: 0 1 2 Row 0 : 0.585206 0.00402849 0 1 : 0.538307 0.507233 0.682024 2 : 0 0.930226 0.633521 3 : 0 0 0.334367 4 : 0 0 0 R83V_TO_R8VEC_TEST R83V_TO_R8VEC copies an R83V matrix to an R8VEC. We check three cases, MN. R83V matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 Vector version of A: 0: 11 1: 21 2: 12 3: 22 4: 32 5: 23 6: 33 7: 34 R83V matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 Vector version of A: 0: 11 1: 21 2: 12 3: 22 4: 32 5: 23 6: 33 7: 43 8: 34 9: 44 10: 54 11: 45 12: 55 R83V matrix A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 Vector version of A: 0: 11 1: 21 2: 12 3: 22 4: 32 5: 23 6: 33 7: 43 R83V_TRANSPOSE_TEST R83V_TRANSPOSE makes a transposed copy of an R83V matrix. Indicator matrix A: Col: 1 2 3 4 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 5: 54 B = transposed copy of A: Col: 1 2 3 4 5 Row --- 1: 11 21 2: 12 22 32 3: 23 33 43 4: 34 44 54 R83V_ZEROS_TEST R83V_ZEROS zeros an R83V matrix. We check three cases, MN. Zeroed R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 Zeroed R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 4: 0 0 0 5: 0 0 Zeroed R83V matrix: Col: 1 2 3 Row --- 1: 0 0 2: 0 0 0 3: 0 0 4: 0 r8ge_to_r83v_test(): r8ge_to_r83v() copies an R8GE matrix to an R83V matrix. We check three cases, MN. Initial R8GE matrix A: [[11. 12. 13. 14. 15.] [21. 22. 23. 24. 25.] [31. 32. 33. 34. 35.]] R83V copy of (some of ) matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 Initial R8GE matrix A: [[11. 12. 13. 14. 15.] [21. 22. 23. 24. 25.] [31. 32. 33. 34. 35.] [41. 42. 43. 44. 45.] [51. 52. 53. 54. 55.]] R83V copy of (some of ) matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 Initial R8GE matrix A: [[11. 12. 13.] [21. 22. 23.] [31. 32. 33.] [41. 42. 43.] [51. 52. 53.]] R83V copy of (some of ) matrix A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 R8VEC_TO_R83V_TEST R8VEC_TO_R83V copies an R8VEC to an R83V matrix. We check three cases, MN. R8VEC: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 1 3 2: 2 4 6 3: 5 7 8 R8VEC: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 8: 9 9: 10 10: 11 11: 12 12: 13 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 1 3 2: 2 4 6 3: 5 7 9 4: 8 10 12 5: 11 13 R8VEC: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 R83V matrix: Col: 1 2 3 Row --- 1: 1 3 2: 2 4 6 3: 5 7 4: 8 r83v_test(): Normal end of execution. Tue May 20 22:27:32 2025