Actual source code: nashimpl.h
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: /*****************************************************************************/
15: #ifndef PETSC_CG_NASHIMPL_H
16: #define PETSC_CG_NASHIMPL_H
18: #include <petsc/private/kspimpl.h>
20: typedef struct {
21: PetscReal radius;
22: PetscReal norm_d;
23: PetscReal o_fcn;
24: PetscInt dtype;
25: } KSPCG_NASH;
27: #endif // PETSC_CG_NASHIMPL_H