Actual source code: linearp.h
slepc-3.11.2 2019-07-30
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-2019, Universitat Politecnica de Valencia, Spain
6: This file is part of SLEPc.
7: SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9: */
10: /*
11: Private header for PEPLINEAR
12: */
14: #if !defined(SLEPC_LINEAR_H)
15: #define SLEPC_LINEAR_H
17: typedef struct {
18: PetscBool explicitmatrix;
19: PEP pep;
20: PetscReal sfactor,dsfactor; /* scaling factors */
21: Mat A,B; /* matrices of generalized eigenproblem */
22: EPS eps; /* linear eigensolver for Az=lBz */
23: PetscBool usereps; /* eps provided by user */
24: Mat M,C,K; /* copy of PEP coefficient matrices */
25: Vec w[6]; /* work vectors */
26: PetscReal alpha,beta; /* coefficients defining the linearization */
27: PetscBool setfromoptionscalled;
28: } PEP_LINEAR;
30: /* General case for implicit matrices of degree d */
31: SLEPC_INTERN PetscErrorCode MatMult_Linear(Mat,Vec,Vec);
33: /* N */
34: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_NA(MPI_Comm,PEP_LINEAR*,Mat*);
35: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_NB(MPI_Comm,PEP_LINEAR*,Mat*);
37: /* S */
38: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_SA(MPI_Comm,PEP_LINEAR*,Mat*);
39: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_SB(MPI_Comm,PEP_LINEAR*,Mat*);
41: /* H */
42: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_HA(MPI_Comm,PEP_LINEAR*,Mat*);
43: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_HB(MPI_Comm,PEP_LINEAR*,Mat*);
45: #endif