[petsc-users] KSPBuildResidual in ex42.c

Klaij, Christiaan C.Klaij at marin.nl
Wed May 23 06:08:44 CDT 2012


> > Yes, only the norms. As I understand now, GMRES will compute the
> > norm of the total system residual [U,V,W,P], but I would like the
> > norms of [U], [V], [W] and [P] residuals separated. Based on
> > ex42, I got the impression that I have to use KSPBuildResidual.
> >
>
> Yes, the cost of building the residual (check -log_summary to see how big
> it is) is a reason why people often avoid GMRES if they need the full
> residual. It's directly available with GCR, for example (which is otherwise
> similar in work to FGMRES) and with most of the non-residual-minimizing
> methods.

I find GCR to be less robust than FGMRES, but ok, suppose I switch
to GCR, how would I get the residual vector?


dr. ir. Christiaan Klaij
CFD Researcher
Research & Development
E mailto:C.Klaij at marin.nl
T +31 317 49 33 44

MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl



More information about the petsc-users mailing list