petsc-3.6.1 2015-08-06
Report Typos and Errors

KSPGetIterationNumber

Gets the current iteration number; if the KSPSolve() is complete, returns the number of iterations used.

Synopsis

#include "petscksp.h" 
PetscErrorCode  KSPGetIterationNumber(KSP ksp,PetscInt *its)
Not Collective

Input Parameters

ksp -the iterative context

Output Parameters

its -number of iterations

Notes

During the ith iteration this returns i-1

Keywords

KSP, get, residual norm

See Also

KSPBuildResidual(), KSPGetResidualNorm(), KSPGetTotalIterations()

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

Examples

src/ksp/pc/examples/tutorials/ex1.c.html
src/ksp/pc/examples/tutorials/ex2.c.html
src/ksp/ksp/examples/tutorials/ex1.c.html
src/ksp/ksp/examples/tutorials/ex2.c.html
src/ksp/ksp/examples/tutorials/ex3.c.html
src/ksp/ksp/examples/tutorials/ex5.c.html
src/ksp/ksp/examples/tutorials/ex7.c.html
src/ksp/ksp/examples/tutorials/ex9.c.html
src/ksp/ksp/examples/tutorials/ex10.c.html
src/ksp/ksp/examples/tutorials/ex11.c.html
src/ksp/ksp/examples/tutorials/ex12.c.html