Actual source code: stimpl.h

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

  6:       This file is part of SLEPc. See the README file for conditions of use
  7:       and additional information.
  8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  9: */

 11: #ifndef _STIMPL
 12: #define _STIMPL

 14:  #include slepceps.h


 19: typedef struct _STOps *STOps;

 21: struct _STOps {
 22:   int          (*setup)(ST);
 23:   int          (*apply)(ST,Vec,Vec);
 24:   int          (*getbilinearform)(ST,Mat*);
 25:   int          (*applytrans)(ST,Vec,Vec);
 26:   int          (*setshift)(ST,PetscScalar);
 27:   int          (*setfromoptions)(ST);
 28:   int          (*postsolve)(ST);
 29:   int          (*backtr)(ST,PetscScalar*,PetscScalar*);
 30:   int          (*destroy)(ST);
 31:   int          (*view)(ST,PetscViewer);
 32: };

 34: struct _p_ST {
 35:   PETSCHEADER(struct _STOps);
 36:   /*------------------------- User parameters --------------------------*/
 37:   Mat            A,B;              /* Matrices which define the eigensystem */
 38:   PetscScalar    sigma;            /* Value of the shift */
 39:   STMatMode      shift_matrix;
 40:   MatStructure   str;          /* whether matrices have the same pattern or not */
 41:   Mat            mat;

 43:   /*------------------------- Misc data --------------------------*/
 44:   KSP          ksp;
 45:   Vec          w;
 46:   void         *data;
 47:   int          setupcalled;
 48:   int          lineariterations;
 49:   int          applys;
 50:   int          (*checknullspace)(ST,int,const Vec[]);
 51: 
 52: };

 54: EXTERN PetscErrorCode STRegisterAll(char*);

 56: EXTERN PetscErrorCode STGetBilinearForm_Default(ST,Mat*);
 57: EXTERN PetscErrorCode STView_Default(ST,PetscViewer);
 58: EXTERN PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
 59: EXTERN PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec);
 60: EXTERN PetscErrorCode STCheckNullSpace_Default(ST,int,const Vec[]);
 61: EXTERN PetscErrorCode STMatShellCreate(ST st,Mat *mat);

 63: #endif