30-Dec-2022 14:53:38 kelley_test(): MATLAB/Octave version 4.2.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|| = 7.923298e-09 ||A*x-b|| = 2.609459e-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.609460e-10 Before BICGSTAB: ||X_ERROR|| = 5.147202e+01 ||A*x-b|| = 1.979262e+01 After BICGSTAB: ||X_ERROR|| = 2.721329e-09 ||A*x-b|| = 8.332271e-11 Number of iterations: 20 Residual error history: 1 1.979262e+01 2 5.754523e+00 3 3.197383e+00 4 2.165469e+00 5 1.583423e+00 6 1.236526e+00 7 9.996686e-01 8 8.416250e-01 9 7.156998e-01 10 6.203870e-01 11 5.483587e-01 12 4.906138e-01 13 4.409265e-01 14 3.947706e-01 15 3.498752e-01 16 2.966939e-01 17 2.372170e-01 18 1.691964e-01 19 1.065871e-01 20 4.916103e-02 21 8.332250e-11 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 6: 3.2332e-01 1.3328e-01 1.2772e-02 4.3782e-03 9.2967e-04 4.7066e-04 Columns 7 through 9: 1.8887e-05 9.8840e-06 6.9799e-07 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.32332 0.00000 0.00000 0.13328 2.00000 0.00000 0.01277 3.00000 0.00000 0.00438 4.00000 0.00000 0.00093 5.00000 0.00000 0.00047 6.00000 0.00000 0.00002 7.00000 0.00000 0.00001 8.00000 0.00000 0.00000 9.00000 0.00000 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.090671e-14 |A*x-b| = 1.886889e-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 3.235376e-15 Before CG: |X_ERROR| = 5.161255e+01 |A*x-b| = 2.011030e+01 After CG: |X_ERROR| = 1.396765e-14 |A*x-b| = 1.868080e-14 Number of iterations: 21 Residual error history: 1 2.011030e+01 2 1.021561e+01 3 6.690763e+00 4 5.088626e+00 5 4.090177e+00 6 3.415686e+00 7 2.885573e+00 8 2.596665e+00 9 2.283207e+00 10 2.030986e+00 11 1.796881e+00 12 1.617290e+00 13 1.487347e+00 14 1.415566e+00 15 1.336140e+00 16 1.234558e+00 17 1.147750e+00 18 1.085279e+00 19 1.089871e+00 20 1.095174e+00 21 4.084655e-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.36620 -3.18310 10.00000 4.47214 8.94427 0.00000 0.00000 0.00000 1.00000 The estimated jacobian J2(X): jac2 = 6.36620 -3.18310 10.00000 4.47214 8.94427 0.00000 0.00000 0.00000 1.00000 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| = 3.423954e-14 |A*x-b| = 6.385472e-15 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.127898e+01 |A*x-b| = 2.081592e+01 After GMRES: |X_ERROR| = 8.366103e-14 |A*x-b| = 4.364970e-14 GMRES took 20 iterations GMRES residual error history: 1 2.081592e+01 2 9.354738e+00 3 5.584879e+00 4 3.811873e+00 5 2.780090e+00 6 2.133590e+00 7 1.736524e+00 8 1.441670e+00 9 1.217687e+00 10 1.045265e+00 11 8.973828e-01 12 7.851341e-01 13 6.952345e-01 14 6.209990e-01 15 5.638585e-01 16 5.151692e-01 17 4.712481e-01 18 4.323159e-01 19 3.998463e-01 20 3.740016e-01 21 9.843680e-30 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| = 8.855266e-14 |A*x-b| = 7.559926e-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 7.744138e-14 Before GMRESA: |X_ERROR| = 5.169724e+01 |A*x-b| = 2.127217e+01 After GMRESA: |X_ERROR| = 2.042281e-13 |A*x-b| = 1.093463e-13 GMRESB took 20 iterations GMRESB residual error history: 1 2.127217e+01 2 9.025715e+00 3 5.275749e+00 4 3.621841e+00 5 2.700070e+00 6 2.133409e+00 7 1.708035e+00 8 1.422835e+00 9 1.208531e+00 10 1.036897e+00 11 9.004686e-01 12 7.890725e-01 13 7.004659e-01 14 6.301225e-01 15 5.668313e-01 16 5.175138e-01 17 4.746665e-01 18 4.372843e-01 19 4.060890e-01 20 3.773738e-01 21 1.110938e-13 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| = 8.855266e-14 |A*x-b| = 7.559926e-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 7.744138e-14 Before GMRESB: |X_ERROR| = 5.158401e+01 |A*x-b| = 2.134374e+01 After GMRESB: |X_ERROR| = 4.052740e-13 |A*x-b| = 9.967429e-14 GMRESB took 20 iterations GMRESB residual error history: 1 2.134374e+01 2 9.655888e+00 3 5.702208e+00 4 3.839351e+00 5 2.792197e+00 6 2.182167e+00 7 1.753927e+00 8 1.438330e+00 9 1.224846e+00 10 1.048274e+00 11 9.059777e-01 12 7.910581e-01 13 7.065051e-01 14 6.307435e-01 15 5.682968e-01 16 5.203091e-01 17 4.764069e-01 18 4.367915e-01 19 4.028464e-01 20 3.763984e-01 21 9.888402e-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 = 4.5239e-01 6.6935e-02 1.2205e-03 3.4965e-07 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.00000 0.32332 0.00000 0.00000 0.00000 Error flag IERR = 2 Residual norm: 3.233167 it_hist = 0.32332 0.00000 0.00000 0.00000 0.00000 0.00000 nsolgm_test(): nsolgm() solves a system of nonlinear equations using an inexact Newton-GMRES iteration. Test it on the Chandrasekhar function. 1.00000 0.32332 0.00000 1.00000 2.00000 0.32332 0.00000 1.00000 3.00000 0.32332 0.00000 1.00000 4.00000 0.32332 0.00000 1.00000 5.00000 0.32332 0.00000 1.00000 6.00000 0.32332 0.00000 1.00000 7.00000 0.32332 0.00000 1.00000 8.00000 0.32332 0.00000 1.00000 9.00000 0.32332 0.00000 1.00000 10.00000 0.32332 0.00000 1.00000 0.00000 0.32332 0.00000 0.00000 1.00000 0.32332 0.00000 1.00000 2.00000 0.32332 0.00000 1.00000 3.00000 0.32332 0.00000 1.00000 4.00000 0.32332 0.00000 1.00000 5.00000 0.32332 0.00000 1.00000 6.00000 0.32332 0.00000 1.00000 7.00000 0.32332 0.00000 1.00000 8.00000 0.32332 0.00000 1.00000 9.00000 0.32332 0.00000 1.00000 10.00000 0.32332 0.00000 1.00000 Error flag IERR = 1 Residual norm: 3.233167 it_hist = 0.32332 0.00000 0.32332 2.00000 0.32332 3.00000 0.32332 4.00000 0.32332 5.00000 0.32332 6.00000 0.32332 7.00000 0.32332 8.00000 0.32332 9.00000 0.32332 10.00000 0.32332 11.00000 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.090671e-14 After PCG, |A*x-b| = 1.886889e-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 3.235376e-15 Before PCG, |X_ERROR| = 5.170352e+01 Before PCG, |A*x-b| = 2.051865e+01 After PCG, |X_ERROR| = 1.606106e-14 After PCG, |A*x-b| = 1.769683e-14 Number of iterations = 20 PCGSOL residual error history: 1 2.051865e+01 2 1.056719e+01 3 6.727053e+00 4 5.145436e+00 5 4.136850e+00 6 3.445835e+00 7 2.999640e+00 8 2.547899e+00 9 2.315403e+00 10 2.053590e+00 11 1.752022e+00 12 1.615496e+00 13 1.554580e+00 14 1.401151e+00 15 1.345507e+00 16 1.275187e+00 17 1.207819e+00 18 1.143258e+00 19 1.048233e+00 20 1.019881e+00 21 5.409565e-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| = 9.691427e-15 |A*x-b| = 1.527757e-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.161807e+01 |A*x-b| = 2.177685e+01 After TFQMR |X_ERROR| = 4.355755e-14 |A*x-b| = 1.694579e-13 TFQMR took 20 iterations TFQMR residual error history: 1 2.177685e+01 2 5.714068e+00 3 2.637044e+00 4 1.537281e+00 5 1.029106e+00 6 7.072107e-01 7 4.992675e-01 8 3.610374e-01 9 2.730452e-01 10 2.170472e-01 11 1.781262e-01 12 1.445889e-01 13 1.159265e-01 14 9.289867e-02 15 7.629371e-02 16 6.548125e-02 17 6.156119e-02 18 6.076204e-02 19 6.065209e-02 20 6.059515e-02 21 1.691262e-13 kelley_test(): Normal end of execution. 30-Dec-2022 14:53:40