Actual source code: ngmresimpl.h

  2: /*  
  3:     Private Krylov Context Structure (KSP) for the Anderson mixing method aka nonlinear Krylov applied to a linear equation

  5: */


 10: /*
 11:         Defines the basic KSP object
 12: */
 13: #include <private/kspimpl.h>

 15: typedef struct {
 16:   /* the coefficient matrix and orthogonalization information Hh holds the coefficient matrix */
 17:   PetscScalar *hh_origin;
 18:   PetscScalar *orthogwork; /*holds dot products computed in orthogonalization */
 19:   Vec       *v,*w,*q;
 20:   PetscReal *f2;     /* 2-norms of function (residual) at each stage */
 21:   PetscInt  msize;   /* maximum size of space */
 22:   PetscInt  csize;   /* current size of space */
 23:   PetscScalar beta; /* relaxation parameter */
 24:   PetscScalar *nrs;            /* temp that holds the coefficients of the Krylov vectors that form the minimum residual solution */
 25: } KSP_NGMRES;

 27: #define HH(a,b)  (ngmres->hh_origin + (a)*(ngmres->msize)+(b))

 29: #endif