Actual source code: linear.h

slepc-3.21.1 2024-04-26
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-, 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: #pragma once

 16: typedef struct {
 17:   PetscBool  explicitmatrix;
 18:   PEP        pep;
 19:   PetscReal  sfactor,dsfactor; /* scaling factors */
 20:   Mat        A,B;              /* matrices of generalized eigenproblem */
 21:   EPS        eps;              /* linear eigensolver for Az=lBz */
 22:   PetscBool  usereps;          /* eps provided by user */
 23:   Mat        M,C,K;            /* copy of PEP coefficient matrices */
 24:   Vec        w[6];             /* work vectors */
 25:   PetscReal  alpha,beta;       /* coefficients defining the linearization */
 26:   PetscBool  setfromoptionscalled;
 27: } PEP_LINEAR;

 29: /* General case for implicit matrices of degree d */
 30: SLEPC_INTERN PetscErrorCode MatMult_Linear(Mat,Vec,Vec);

 32: /* N */
 33: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_NA(MPI_Comm,PEP_LINEAR*,Mat*);
 34: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_NB(MPI_Comm,PEP_LINEAR*,Mat*);

 36: /* S */
 37: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_SA(MPI_Comm,PEP_LINEAR*,Mat*);
 38: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_SB(MPI_Comm,PEP_LINEAR*,Mat*);

 40: /* H */
 41: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_HA(MPI_Comm,PEP_LINEAR*,Mat*);
 42: SLEPC_INTERN PetscErrorCode MatCreateExplicit_Linear_HB(MPI_Comm,PEP_LINEAR*,Mat*);