xref: /petsc/src/ksp/ksp/impls/cg/nash/nashimpl.h (revision 2205254efee3a00a594e5e2a3a70f74dcb40bc03)
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 during the first iteration,    */
6 /* then it is a preconditioned gradient direction and we follow it to the    */
7 /* boundary of the trust region.  If a direction of negative curvature is    */
8 /* encountered on subsequent iterations, then we terminate the algorithm.    */
9 /*                                                                           */
10 /* This method is described in:                                              */
11 /*   S. Nash, "Newton-type Minimization via the Lanczos Method", SIAM        */
12 /*     Journal on Numerical Analysis, 21, pages 553-572, 1984.               */
13 /*****************************************************************************/
14 
15 #if !defined(__NASH)
16 #define __NASH
17 
18 typedef struct {
19   PetscReal radius;
20   PetscReal norm_d;
21   PetscReal o_fcn;
22   PetscInt  dtype;
23 } KSP_NASH;
24 
25 #endif
26 
27