KSPMonitorDynamicTolerance#

A monitor that changes the inner tolerance of nested preconditioners in every outer iteration in an adaptive way.

Synopsis#

#include "petscksp.h" 
PetscErrorCode KSPMonitorDynamicTolerance(KSP ksp, PetscInt its, PetscReal fnorm, void *ctx)

Collective

Input Parameters#

  • ksp - iterative context

  • its - iteration number (not used)

  • fnorm - the current residual norm

  • ctx - context used by monitor

Options Database Key#

  • -sub_ksp_dynamic_tolerance - coefficient of dynamic tolerance for inner solver, default is 1.0

Notes#

Applies for PCKSP, PCBJACOBI, and PCDEFLATION preconditioners

This may be useful for a flexible preconditioned Krylov method, such as KSPFGMRES, Flexible Krylov Methods to control the accuracy of the inner solves needed to guarantee convergence of the outer iterations.

This is not called directly by users, rather one calls KSPMonitorSet(), with this function as an argument, to cause the monitor to be used during the KSP solve.

Use KSPMonitorDynamicToleranceCreate() and KSPMonitorDynamicToleranceSetCoefficient() to create the context needed by this monitor function.

Pass the context and KSPMonitorDynamicToleranceDestroy() to KSPMonitorSet()

See Also#

Flexible Krylov Methods, KSP, KSPMonitorDynamicToleranceCreate(), KSPMonitorDynamicToleranceDestroy(), KSPMonitorDynamicToleranceSetCoefficient()

Level#

advanced

Location#

src/ksp/ksp/interface/iterativ.c


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