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