TT-Toolbox icon indicating copy to clipboard operation
TT-Toolbox copied to clipboard

fgmres yielded Ax != b

Open raavimohindar opened this issue 1 year ago • 1 comments

Tested the fgmres with an input from pardiso solver as

A = [7.0+1.0i 0 1.0+1.0i 0 0 2.0+1.0i 7.0+1.0i 0; 0 -4.0+0.0i 8.0+1.0i 0 2.0+1.0i 0 0 0; 0 0 1.0+1.0i 0 0 0 0 5.0+1.0i; 0 0 0 7.0+0.0i 0 0 9.0+1.0i 0; 0 -4.0+1.0i 0 0 0 0 0 0; 0 0 7.0+1.0i 0 0 3.0+1.0i 0 8.0+0.0i; 0 1.0+1.0i 0 0 0 0 11.0+1.0i 0; 0 0 -3.0+1.0i 0 0 0 2.0+1.0i 5.0+0.0i];

b = ones(8,1)+ones(8,1)*i;

x = fgmres(A, b)

x_test = A \ b

yielded,

Ax != b

and

A*x_test = b

May I know whether I have missed passing any more required arguments or is my setup deficient for the correct solution?

raavimohindar avatar Jul 22 '24 09:07 raavimohindar

Which fgmres are you using? That in TT-Toolbox/solve wouldn't run at all like this, it needs a stopping tol in the third argument. Now that given, you can only assume Ax to be within a O(tol) vicinity of b, not necessarily Ax==b.

dolgov avatar Jul 25 '24 08:07 dolgov