QPSConvergedDefault

Determines convergence of the QPS iterative solvers (default code).

Synopsis

PetscErrorCode QPSConvergedDefault(QPS qps,QP qp,PetscInt i,PetscReal rnorm,KSPConvergedReason *reason,void *ctx)
Collective on QPS

Input Parameters

qps - iterative context
i - iteration number
rnorm - 2-norm residual value (may be estimated)

Reason is set to

positive - if the iteration has converged;
negative - if residual norm exceeds divergence threshold;
0 - otherwise.

Notes

QPSConvergedDefault() reaches convergence when
     rnorm < MAX (rtol * rnorm_0, abstol);
Divergence is detected if
     rnorm > dtol * rnorm_0,
where
rtol - relative tolerance,
abstol - absolute tolerance,
dtol - divergence tolerance,
rnorm_0 - the 2-norm of the right hand side. Use QPSSetTolerances() to alter the defaults for rtol, abstol, dtol.

The precise values of reason are macros such as KSP_CONVERGED_RTOL, which are defined in petscksp.h.

Keywords

QPS, default, convergence, residual

See Also

QPSSetConvergenceTest(), QPSSetTolerances(), QPSConvergedSkip(), KSPConvergedReason, QPSGetConvergedReason(),
QPSConvergedDefaultCreate(), QPSConvergedDefaultDestroy()

Level:intermediate
Location:
src/qps/interface/qps.c
Index of all QPS routines
Table of Contents for all manual pages
Index of all manual pages