KSPMonitorDynamicTolerance#
Recompute the inner tolerance in every outer iteration in an adaptive way.
Synopsis#
#include "petscksp.h"
PetscErrorCode KSPMonitorDynamicTolerance(KSP ksp, PetscInt its, PetscReal fnorm, void *dummy)
Collective
Input Parameters#
ksp - iterative context
n - iteration number (not used)
fnorm - the current residual norm
dummy - some context as a C struct. fields: coef: a scaling coefficient. default 1.0. can be passed through -sub_ksp_dynamic_tolerance_param bnrm: norm of the right-hand side. store it to avoid repeated calculation
Notes#
This may be useful for a flexibly preconditioner Krylov method to control the accuracy of the inner solves needed to guarantee the 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.
See Also#
KSPMonitorDynamicToleranceDestroy()
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