KSPCGSetRadius#
Sets the trust-region radius for a conjugate gradient solver
Synopsis#
#include "petscksp.h"
PetscErrorCode KSPCGSetRadius(KSP ksp, PetscReal radius)
Logically Collective
Input Parameters#
ksp - the iterative context
radius - the nonnegative trust-region radius (0, the default, disables the constraint)
Options Database Key#
-ksp_cg_radius radius - trust-region radius
Notes#
Supported by KSPCG, KSPSTCG, KSPNASH, and KSPGLTR.
KSPCG and KSPSTCG truncate steps at the boundary using the norm selected by KSPCGSetTRNormType().
An active radius also causes them to take a boundary step at the first nonpositive curvature direction.
The convergence reason is KSP_CONVERGED_STEP_LENGTH, or KSP_CONVERGED_NEG_CURVE if KSPSetConvergedNegativeCurvature() is enabled.
A nonzero initial guess must satisfy the constraint.
See Also#
KSP: Linear System Solvers, KSP, KSPCG, KSPNASH, KSPSTCG, KSPGLTR, SNESNEWTONTR
Level#
advanced
Location#
Examples#
Implementations#
KSPCGSetRadius_CG() in src/ksp/ksp/impls/cg/cg.c
KSPCGSetRadius_GLTR() in src/ksp/ksp/impls/cg/gltr/gltr.c
KSPCGSetRadius_NASH() in src/ksp/ksp/impls/cg/nash/nash.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages