Actual source code: chebyshevimpl.h
1: /*
2: Private data structure for Chebyshev Iteration
3: */
5: #ifndef PETSC_CHEBYSHEVIMPL_H
6: #define PETSC_CHEBYSHEVIMPL_H
8: #include <petsc/private/kspimpl.h>
10: typedef struct {
11: PetscReal emin, emax; /* store user provided estimates of extreme eigenvalues or computed with kspest and transformed with tform[] */
12: PetscReal emin_computed, emax_computed; /* eigenvalues as computed by kspest, if computed */
13: PetscReal emin_provided, emax_provided; /* provided by PCGAMG; discarded unless preconditioned by Jacobi */
14: PetscReal *betas; /* store beta coefficients for 4th-kind Chebyshev smoother */
15: PetscInt num_betas_alloc;
17: KSP kspest; /* KSP used to estimate eigenvalues */
18: PetscReal tform[4]; /* transform from Krylov estimates to Chebyshev bounds */
19: PetscInt eststeps; /* number of kspest steps in KSP used to estimate eigenvalues */
20: PetscBool usenoisy; /* use noisy right hand side vector to estimate eigenvalues */
21: KSPChebyshevKind chebykind;
22: /* For tracking when to update the eigenvalue estimates */
23: PetscObjectId amatid, pmatid;
24: PetscObjectState amatstate, pmatstate;
25: } KSP_Chebyshev;
27: /* given the polynomial order, return tabulated beta coefficients for use in opt. 4th-kind Chebyshev smoother */
28: PETSC_INTERN PetscErrorCode KSPChebyshevGetBetas_Private(KSP);
30: #endif // PETSC_CHEBYSHEVIMPL_H