GMRES residual jumps up for the last few iterations

4 Ansichten (letzte 30 Tage)
Herwig Peters
Herwig Peters am 30 Aug. 2011
Hi,
I'm solving the system Ax=b using GMRES. I use block-diagonal preconditioning, which makes a lot of sense in my case because there is a finite element block and a boundary element block in that matrix A.
The GMRES solution is correct: For smaller systems I have compared against the solution from mldivide. For bigger systems I have compared against results using other software.
But I do get a little confused when I look at the residual after GMRES has solved the system. For the last few iterations the residual suddenly increases before the GMRES solver stops. This behaviour is independent of system size. A screenshot can be found at http://www.varg.unsw.edu.au/Assets/Images/helloworld/GMRESres.png
So, the question is, why does the residual do that?
Cheers Herwig

Akzeptierte Antwort

Lucas García
Lucas García am 30 Aug. 2011
What syntax are you using?
[x,flag,relres,iter] = gmres(A,b,restart,tol,maxit);
What are the values for restart, tol and maxit?
What is the value for flag after the execution?
Not knowing more about the details of your problem, I would assume that it has to do with the values you give to restart and tol. Maybe if restart is too big, you cannot guarantee convergence.
  3 Kommentare
Lucas García
Lucas García am 30 Aug. 2011
Is your input tolerance smaller than eps*cond(A)?
There it can stagnate and you will have to use a greater tolerance.
Herwig Peters
Herwig Peters am 30 Aug. 2011
GMRES does sometimes give a warning that eps*cond(A) might be greater than input tolerance.
Changing the value of restart did help. For example, if I set restart=650, GMRES will eventually converge.
I use the solver to solve the system Ax=b in a loop (frequency sweep) with changing condition numbers for A every time I solve the system. Is there a smarter way letting GMRES converge without me adjusting values for restart and tol manually every time?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by