KSPResidual

Computes the residual.

Synopsis

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

Location: src/ksp/interface/itres.c
KSP Index
Table of Contents