Actual source code: stimpl.h

  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2009, Universidad Politecnica de Valencia, Spain

  6:    This file is part of SLEPc.
  7:       
  8:    SLEPc is free software: you can redistribute it and/or modify it under  the
  9:    terms of version 3 of the GNU Lesser General Public License as published by
 10:    the Free Software Foundation.

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

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

 22: #ifndef _STIMPL
 23: #define _STIMPL

 25:  #include slepceps.h


 30: typedef struct _STOps *STOps;

 32: struct _STOps {
 33:   PetscErrorCode   (*setup)(ST);
 34:   PetscErrorCode   (*apply)(ST,Vec,Vec);
 35:   PetscErrorCode   (*getbilinearform)(ST,Mat*);
 36:   PetscErrorCode   (*applytrans)(ST,Vec,Vec);
 37:   PetscErrorCode   (*setshift)(ST,PetscScalar);
 38:   PetscErrorCode   (*setfromoptions)(ST);
 39:   PetscErrorCode   (*postsolve)(ST);
 40:   PetscErrorCode   (*backtr)(ST,PetscScalar*,PetscScalar*);
 41:   PetscErrorCode   (*destroy)(ST);
 42:   PetscErrorCode   (*view)(ST,PetscViewer);
 43: };

 45: struct _p_ST {
 46:   PETSCHEADER(struct _STOps);
 47:   /*------------------------- User parameters --------------------------*/
 48:   Mat            A,B;              /* Matrices which define the eigensystem */
 49:   PetscScalar    sigma;            /* Value of the shift */
 50:   STMatMode      shift_matrix;
 51:   MatStructure   str;          /* whether matrices have the same pattern or not */
 52:   Mat            mat;

 54:   /*------------------------- Misc data --------------------------*/
 55:   KSP            ksp;
 56:   Vec            w;
 57:   void           *data;
 58:   PetscInt       setupcalled;
 59:   PetscInt       lineariterations;
 60:   PetscInt       applys;
 61:   PetscErrorCode (*checknullspace)(ST,PetscInt,const Vec[]);
 62: 
 63: };

 65: EXTERN PetscErrorCode STRegisterAll(char*);

 67: EXTERN PetscErrorCode STGetBilinearForm_Default(ST,Mat*);
 68: EXTERN PetscErrorCode STView_Default(ST,PetscViewer);
 69: EXTERN PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
 70: EXTERN PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec);
 71: EXTERN PetscErrorCode STCheckNullSpace_Default(ST,PetscInt,const Vec[]);
 72: EXTERN PetscErrorCode STMatShellCreate(ST st,Mat *mat);

 74: #endif