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

See Also#

KSPBuildResidual(), KSPGetResidualNorm(), KSPGetTotalIterations()

Level#

intermediate

Location#

src/ksp/ksp/interface/iterativ.c

Examples#

src/ksp/pc/tutorials/ex1.c.html
src/ksp/pc/tutorials/ex2.c.html
src/ksp/pc/tutorials/ex3.c.html
src/ksp/ksp/tutorials/ex11.c.html
src/ksp/ksp/tutorials/ex11f.F90.html
src/ksp/ksp/tutorials/ex12.c.html
src/ksp/ksp/tutorials/ex14f.F90.html
src/ksp/ksp/tutorials/ex15.c.html
src/ksp/ksp/tutorials/ex15f.F90.html
src/ksp/ksp/tutorials/ex16.c.html
src/ksp/ksp/tutorials/ex18.c.html


Edit on GitLab

Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages