07-Jan-2022 22:37:02 kelley_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test kelley() arnoldi_test(): Test arnoldi() on the simple -1,2-1 matrix of order N = 5 V = 0 0 0 0 1 0 0 0 -1 0 0 0 1 0 0 0 -1 0 0 0 1 0 0 0 0 Norm of V' * V - I = 0 bicgstab_test(): bicgstab() solves the simple -1,2-1 matrix of order N = 20 Before BICGSTAB: ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After BICGSTAB: ||X_ERROR|| = 6.569581e-09 ||A*x-b|| = 2.154477e-10 Number of iterations: 20 Residual error history: 1 2.100000e+01 2 6.062178e+00 3 3.299832e+00 4 2.213594e+00 5 1.635007e+00 6 1.281864e+00 7 1.045450e+00 8 8.774544e-01 9 7.524163e-01 10 6.561685e-01 11 5.799848e-01 12 5.183222e-01 13 4.669121e-01 14 4.212527e-01 15 3.753684e-01 16 3.239107e-01 17 2.643018e-01 18 1.977284e-01 19 1.282688e-01 20 6.086974e-02 21 2.154474e-10 Before BICGSTAB: ||X_ERROR|| = 5.099743e+01 ||A*x-b|| = 2.019213e+01 After BICGSTAB: ||X_ERROR|| = 1.780883e-11 ||A*x-b|| = 4.772604e-13 Number of iterations: 20 Residual error history: 1 2.019213e+01 2 5.769372e+00 3 3.232937e+00 4 2.153664e+00 5 1.570984e+00 6 1.225010e+00 7 9.981188e-01 8 8.319539e-01 9 6.979378e-01 10 6.009909e-01 11 5.326075e-01 12 4.768251e-01 13 4.252338e-01 14 3.757697e-01 15 3.283782e-01 16 2.762670e-01 17 2.130312e-01 18 1.467616e-01 19 8.749281e-02 20 3.974857e-02 21 4.776612e-13 broyden_test(): broyden() solves a system of nonlinear equations using Broyden's method. Test it on the Chandrasekhar function. Error flag IERR = 0 Residual norm: 0.000007 it_hist = Columns 1 through 7 0.3233 0.1333 0.0128 0.0044 0.0009 0.0005 0.0000 Columns 8 through 9 0.0000 0.0000 broyden_armijo_test(): broyden_armijo() solves a system of nonlinear equations using Broyden's method with the Armijo rule. Test it on the Chandrasekhar function. Error flag IERR = 0 Residual norm: 0.000007 it_hist = 0.3233 0 0 0.1333 2.0000 0 0.0128 3.0000 0 0.0044 4.0000 0 0.0009 5.0000 0 0.0005 6.0000 0 0.0000 7.0000 0 0.0000 8.0000 0 0.0000 9.0000 0 cg_test() Test cg() on the simple -1,2-1 matrix of order N = 20 Before CG: ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After CG: ||X_ERROR|| = 2.670104e-14 ||A*x-b|| = 2.642354e-14 Number of iterations: 21 Residual error history: 1 2.100000e+01 2 1.050000e+01 3 7.000000e+00 4 5.250000e+00 5 4.200000e+00 6 3.500000e+00 7 3.000000e+00 8 2.625000e+00 9 2.333333e+00 10 2.100000e+00 11 1.909091e+00 12 1.750000e+00 13 1.615385e+00 14 1.500000e+00 15 1.400000e+00 16 1.312500e+00 17 1.235294e+00 18 1.166667e+00 19 1.105263e+00 20 1.050000e+00 21 2.098073e-15 Before CG: ||X_ERROR|| = 5.185166e+01 ||A*x-b|| = 2.219488e+01 After CG: ||X_ERROR|| = 1.919659e-14 ||A*x-b|| = 2.937647e-14 Number of iterations: 21 Residual error history: 1 2.219488e+01 2 1.067557e+01 3 6.835865e+00 4 5.196000e+00 5 4.234315e+00 6 3.505896e+00 7 2.997113e+00 8 2.605875e+00 9 2.333149e+00 10 2.056308e+00 11 1.778691e+00 12 1.636804e+00 13 1.519590e+00 14 1.422665e+00 15 1.348746e+00 16 1.263192e+00 17 1.211572e+00 18 1.151081e+00 19 1.062454e+00 20 1.009249e+00 21 6.679988e-15 diffjac_test() diffjac() uses finite differences to estimate the jacobian J(X) of a function F(X). The evaluation point X: x = 1 2 3 The function value F(X): fx = 12.3792 12.3607 3.0000 The exact jacobian J(X): jac = 6.3662 -3.1831 10.0000 4.4721 8.9443 0 0 0 1.0000 The estimated jacobian J2(X): jac2 = 6.3662 -3.1831 10.0000 4.4721 8.9443 0 0 0 1.0000 gmres_test() Test gmres() on the simple -1,2-1 matrix of order N = 20 Before GMRES: ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After GMRES: ||X_ERROR|| = 1.098840e-14 ||A*x-b|| = 1.045498e-14 GMRES took 20 iterations GMRES residual error history: 1 2.100000e+01 2 9.391486e+00 3 5.612486e+00 4 3.834058e+00 5 2.831639e+00 6 2.201398e+00 7 1.774824e+00 8 1.470294e+00 9 1.243933e+00 10 1.070259e+00 11 9.335639e-01 12 8.236878e-01 13 7.337994e-01 14 6.591531e-01 15 5.963599e-01 16 5.429421e-01 17 4.970501e-01 18 4.572787e-01 19 4.225429e-01 20 3.919930e-01 21 0.000000e+00 Before GMRES: ||X_ERROR|| = 5.168263e+01 ||A*x-b|| = 2.128211e+01 After GMRES: ||X_ERROR|| = 6.799787e-14 ||A*x-b|| = 2.236817e-14 GMRES took 20 iterations GMRES residual error history: 1 2.128211e+01 2 9.571759e+00 3 5.547135e+00 4 3.814243e+00 5 2.792951e+00 6 2.179788e+00 7 1.749264e+00 8 1.439615e+00 9 1.221101e+00 10 1.047682e+00 11 9.031907e-01 12 7.883743e-01 13 7.022814e-01 14 6.301608e-01 15 5.691115e-01 16 5.196800e-01 17 4.762257e-01 18 4.403046e-01 19 4.061903e-01 20 3.774918e-01 21 7.446407e-29 gmresa_test() Test gmresa() on the simple -1,2-1 matrix of order N = 20 Before GMRESA: ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After GMRESA: ||X_ERROR|| = 4.714511e-13 ||A*x-b|| = 3.141853e-14 GMRESB took 20 iterations GMRESB residual error history: 1 2.100000e+01 2 9.391486e+00 3 5.612486e+00 4 3.834058e+00 5 2.831639e+00 6 2.201398e+00 7 1.774824e+00 8 1.470294e+00 9 1.243933e+00 10 1.070259e+00 11 9.335639e-01 12 8.236878e-01 13 7.337994e-01 14 6.591531e-01 15 5.963599e-01 16 5.429421e-01 17 4.970501e-01 18 4.572787e-01 19 4.225429e-01 20 3.919930e-01 21 3.141853e-14 Before GMRESA: ||X_ERROR|| = 5.174613e+01 ||A*x-b|| = 2.092176e+01 After GMRESA: ||X_ERROR|| = 9.373603e-13 ||A*x-b|| = 6.516281e-14 GMRESB took 20 iterations GMRESB residual error history: 1 2.092176e+01 2 9.292204e+00 3 5.666744e+00 4 3.860181e+00 5 2.836480e+00 6 2.171668e+00 7 1.750981e+00 8 1.457790e+00 9 1.230347e+00 10 1.059344e+00 11 9.083758e-01 12 7.959543e-01 13 7.035680e-01 14 6.315412e-01 15 5.736044e-01 16 5.207559e-01 17 4.764372e-01 18 4.376168e-01 19 4.064969e-01 20 3.777551e-01 21 4.741671e-14 gmresb_test() Test gmresb() on the simple -1,2-1 matrix of order N = 20 Before GMRESB: ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After GMRESB: ||X_ERROR|| = 4.714511e-13 ||A*x-b|| = 3.141853e-14 GMRESB took 20 iterations GMRESB residual error history: 1 2.100000e+01 2 9.391486e+00 3 5.612486e+00 4 3.834058e+00 5 2.831639e+00 6 2.201398e+00 7 1.774824e+00 8 1.470294e+00 9 1.243933e+00 10 1.070259e+00 11 9.335639e-01 12 8.236878e-01 13 7.337994e-01 14 6.591531e-01 15 5.963599e-01 16 5.429421e-01 17 4.970501e-01 18 4.572787e-01 19 4.225429e-01 20 3.919930e-01 21 3.141853e-14 Before GMRESB: ||X_ERROR|| = 5.186616e+01 ||A*x-b|| = 2.053646e+01 After GMRESB: ||X_ERROR|| = 2.129967e-13 ||A*x-b|| = 5.716344e-14 GMRESB took 20 iterations GMRESB residual error history: 1 2.053646e+01 2 9.308366e+00 3 5.652927e+00 4 3.808888e+00 5 2.781111e+00 6 2.162812e+00 7 1.751397e+00 8 1.458369e+00 9 1.229879e+00 10 1.051858e+00 11 9.081145e-01 12 7.952485e-01 13 7.028946e-01 14 6.287763e-01 15 5.705448e-01 16 5.221137e-01 17 4.775791e-01 18 4.381549e-01 19 4.051606e-01 20 3.784737e-01 21 4.626880e-14 nsol_test(): nsol() solves a system of nonlinear equations. Test it on the Chandrasekhar function. Error flag IERR = 0 Residual norm: 0.000002 it_hist = 0.4524 0.0669 0.0012 0.0000 nsola_test(): nsola() solves a system of nonlinear equations using an inexact Newton-Armijo iteration. Test it on the Chandrasekhar function. nsola: Armijo failure, too many reductions 0 0.3233 0 0 0 Error flag IERR = 2 Residual norm: 3.233167 it_hist = 0.3233 0 0 0 0 0 nsolgm_test(): nsolgm() solves a system of nonlinear equations using an inexact Newton-GMRES iteration. Test it on the Chandrasekhar function. 1.0000 0.3233 0 1.0000 2.0000 0.3233 0 1.0000 3.0000 0.3233 0 1.0000 4.0000 0.3233 0 1.0000 5.0000 0.3233 0 1.0000 6.0000 0.3233 0 1.0000 7.0000 0.3233 0 1.0000 8.0000 0.3233 0 1.0000 9.0000 0.3233 0 1.0000 10.0000 0.3233 0 1.0000 0 0.3233 0 0 1.0000 0.3233 0 1.0000 2.0000 0.3233 0 1.0000 3.0000 0.3233 0 1.0000 4.0000 0.3233 0 1.0000 5.0000 0.3233 0 1.0000 6.0000 0.3233 0 1.0000 7.0000 0.3233 0 1.0000 8.0000 0.3233 0 1.0000 9.0000 0.3233 0 1.0000 10.0000 0.3233 0 1.0000 Error flag IERR = 1 Residual norm: 3.233167 it_hist = 0.3233 0 0.3233 2.0000 0.3233 3.0000 0.3233 4.0000 0.3233 5.0000 0.3233 6.0000 0.3233 7.0000 0.3233 8.0000 0.3233 9.0000 0.3233 10.0000 0.3233 11.0000 pcg_test(): Test pcg() on the simple -1,2-1 matrix of order N = 20 Before PCG, ||X_ERROR|| = 5.357238e+01 Before PCG, ||A*x-b|| = 2.100000e+01 After PCG, ||X_ERROR|| = 2.670104e-14 After PCG, ||A*x-b|| = 2.642354e-14 Number of iterations = 20 PCGSOL residual error history: 1 2.100000e+01 2 1.050000e+01 3 7.000000e+00 4 5.250000e+00 5 4.200000e+00 6 3.500000e+00 7 3.000000e+00 8 2.625000e+00 9 2.333333e+00 10 2.100000e+00 11 1.909091e+00 12 1.750000e+00 13 1.615385e+00 14 1.500000e+00 15 1.400000e+00 16 1.312500e+00 17 1.235294e+00 18 1.166667e+00 19 1.105263e+00 20 1.050000e+00 21 2.098073e-15 Before PCG, ||X_ERROR|| = 5.164259e+01 Before PCG, ||A*x-b|| = 2.053750e+01 After PCG, ||X_ERROR|| = 4.923836e-14 After PCG, ||A*x-b|| = 1.849913e-14 Number of iterations = 20 PCGSOL residual error history: 1 2.053750e+01 2 1.027287e+01 3 6.740227e+00 4 5.021014e+00 5 4.145164e+00 6 3.481219e+00 7 2.922991e+00 8 2.533089e+00 9 2.260550e+00 10 2.000106e+00 11 1.789801e+00 12 1.653485e+00 13 1.546219e+00 14 1.439269e+00 15 1.310505e+00 16 1.239617e+00 17 1.147202e+00 18 1.086939e+00 19 1.027482e+00 20 1.133137e+00 21 7.553343e-15 sintv_test(): sintv() applies a sine transform to a data matrix U whose first dimension is of the form 2^k-1. isintv() inverts a sine transform. Original data U:\n Z = sintv ( U ):\n U2 = isintv ( Z ):\n tfqmr_test(): Test tfqmr() on the simple -1,2-1 matrix of order N = 20 Before TFQMR ||X_ERROR|| = 5.357238e+01 ||A*x-b|| = 2.100000e+01 After TFQMR ||X_ERROR|| = 8.983893e-15 ||A*x-b|| = 1.639676e-14 TFQMR took 20 iterations TFQMR residual error history: 1 2.100000e+01 2 5.824352e+00 3 2.757435e+00 4 1.610626e+00 5 1.056625e+00 6 7.466740e-01 7 5.557189e-01 8 4.297364e-01 9 3.422448e-01 10 2.790097e-01 11 2.299639e-01 12 1.872382e-01 13 1.515891e-01 14 1.224511e-01 15 9.877708e-02 16 7.947142e-02 17 6.354826e-02 18 5.014145e-02 19 3.840151e-02 20 2.703330e-02 21 2.425658e-15 Before TFQMR ||X_ERROR|| = 5.145017e+01 ||A*x-b|| = 1.963856e+01 After TFQMR ||X_ERROR|| = 1.755592e-14 ||A*x-b|| = 2.436149e-14 TFQMR took 20 iterations TFQMR residual error history: 1 1.963856e+01 2 5.673455e+00 3 2.856011e+00 4 1.668887e+00 5 1.103037e+00 6 7.521313e-01 7 5.227031e-01 8 3.942465e-01 9 3.143512e-01 10 2.624720e-01 11 2.264834e-01 12 1.991421e-01 13 1.755009e-01 14 1.555167e-01 15 1.327342e-01 16 1.037893e-01 17 8.133320e-02 18 6.268395e-02 19 4.636377e-02 20 3.220007e-02 21 1.240252e-15 kelley_test(): Normal end of execution. 07-Jan-2022 22:37:02