05 September 2015 08:48:11 PM R83S_PRB C++ version Test R83S. R83S_CG_TEST R83S_CG applies CG to an R83S matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 8.47455e-16 Norm of error ||x1-x2|| = 4.1616e-16 R83S_DIF2_TEST R83S_DIF2 sets up the second difference matrix in R83S format. We check three cases, MN. The R83S matrix: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 The R83S matrix: 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 The R83S matrix: Col: 1 2 3 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 4: -1 R83S_GS_SL_TEST R83S_GS_SL uses Gauss-Seidel iteration on an R83S matrix. Matrix order N = 10 Iterations per call = 25 Current estimated solution: 1 0.634606 2 1.3265 3 2.09566 4 2.95451 5 3.90741 6 4.95088 7 6.07442 8 7.2619 9 8.4933 10 9.74665 Current estimated solution: 1 0.953567 2 1.9145 3 2.88533 4 3.86757 5 4.86173 6 5.86733 7 6.88302 8 7.90675 9 8.93599 10 9.968 Current estimated solution: 1 0.994126 2 1.98918 3 2.98549 4 3.98325 5 4.98251 6 5.98322 7 6.9852 8 7.9882 9 8.9919 10 9.99595 R83S_INDICATOR_TEST R83S_INDICATOR sets up an R83S indicator matrix. The R83S indicator matrix: Col: 1 2 3 4 Row --- 1: 2 3 2: 1 2 3 3: 1 2 3 4: 1 2 5: 1 R83S_JAC_SL_TEST R83S_JAC_SL solves a linear system using Jacobi iteration, for an R83S matrix. Matrix order N = 10 Iterations per call = 25 Current estimated solution: 1 0.315171 2 0.727797 3 1.14042 4 1.82758 5 2.51474 6 3.59047 7 4.6662 8 6.1282 9 7.5902 10 9.2951 Current estimated solution: 1 0.757545 2 1.51509 3 2.34936 4 3.18363 5 4.14729 6 5.11094 7 6.21581 8 7.32068 9 8.53366 10 9.74665 Current estimated solution: 1 0.910021 2 1.83432 3 2.75863 4 3.72124 5 4.68386 6 5.69666 7 6.70946 8 7.76839 9 8.82731 10 9.91366 R83S_MTV_TEST R83S_MTV computes b=A'*x, where A is an R83S matrix. We check three cases, MN. Product comparison: 0: 2.61534 2.61534 1: 4.61958 4.61958 2: 3.30579 3.30579 3: 0.655255 0.655255 4: 0 0 Product comparison: 0: 2.61534 2.61534 1: 4.61958 4.61958 2: 6.62383 6.62383 3: 8.62807 8.62807 4: 5.65526 5.65526 Product comparison: 0: 2.61534 2.61534 1: 4.61958 4.61958 2: 6.62383 6.62383 R83S_MV_TEST R83S_MV computes b=A*x, where A is an R83S matrix. We check three cases, MN. Product comparison: 0: 1.39315 1.39315 1: 3.3974 3.3974 2: 5.40164 5.40164 Product comparison: 0: 1.39315 1.39315 1: 3.3974 3.3974 2: 5.40164 5.40164 3: 7.40589 7.40589 4: 8.09962 8.09962 Product comparison: 0: 1.39315 1.39315 1: 3.3974 3.3974 2: 4.52797 4.52797 3: 2.48853 2.48853 4: 0 0 R83S_PRINT_TEST R83S_PRINT prints an R83S matrix. The R83S matrix: Col: 1 2 3 4 Row --- 1: 2 3 2: 1 2 3 3: 1 2 3 4: 1 2 5: 1 R83S_PRINT_SOME_TEST R83S_PRINT_SOME prints some of an R83S matrix. Rows 1-4, Cols 1-3: Col: 1 2 3 Row --- 1: 2 3 2: 1 2 3 3: 1 2 4: 1 R83S_RANDOM_TEST R83S_RANDOM randomizes an R83S matrix. The R83 matrix: Col: 1 2 3 4 Row --- 1: 0.956318 0.218418 2: 0.829509 0.956318 0.218418 3: 0.829509 0.956318 0.218418 4: 0.829509 0.956318 5: 0.829509 R83S_RES_TEST R83S_RES computes b-A*x, where A is an R83S matrix. We check three cases, MN. Residual A*x-b: 1 0 2 0 3 0 Residual A*x-b: 1 0 2 0 3 0 4 0 5 0 Residual A*x-b: 1 0 2 0 3 0 4 0 5 0 R83S_TO_R8GE_TEST R83S_TO_R8GE converts an R83S matrix to R8GE format. We check three cases, MN. The R83S matrix: Col: 1 2 3 4 5 Row --- 1: 0.956318 0.218418 2: 0.829509 0.956318 0.218418 3: 0.829509 0.956318 0.218418 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.956318 0.218418 0 0 0 2 0.829509 0.956318 0.218418 0 0 3 0 0.829509 0.956318 0.218418 0 The R83S matrix: Col: 1 2 3 4 5 Row --- 1: 0.956318 0.218418 2: 0.829509 0.956318 0.218418 3: 0.829509 0.956318 0.218418 4: 0.829509 0.956318 0.218418 5: 0.829509 0.956318 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.956318 0.218418 0 0 0 2 0.829509 0.956318 0.218418 0 0 3 0 0.829509 0.956318 0.218418 0 4 0 0 0.829509 0.956318 0.218418 5 0 0 0 0.829509 0.956318 The R83S matrix: Col: 1 2 3 Row --- 1: 0.956318 0.218418 2: 0.829509 0.956318 0.218418 3: 0.829509 0.956318 4: 0.829509 The R8GE matrix: Col: 1 2 3 Row --- 1 0.956318 0.218418 0 2 0.829509 0.956318 0.218418 3 0 0.829509 0.956318 4 0 0 0.829509 5 0 0 0 R83S_ZEROS_TEST R83S_ZEROS zeros an R83S matrix. The R83S matrix: Col: 1 2 3 4 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 4: 0 0 5: 0 R83S_PRB Normal end of execution. 05 September 2015 08:48:11 PM