Date: 2021-03-03T22:27:22+00:00

Actual source code: cgimpl.h
petsc-3.14.5 2021-03-03
Report Typos and Errors

      2: /*
      3:     Private Krylov Context Structure (KSP) for Conjugate Gradient

      5:     This one is very simple. It contains a flag indicating the symmetry
      6:    structure of the matrix and work space for (optionally) computing
      7:    eigenvalues.

      9: */

     14: /*
     15:         Defines the basic KSP object
     16: */
     17: #include <petsc/private/kspimpl.h>

     19: PETSC_INTERN PetscErrorCode KSPDestroy_CG(KSP);
     20: PETSC_INTERN PetscErrorCode KSPReset_CG(KSP);
     21: PETSC_INTERN PetscErrorCode KSPView_CG(KSP,PetscViewer);
     22: PETSC_INTERN PetscErrorCode KSPSetFromOptions_CG(PetscOptionItems *PetscOptionsObject,KSP);
     23: PETSC_INTERN PetscErrorCode KSPCGSetType_CG(KSP,KSPCGType);

     25: /*
     26:     The field should remain the same since it is shared by the BiCG code
     27: */

     29: typedef struct {
     30:   KSPCGType   type;                 /* type of system (symmetric or Hermitian) */
     31:   PetscScalar emin,emax;           /* eigenvalues */
     32:   PetscInt    ned;                 /* size of following arrays */
     33:   PetscScalar *e,*d;
     34:   PetscReal   *ee,*dd;             /* work space for Lanczos algorithm */

     36:   PetscBool singlereduction;          /* use variant of CG that combines both inner products */
     37: } KSP_CG;

     39: #endif