KSPSolve

Solves linear system; call it after calling KSPCreate(), KSPSetup(), and KSPSet*().

Synopsis

int KSPSolve(KSP ksp, int *its) 
Collective on KSP

Input Parameter

ksp -iterative context obtained from KSPCreate()

Output Parameter

its -number of iterations required

Notes

On return, the parameter "its" contains either the iterationnumber at which convergence was successfully reached, or thenegative of the iteration at which divergence or breakdown was detected.

If using a direct method (e.g., via the KSP solverKSPPREONLY and a preconditioner such as PCLU/PCILU), then its=1. See KSPSetTolerances() and KSPDefaultConverged() for more details.

Understanding Convergence

The routines KSPSetMonitor(), KSPComputeEigenvalues(), andKSPComputeEigenvaluesExplicitly() provide information on additionaloptions to monitor convergence and print eigenvalue information.

Keywords

KSP, solve, linear system

See Also

KSPCreate(), KSPSetUp(), KSPDestroy(), KSPSetTolerances(), KSPDefaultConverged()

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