KSPResidual

Computes the residual.

Synopsis

#include "petscksp.h" 
int KSPResidual(KSP ksp,Vec vsoln,Vec vt1,Vec vt2,Vec vres,Vec vbinvf,Vec vb)
Collective on KSP

Input Parameters

vsoln - solution to use in computing residual
vt1, vt2 - temporary work vectors
vres - calculated residual
vbinvf - the result of binv^{-1} b. If null, don't do it.
vb - right-hand-side vector

Notes

This routine assumes that an iterative method, designed for
    A x = b
will be used with a preconditioner, C, such that the actual problem is
    M u = f    
where M = AC (right preconditioning) or CA (left preconditioning).

Keywords

KSP, residual

See Also

KSPMonitor()

Level:intermediate
Location:
src/sles/ksp/interface/itres.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages