[Trilinos-Users] AztecOO residual vector

Heroux, Michael A maherou at sandia.gov
Tue Feb 2 10:01:03 EST 2016


Danielle,

One thing to note is that GMRES solvers do not generate an update to the solution or residual vector at each iteration.  Algorithmically there is scalar value that in exact arithmetic represents the norm of the residual at each iteration, which is what we track for monitoring convergence, but it is not efficient to compute the residual until after the solution vector is updated at the end of the Arnoldi process.

Asking for anything but the estimated residual value from GMRES at each iteration is prohibitively expensive.

Mike

From: Trilinos-Users <trilinos-users-bounces at trilinos.org<mailto:trilinos-users-bounces at trilinos.org>> on behalf of Duk-Soon Oh <duksoon at cims.nyu.edu<mailto:duksoon at cims.nyu.edu>>
Date: Tuesday, February 2, 2016 at 3:00 AM
To: Danielle Catherine Maddix <dcmaddix at stanford.edu<mailto:dcmaddix at stanford.edu>>
Cc: Trilinos Users <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: [EXTERNAL] Re: [Trilinos-Users] AztecOO residual vector

Hi,

I just used my custom AztecOO_StatusTest object based on the AztecOO_StatusTestResNorm object. At that time, I had to access the intermediate vectors to debug my custom preconditioner object. I think you can just add few lines in the CheckStatus method.

Best,

Duk-Soon


On Mon, Feb 1, 2016 at 4:31 PM, Danielle Catherine Maddix <dcmaddix at stanford.edu<mailto:dcmaddix at stanford.edu>> wrote:

I got the initialization working AztecOO_StatusTestResNorm restartResNorm(*Trilinos::K, *Trilinos::X,

(Epetra_Vector&) Trilinos::F[0], tol);

restartResNorm.DefineResForm(AztecOO_StatusTestResNorm::Implicit,

AztecOO_StatusTestResNorm::TwoNorm);

Solver.SetStatusTest(&restartResNorm);


I am unclear on how to get the intermediate norms though because it only returns the final one on the last call to check status.

double  GetResNormValue<https://trilinos.org/docs/r8.0/packages/aztecoo/doc/html/classAztecOO__StatusTestResNorm.html#d1c5d2fed099c119384bd7c7dc21649f> () const
        Returns the residual norm value, [$ \|r\| $] , computed in most recent call to CheckStatus.

How do we call checkStatus within the status = Solver.Iterate(numMaxIterations, tol); the inner iteration loops.
Any example of pseudocode would be helpful.

Thanks,
Danielle


________________________________
From: Duk-Soon Oh <duksoon at cims.nyu.edu<mailto:duksoon at cims.nyu.edu>>
Sent: Sunday, January 31, 2016 2:03 PM
To: Danielle Catherine Maddix
Subject: Re: [Trilinos-Users] AztecOO residual vector

Hi,

I had a similar issue previously. Please take a look at the AztecOO_StatusTest object. You may need to define your own AztecOO_StatusTest object to access the intermediate residual vectors. I hope it would be helpful.

Best,

Duk-Soon


On Sun, Jan 31, 2016 at 11:31 AM, Danielle Catherine Maddix <dcmaddix at stanford.edu<mailto:dcmaddix at stanford.edu>> wrote:

Hello,


I was wondering if it would be possible to access the residual vector at each iteration of the AztecOO linear solver.  I know that it returns the final residual.  I want to pass back to our in house finite element code the ratio of the final residual and the residual at the beginning of the last restart iteration in gmres.


Thank you,

Danielle Maddix

_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at trilinos.org<mailto:Trilinos-Users at trilinos.org>
https://trilinos.org/mailman/listinfo/trilinos-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160202/11245ae3/attachment-0001.html>


More information about the Trilinos-Users mailing list