Subversion Repositories slepc-dev

Rev

Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2757 jroman 1
/*
2
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3
   SLEPc - Scalable Library for Eigenvalue Problem Computations
4
   Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain
5
 
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.
11
 
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.
16
 
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
*/
21
 
22
#ifndef _PSIMPL
23
#define _PSIMPL
24
 
25
#include <slepcps.h>
26
 
2771 jroman 27
extern PetscLogEvent PS_Solve,PS_Sort,PS_Other;
2777 jroman 28
extern const char *PSMatName[];
2757 jroman 29
 
30
typedef struct _PSOps *PSOps;
31
 
32
struct _PSOps {
33
  PetscErrorCode (*allocate)(PS,PetscInt);
2777 jroman 34
  PetscErrorCode (*view)(PS,PetscViewer);
2757 jroman 35
  PetscErrorCode (*computevector)(PS,PetscInt,PSMatType,PetscBool*);
2759 jroman 36
  PetscErrorCode (*solve)(PS,PetscScalar*,PetscScalar*);
2763 jroman 37
  PetscErrorCode (*sort)(PS,PetscScalar*,PetscScalar*,PetscErrorCode(*)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
2766 jroman 38
  PetscErrorCode (*cond)(PS,PetscReal*);
2773 jroman 39
  PetscErrorCode (*translate)(PS,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*);
2757 jroman 40
};
41
 
42
struct _p_PS {
43
  PETSCHEADER(struct _PSOps);
2766 jroman 44
  PetscInt     ld;                 /* leading dimension */
45
  PetscInt     l;                  /* number of locked (inactive) leading columns */
46
  PetscInt     n;                  /* current dimension */
47
  PetscInt     k;                  /* intermediate dimension (e.g. position of arrow) */
48
  PSStateType  state;              /* the current state */
49
  PetscScalar  *mat[PS_NUM_MAT];   /* the matrices */
50
  PetscReal    *rmat[PS_NUM_MAT];  /* the matrices (real) */
51
  PetscScalar  *work;
52
  PetscReal    *rwork;
53
  PetscBLASInt *iwork;
2770 jroman 54
  PetscInt     lwork,lrwork,liwork;
2757 jroman 55
};
56
 
2758 jroman 57
extern PetscErrorCode PSAllocateMat_Private(PS,PSMatType);
2775 jroman 58
extern PetscErrorCode PSAllocateMatReal_Private(PS,PSMatType);
2770 jroman 59
extern PetscErrorCode PSAllocateWork_Private(PS,PetscInt,PetscInt,PetscInt);
2777 jroman 60
extern PetscErrorCode PSViewMat_Private(PS,PetscViewer,PSMatType);
2780 jroman 61
extern PetscErrorCode PSSortEigenvaluesReal_Private(PS,PetscInt,PetscReal*,PetscInt*,PetscErrorCode (*)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
2791 jroman 62
extern PetscErrorCode PSPermuteColumns_Private(PS,PetscInt,PSMatType,PetscInt*);
2758 jroman 63
 
2757 jroman 64
#endif