KSPConvergedRateView#
Displays the convergence rate https://en.wikipedia.org/wiki/Coefficient_of_determination of KSPSolve()
to a viewer
Synopsis#
#include "petscksp.h"
#include "petscmat.h"
PetscErrorCode KSPConvergedRateView(KSP ksp, PetscViewer viewer)
Collective
Input Parameters#
ksp - iterative solver obtained from
KSPCreate()
viewer - the
PetscViewer
to display the reason
Options Database Key#
-ksp_converged_rate - print reason for convergence or divergence and the convergence rate (or 0.0 for divergence)
Notes#
To change the format of the output, call PetscViewerPushFormat
(viewer
,format
) before this call.
Suppose that the residual is reduced linearly, , which means . After linear regression, the slope is . The coefficient of determination is given by ,
See Also#
KSP: Linear System Solvers, KSPConvergedReasonView()
, KSPGetConvergedRate()
, KSPSetTolerances()
, KSPConvergedDefault()
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