Actual source code: bcgslimpl.h
petsc-3.8.4 2018-03-24
1: /*
2: Private data structure for BiCGStab(L) solver.
3: Allocation takes place before each solve.
4: */
7: #include <petscsys.h>
9: typedef struct {
10: PetscInt ell; /* Number of search directions. */
11: PetscReal delta; /* Threshold for recomputing exact residual norm */
12: PetscBool bConvex; /* Compute Enhanced BiCGstab polynomial when set to PETSC_TRUE */
13: PetscBool pinv; /* Use pseudoinverse to calculate polynomial correction when set
14: to PETSC_TRUE */
16: /* Workspace Vectors */
17: Vec vB;
18: Vec vRt;
19: Vec vXr;
20: Vec vTm;
21: Vec *vvR;
22: Vec *vvU;
24: /* Workspace Arrays */
25: PetscScalar *vY0c, *vYlc, *vYtc;
26: PetscScalar *mZa, *mZb;
27: PetscScalar *u, *v, *work;
28: PetscReal *s, *realwork;
29: PetscBLASInt lwork;
30: } KSP_BCGSL;
32: /* predefined shorthands */
33: #define VX (ksp->vec_sol)
34: #define VB (bcgsl->vB)
35: #define VRT (bcgsl->vRt)
36: #define VXR (bcgsl->vXr)
37: #define VTM (bcgsl->vTm)
38: #define VVR (bcgsl->vvR)
39: #define VVU (bcgsl->vvU)
40: #define AY0c (bcgsl->vY0c)
41: #define AYtc (bcgsl->vYtc)
42: #define AYlc (bcgsl->vYlc)
43: #define MZa (bcgsl->mZa)
44: #define MZb (bcgsl->mZb)
46: #endif