xref: /petsc/src/ksp/ksp/impls/cg/stcg/stcgimpl.h (revision d9acb416d05abeed0a33bde3a81aeb2ea0364f6a)
1 /*****************************************************************************/
2 /* Context for using preconditioned conjugate gradient method to minimized a */
3 /* quadratic function subject to a trust region constraint.  If the matrix   */
4 /* is indefinite, a direction of negative curvature may be encountered.  If  */
5 /* a direction of negative curvature is found, then we follow it to the      */
6 /* boundary of the trust region.                                             */
7 /*                                                                           */
8 /* This method is described in:                                              */
9 /*   T. Steihaug, "The Conjugate Gradient Method and Trust Regions in Large  */
10 /*     Scale Optimization", SIAM Journal on Numerical Analysis, 20,          */
11 /*     pages 626-637, 1983.                                                  */
12 /*****************************************************************************/
13 
14 #pragma once
15 
16 #include <petsc/private/kspimpl.h>
17 
18 typedef struct {
19   PetscReal radius;
20   PetscReal norm_d;
21   PetscReal o_fcn;
22   PetscInt  dtype;
23 } KSPCG_STCG;
24