Date: 2013-09-02T10:07:26+00:00

Actual source code: linearp.h

      1: /*
      2:    Private header for QEPLINEAR.

      4:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      5:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      6:    Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain

      8:    This file is part of SLEPc.

     10:    SLEPc is free software: you can redistribute it and/or modify it under  the
     11:    terms of version 3 of the GNU Lesser General Public License as published by
     12:    the Free Software Foundation.

     14:    SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
     15:    WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
     16:    FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
     17:    more details.

     19:    You  should have received a copy of the GNU Lesser General  Public  License
     20:    along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
     21:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     22: */

     27: typedef struct {
     28:   PetscBool  explicitmatrix;
     29:   PetscInt   cform;           /* companion form */
     30:   PetscReal  sfactor;         /* scaling factor */
     31:   Mat        A,B;             /* matrices of generalized eigenproblem */
     32:   EPS        eps;             /* linear eigensolver for Az=lBz */
     33:   Mat        M,C,K;           /* copy of QEP coefficient matrices */
     34:   Vec        x1,x2,y1,y2;     /* work vectors */
     35:   PetscBool  setfromoptionscalled;
     36: } QEP_LINEAR;

     38: /* N1 */
     39: PETSC_INTERN PetscErrorCode MatMult_Linear_N1A(Mat,Vec,Vec);
     40: PETSC_INTERN PetscErrorCode MatMult_Linear_N1B(Mat,Vec,Vec);
     41: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_N1A(Mat,Vec);
     42: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_N1B(Mat,Vec);
     43: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_N1A(MPI_Comm,QEP_LINEAR*,Mat*);
     44: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_N1B(MPI_Comm,QEP_LINEAR*,Mat*);

     46: /* N2 */
     47: PETSC_INTERN PetscErrorCode MatMult_Linear_N2A(Mat,Vec,Vec);
     48: PETSC_INTERN PetscErrorCode MatMult_Linear_N2B(Mat,Vec,Vec);
     49: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_N2A(Mat,Vec);
     50: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_N2B(Mat,Vec);
     51: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_N2A(MPI_Comm,QEP_LINEAR*,Mat*);
     52: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_N2B(MPI_Comm,QEP_LINEAR*,Mat*);

     54: /* S1 */
     55: PETSC_INTERN PetscErrorCode MatMult_Linear_S1A(Mat,Vec,Vec);
     56: PETSC_INTERN PetscErrorCode MatMult_Linear_S1B(Mat,Vec,Vec);
     57: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_S1A(Mat,Vec);
     58: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_S1B(Mat,Vec);
     59: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_S1A(MPI_Comm,QEP_LINEAR*,Mat*);
     60: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_S1B(MPI_Comm,QEP_LINEAR*,Mat*);

     62: /* S2 */
     63: PETSC_INTERN PetscErrorCode MatMult_Linear_S2A(Mat,Vec,Vec);
     64: PETSC_INTERN PetscErrorCode MatMult_Linear_S2B(Mat,Vec,Vec);
     65: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_S2A(Mat,Vec);
     66: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_S2B(Mat,Vec);
     67: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_S2A(MPI_Comm,QEP_LINEAR*,Mat*);
     68: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_S2B(MPI_Comm,QEP_LINEAR*,Mat*);

     70: /* H1 */
     71: PETSC_INTERN PetscErrorCode MatMult_Linear_H1A(Mat,Vec,Vec);
     72: PETSC_INTERN PetscErrorCode MatMult_Linear_H1B(Mat,Vec,Vec);
     73: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_H1A(Mat,Vec);
     74: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_H1B(Mat,Vec);
     75: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_H1A(MPI_Comm,QEP_LINEAR*,Mat*);
     76: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_H1B(MPI_Comm,QEP_LINEAR*,Mat*);

     78: /* H2 */
     79: PETSC_INTERN PetscErrorCode MatMult_Linear_H2A(Mat,Vec,Vec);
     80: PETSC_INTERN PetscErrorCode MatMult_Linear_H2B(Mat,Vec,Vec);
     81: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_H2A(Mat,Vec);
     82: PETSC_INTERN PetscErrorCode MatGetDiagonal_Linear_H2B(Mat,Vec);
     83: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_H2A(MPI_Comm,QEP_LINEAR*,Mat*);
     84: PETSC_INTERN PetscErrorCode MatCreateExplicit_Linear_H2B(MPI_Comm,QEP_LINEAR*,Mat*);

     86: #endif