petsc-3.14.6 2021-03-30
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

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/ex1.c.html
src/ksp/ksp/tutorials/ex2.c.html
src/ksp/ksp/tutorials/ex3.c.html
src/ksp/ksp/tutorials/ex4.c.html
src/ksp/ksp/tutorials/ex5.c.html
src/ksp/ksp/tutorials/ex6.c.html
src/ksp/ksp/tutorials/ex7.c.html
src/ksp/ksp/tutorials/ex9.c.html

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