KSPSetMinimumIterations — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# KSPSetMinimumIterations

Sets the minimum number of iterations to use, regardless of the tolerances

## Synopsis

    #include "petscksp.h"
    #include "petscmat.h"
    PetscErrorCode KSPSetMinimumIterations(KSP ksp, PetscInt minit)

Logically Collective

## Input Parameters

- ksp - the Krylov subspace context

- minit - minimum number of iterations to use

## Options Database Key

- -ksp_min_it minit - Sets `minit`

## Notes

Use `KSPSetTolerances()` to set a variety of other tolerances

See `KSPConvergedDefault()` for details on how these parameters are used in the default convergence test. See also `KSPSetConvergenceTest()` for setting user-defined stopping criteria.

If the initial residual norm is small enough solvers may return immediately without computing any improvement to the solution. Using this routine prevents that which usually ensures the solution is changed (often minimally) from the previous solution. This option may be used with ODE integrators to ensure the integrator does not fall into a false steady-state solution of the ODE.

## See Also

KSP: Linear System Solvers, `KSPGetTolerances()`, `KSPConvergedDefault()`, `KSPSetConvergenceTest()`, `KSP`, `KSPSetTolerances()`, `KSPGetMinimumIterations()`

## Level

intermediate

## Location

src/ksp/ksp/interface/itfunc.c

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