Actual source code: pipegcrimpl.h
1: #pragma once
3: #include <petsc/private/kspimpl.h>
5: typedef struct {
6: PetscInt mmax; /* The maximum number vectors of each type to store */
7: PetscInt nprealloc; /* How many vectors to preallocate */
8: PetscInt nvecs; /* How many vectors are actually stored */
9: PetscInt vecb; /* How many vectors to allocate at a time in a chunk */
10: Vec *pvecs, *svecs, *qvecs, *tvecs, **ppvecs, **psvecs, **pqvecs, **ptvecs, *qold, *pold, *sold, *told;
11: PetscInt *chunksizes; /* Chunk sizes allocated */
12: PetscInt nchunks; /* Number of chunks */
13: KSPFCDTruncationType truncstrat;
14: PetscInt n_restarts;
15: PetscScalar *dots;
16: PetscReal *etas;
17: Vec *redux;
18: PetscBool norm_breakdown; /* set if the recurred norm eta breaks down -> restart triggered */
19: PetscBool unroll_w;
20: void *modifypc_ctx; /* user defined data for the modifypc function */
21: PetscErrorCode (*modifypc)(KSP, PetscInt, PetscReal, void *); /* function to modify the preconditioner*/
22: PetscErrorCode (*modifypc_destroy)(void *); /* function to destroy the user context for the modifypc function */
23: } KSP_PIPEGCR;