Subversion Repositories slepc-dev

Rev

Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1521 slepc 1
/*
2
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1672 slepc 3
   SLEPc - Scalable Library for Eigenvalue Problem Computations
2116 eromero 4
   Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
1521 slepc 5
 
1672 slepc 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/>.
1521 slepc 19
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
*/
21
 
22
#ifndef _IPIMPL
23
#define _IPIMPL
24
 
2283 jroman 25
#include <slepcip.h>
1521 slepc 26
 
27
extern PetscLogEvent IP_InnerProduct,IP_Orthogonalize,IP_ApplyMatrix;
28
 
2373 jroman 29
typedef struct _IPOps *IPOps;
30
 
31
struct _IPOps {
2377 jroman 32
  PetscErrorCode (*normbegin)(IP,Vec,PetscReal*);
33
  PetscErrorCode (*normend)(IP,Vec,PetscReal*);
2373 jroman 34
  PetscErrorCode (*innerproductbegin)(IP,Vec,Vec,PetscScalar*);
35
  PetscErrorCode (*innerproductend)(IP,Vec,Vec,PetscScalar*);
36
  PetscErrorCode (*minnerproductbegin)(IP,Vec,PetscInt,const Vec[],PetscScalar*);
37
  PetscErrorCode (*minnerproductend)(IP,Vec,PetscInt,const Vec[],PetscScalar*);
38
};
39
 
1521 slepc 40
struct _p_IP {
2373 jroman 41
  PETSCHEADER(struct _IPOps);
2370 jroman 42
  IPOrthogType       orthog_type;    /* which orthogonalization to use */
43
  IPOrthogRefineType orthog_ref;     /* refinement method */
44
  PetscReal          orthog_eta;     /* refinement threshold */
45
  Mat                matrix;
46
  PetscInt           innerproducts;
1521 slepc 47
 
48
  /*------------------------- Cache Bx product -------------------*/
2370 jroman 49
  PetscInt           xid;
50
  PetscInt           xstate;
51
  Vec                Bx;
1521 slepc 52
};
53
 
2412 jroman 54
extern PetscErrorCode IPSetDefaultType_Private(IP);
2240 jroman 55
extern PetscErrorCode IPApplyMatrix_Private(IP,Vec);
56
extern PetscErrorCode IPOrthogonalizeCGS1(IP,PetscInt,Vec*,PetscInt,PetscBool*,Vec*,Vec,PetscScalar*,PetscReal*,PetscReal*);
1521 slepc 57
 
58
#endif