KSPSTCGGetQuadratic

Gets the value of the quadratic function, evaluated at the new iterate:

Synopsis

#include "petscksp.h" 
PetscErrorCode PETSCKSP_DLLEXPORT KSPSTCGGetQuadratic(KSP ksp,PetscReal *quadratic)
q(s) = g^T * s + 0.5 * s^T * H * s

which satisfies the trust region constraint

|| s ||_M <= radius,

where

radius is the trust region radius, g is the gradient vector, and H is the Hessian matrix, M is the positive definite preconditioner matrix.

Collective on KSP

Input Parameter

ksp -the iterative context

Output Parameter

quadratic -the quadratic function evaluated at the new iterate

Level:advanced
Location:
src/ksp/ksp/impls/cg/stcg/stcg.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages