Thu Aug 18 11:04:00 2022 r83v_test(): Python version: 3.6.9 Test r83v(). R83V_CG_TEST R83V_CG applies CG to an R83V matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 6.14922256518019e-15 Norm of error ||x1-x2|| = 1.9657532501355684e-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.0434 1.0434 1: 3.24327 3.24327 2: 1.59773 1.59773 3: 2.92957 2.92957 4: 0 0 Product comparison: 0: 2.46515 2.46515 1: 3.26177 3.26177 2: 3.96098 3.96098 3: 2.239 2.239 4: 3.22941 3.22941 Product comparison: 0: 0.977957 0.977957 1: 2.20751 2.20751 2: 2.25193 2.25193 R83V_MV_TEST R83V_MV computes b=A*x, where A is an R83V matrix. We check three cases, MN. Product comparison: 0: 1.48115 1.48115 1: 3.0592 3.0592 2: 4.86212 4.86212 Product comparison: 0: 0.700247 0.700247 1: 1.66343 1.66343 2: 2.05542 2.05542 3: 4.31974 4.31974 4: 1.56363 1.56363 Product comparison: 0: 1.95426 1.95426 1: 2.02889 2.02889 2: 1.3492 1.3492 3: 0.893574 0.893574 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.78855 0.883869 2: 0.413109 0.742936 0.160289 3: 0.655604 0.0340968 0.856052 Random R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.305354 0.0238652 2: 0.385287 0.584738 0.748479 3: 0.196546 0.442355 0.574846 4: 0.609521 0.261184 0.993446 5: 0.0165129 0.628971 Random R83V matrix: Col: 1 2 3 Row --- 1: 0.60359 0.503824 2: 0.319764 0.954386 0.361267 3: 0.488143 0.780741 4: 0.995707 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.697793 0.423785 2: 0.339049 0.223914 0.671986 3: 0.274735 0.0833888 0.953554 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.697793 0.423785 0 0 0 1 : 0.339049 0.223914 0.671986 0 0 2 : 0 0.274735 0.0833888 0.953554 0 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.918683 0.307146 2: 0.646826 0.0393496 0.441752 3: 0.331821 0.400818 0.911152 4: 0.927387 0.696963 0.494562 5: 0.673549 0.985114 R8GE matrix: Col: 0 1 2 3 4 Row 0 : 0.918683 0.307146 0 0 0 1 : 0.646826 0.0393496 0.441752 0 0 2 : 0 0.331821 0.400818 0.911152 0 3 : 0 0 0.927387 0.696963 0.494562 4 : 0 0 0 0.673549 0.985114 R83V matrix: Col: 1 2 3 Row --- 1: 0.762681 0.513111 2: 0.599341 0.591711 0.478019 3: 0.617437 0.972857 4: 0.943254 R8GE matrix: Col: 0 1 2 Row 0 : 0.762681 0.513111 0 1 : 0.599341 0.591711 0.478019 2 : 0 0.617437 0.972857 3 : 0 0 0.943254 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. Thu Aug 18 11:04:00 2022