Subversion Repositories slepc-dev

Rev

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

Rev Author Line No. Line
1376 slepc 1
/*
2
       This file implements a wrapper to the ARPACK package
6 dsic.upv.es!jroman 3
 
1376 slepc 4
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1672 slepc 5
   SLEPc - Scalable Library for Eigenvalue Problem Computations
2116 eromero 6
   Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
1376 slepc 7
 
1672 slepc 8
   This file is part of SLEPc.
9
 
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.
13
 
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.
18
 
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/>.
1376 slepc 21
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 dsic.upv.es!jroman 22
*/
1376 slepc 23
 
2293 jroman 24
#include <private/epsimpl.h>        /*I "slepceps.h" I*/
2298 jroman 25
#include <private/stimpl.h>         /*I "slepcst.h" I*/
2283 jroman 26
#include <../src/eps/impls/external/arpack/arpackp.h>
6 dsic.upv.es!jroman 27
 
1947 jroman 28
PetscErrorCode EPSSolve_ARPACK(EPS);
29
 
6 dsic.upv.es!jroman 30
#undef __FUNCT__  
31
#define __FUNCT__ "EPSSetUp_ARPACK"
476 dsic.upv.es!antodo 32
PetscErrorCode EPSSetUp_ARPACK(EPS eps)
6 dsic.upv.es!jroman 33
{
476 dsic.upv.es!antodo 34
  PetscErrorCode ierr;
1509 slepc 35
  PetscInt       ncv;
476 dsic.upv.es!antodo 36
  EPS_ARPACK     *ar = (EPS_ARPACK *)eps->data;
6 dsic.upv.es!jroman 37
 
38
  PetscFunctionBegin;
260 dsic.upv.es!antodo 39
  if (eps->ncv) {
2214 jroman 40
    if (eps->ncv<eps->nev+2) SETERRQ(((PetscObject)eps)->comm,1,"The value of ncv must be at least nev+2");
1220 slepc 41
  } else /* set default value of ncv */
1928 jroman 42
    eps->ncv = PetscMin(PetscMax(20,2*eps->nev+1),eps->n);
1579 slepc 43
  if (eps->mpd) PetscInfo(eps,"Warning: parameter mpd ignored\n");
1928 jroman 44
  if (!eps->max_it) eps->max_it = PetscMax(300,(PetscInt)(2*eps->n/eps->ncv));
1942 jroman 45
  if (!eps->which) eps->which = EPS_LARGEST_MAGNITUDE;
260 dsic.upv.es!antodo 46
 
6 dsic.upv.es!jroman 47
  ncv = eps->ncv;
48
#if defined(PETSC_USE_COMPLEX)
1040 slepc 49
  ierr = PetscFree(ar->rwork);CHKERRQ(ierr);
6 dsic.upv.es!jroman 50
  ierr = PetscMalloc(ncv*sizeof(PetscReal),&ar->rwork);CHKERRQ(ierr);
1645 slepc 51
  ar->lworkl = PetscBLASIntCast(3*ncv*ncv+5*ncv);
1040 slepc 52
  ierr = PetscFree(ar->workev);CHKERRQ(ierr);
6 dsic.upv.es!jroman 53
  ierr = PetscMalloc(3*ncv*sizeof(PetscScalar),&ar->workev);CHKERRQ(ierr);
54
#else
55
  if( eps->ishermitian ) {
1645 slepc 56
    ar->lworkl = PetscBLASIntCast(ncv*(ncv+8));
1220 slepc 57
  } else {
1645 slepc 58
    ar->lworkl = PetscBLASIntCast(3*ncv*ncv+6*ncv);
1040 slepc 59
    ierr = PetscFree(ar->workev);CHKERRQ(ierr);
6 dsic.upv.es!jroman 60
    ierr = PetscMalloc(3*ncv*sizeof(PetscScalar),&ar->workev);CHKERRQ(ierr);
61
  }
62
#endif
1040 slepc 63
  ierr = PetscFree(ar->workl);CHKERRQ(ierr);
6 dsic.upv.es!jroman 64
  ierr = PetscMalloc(ar->lworkl*sizeof(PetscScalar),&ar->workl);CHKERRQ(ierr);
1040 slepc 65
  ierr = PetscFree(ar->select);CHKERRQ(ierr);
2216 jroman 66
  ierr = PetscMalloc(ncv*sizeof(PetscBool),&ar->select);CHKERRQ(ierr);
1040 slepc 67
  ierr = PetscFree(ar->workd);CHKERRQ(ierr);
1928 jroman 68
  ierr = PetscMalloc(3*eps->nloc*sizeof(PetscScalar),&ar->workd);CHKERRQ(ierr);
6 dsic.upv.es!jroman 69
 
1560 slepc 70
  if (eps->extraction) {
71
     ierr = PetscInfo(eps,"Warning: extraction type ignored\n");CHKERRQ(ierr);
1426 slepc 72
  }
73
 
1940 jroman 74
  if (eps->balance!=EPS_BALANCE_NONE)
2214 jroman 75
    SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Balancing not supported in the Arpack interface");
1819 jroman 76
 
1941 jroman 77
  ierr = EPSAllocateSolution(eps);CHKERRQ(ierr);
1231 slepc 78
  ierr = EPSDefaultGetWork(eps,2);CHKERRQ(ierr);
6 dsic.upv.es!jroman 79
 
1947 jroman 80
  /* dispatch solve method */
2214 jroman 81
  if (eps->leftvecs) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Left vectors not supported in this solver");
1947 jroman 82
  eps->ops->solve = EPSSolve_ARPACK;
6 dsic.upv.es!jroman 83
  PetscFunctionReturn(0);
84
}
85
 
86
#undef __FUNCT__  
87
#define __FUNCT__ "EPSSolve_ARPACK"
476 dsic.upv.es!antodo 88
PetscErrorCode EPSSolve_ARPACK(EPS eps)
6 dsic.upv.es!jroman 89
{
1089 slepc 90
  PetscErrorCode ierr;
2316 jroman 91
  EPS_ARPACK     *ar = (EPS_ARPACK *)eps->data;
92
  char           bmat[1], howmny[] = "A";
93
  const char     *which;
2317 jroman 94
  PetscBLASInt   n, iparam[11], ipntr[14], ido, info, nev, ncv, fcomm;
2316 jroman 95
  PetscScalar    sigmar, *pV, *resid;
96
  Vec            x, y, w = eps->work[0];
97
  Mat            A;
98
  PetscBool      isSinv, isShift, rvec;
1229 slepc 99
#if !defined(PETSC_USE_COMPLEX)
100
  PetscScalar    sigmai = 0.0;
101
#endif
2316 jroman 102
 
6 dsic.upv.es!jroman 103
  PetscFunctionBegin;
1645 slepc 104
  nev = PetscBLASIntCast(eps->nev);
105
  ncv = PetscBLASIntCast(eps->ncv);
1515 slepc 106
  fcomm = PetscBLASIntCast(MPI_Comm_c2f(((PetscObject)eps)->comm));
1928 jroman 107
  n = PetscBLASIntCast(eps->nloc);
108
  ierr = VecCreateMPIWithArray(((PetscObject)eps)->comm,eps->nloc,PETSC_DECIDE,PETSC_NULL,&x);CHKERRQ(ierr);
109
  ierr = VecCreateMPIWithArray(((PetscObject)eps)->comm,eps->nloc,PETSC_DECIDE,PETSC_NULL,&y);CHKERRQ(ierr);
6 dsic.upv.es!jroman 110
  ierr = VecGetArray(eps->V[0],&pV);CHKERRQ(ierr);
1941 jroman 111
  ierr = EPSGetStartVector(eps,0,eps->work[1],PETSC_NULL);CHKERRQ(ierr);
1231 slepc 112
  ierr = VecGetArray(eps->work[1],&resid);CHKERRQ(ierr);
6 dsic.upv.es!jroman 113
 
114
  ido  = 0;            /* first call to reverse communication interface */
115
  info = 1;            /* indicates a initial vector is provided */
116
  iparam[0] = 1;       /* use exact shifts */
1645 slepc 117
  iparam[2] = PetscBLASIntCast(eps->max_it);  /* maximum number of Arnoldi update iterations */
6 dsic.upv.es!jroman 118
  iparam[3] = 1;       /* blocksize */
119
  iparam[4] = 0;       /* number of converged Ritz values */
120
 
121
  /*
122
     Computational modes ([]=not supported):
123
            symmetric    non-symmetric    complex
124
        1     1  'I'        1  'I'         1  'I'
125
        2     3  'I'        3  'I'         3  'I'
126
        3     2  'G'        2  'G'         2  'G'
127
        4     3  'G'        3  'G'         3  'G'
128
        5   [ 4  'G' ]    [ 3  'G' ]
129
        6   [ 5  'G' ]    [ 4  'G' ]
130
   */
2092 jroman 131
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSINVERT,&isSinv);CHKERRQ(ierr);
1229 slepc 132
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSHIFT,&isShift);CHKERRQ(ierr);
133
  ierr = STGetShift(eps->OP,&sigmar);CHKERRQ(ierr);
134
  ierr = STGetOperators(eps->OP,&A,PETSC_NULL);CHKERRQ(ierr);
135
 
136
  if (isSinv) {
137
    /* shift-and-invert mode */
138
    iparam[6] = 3;
1358 slepc 139
    if (eps->ispositive) bmat[0] = 'G';
1229 slepc 140
    else bmat[0] = 'I';
1358 slepc 141
  } else if (isShift && eps->ispositive) {
1229 slepc 142
    /* generalized shift mode with B positive definite */
143
    iparam[6] = 2;
144
    bmat[0] = 'G';
145
  } else {
146
    /* regular mode */
147
    if (eps->ishermitian && eps->isgeneralized)
2214 jroman 148
      SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Spectral transformation not supported by ARPACK hermitian solver");
1229 slepc 149
    iparam[6] = 1;
150
    bmat[0] = 'I';
6 dsic.upv.es!jroman 151
  }
152
 
153
#if !defined(PETSC_USE_COMPLEX)
154
    if (eps->ishermitian) {
91 dsic.upv.es!antodo 155
      switch(eps->which) {
2161 jroman 156
        case EPS_TARGET_MAGNITUDE:
91 dsic.upv.es!antodo 157
        case EPS_LARGEST_MAGNITUDE:  which = "LM"; break;
158
        case EPS_SMALLEST_MAGNITUDE: which = "SM"; break;
2161 jroman 159
        case EPS_TARGET_REAL:
91 dsic.upv.es!antodo 160
        case EPS_LARGEST_REAL:       which = "LA"; break;
161
        case EPS_SMALLEST_REAL:      which = "SA"; break;
2214 jroman 162
        default: SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
91 dsic.upv.es!antodo 163
      }
176 dsic.upv.es!antodo 164
    } else {
165
#endif
91 dsic.upv.es!antodo 166
      switch(eps->which) {
2161 jroman 167
        case EPS_TARGET_MAGNITUDE:
91 dsic.upv.es!antodo 168
        case EPS_LARGEST_MAGNITUDE:  which = "LM"; break;
169
        case EPS_SMALLEST_MAGNITUDE: which = "SM"; break;
2161 jroman 170
        case EPS_TARGET_REAL:
91 dsic.upv.es!antodo 171
        case EPS_LARGEST_REAL:       which = "LR"; break;
172
        case EPS_SMALLEST_REAL:      which = "SR"; break;
2161 jroman 173
        case EPS_TARGET_IMAGINARY:
91 dsic.upv.es!antodo 174
        case EPS_LARGEST_IMAGINARY:  which = "LI"; break;
175
        case EPS_SMALLEST_IMAGINARY: which = "SI"; break;
2214 jroman 176
        default: SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
91 dsic.upv.es!antodo 177
      }
176 dsic.upv.es!antodo 178
#if !defined(PETSC_USE_COMPLEX)
179
    }
180
#endif
181
 
740 dsic.upv.es!antodo 182
  do {
176 dsic.upv.es!antodo 183
 
184
#if !defined(PETSC_USE_COMPLEX)
185
    if (eps->ishermitian) {
1509 slepc 186
      ARsaupd_( &fcomm, &ido, bmat, &n, which, &nev, &eps->tol,
187
                resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
176 dsic.upv.es!antodo 188
                ar->workl, &ar->lworkl, &info, 1, 2 );
189
    }
190
    else {
1509 slepc 191
      ARnaupd_( &fcomm, &ido, bmat, &n, which, &nev, &eps->tol,
192
                resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
6 dsic.upv.es!jroman 193
                ar->workl, &ar->lworkl, &info, 1, 2 );
194
    }
195
#else
1509 slepc 196
    ARnaupd_( &fcomm, &ido, bmat, &n, which, &nev, &eps->tol,
197
              resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
6 dsic.upv.es!jroman 198
              ar->workl, &ar->lworkl, ar->rwork, &info, 1, 2 );
199
#endif
571 dsic.upv.es!antodo 200
 
1229 slepc 201
    if (ido == -1 || ido == 1 || ido == 2) {
202
      if (ido == 1 && iparam[6] == 3 && bmat[0] == 'G') {
203
        /* special case for shift-and-invert with B semi-positive definite*/
204
        ierr = VecPlaceArray(x,&ar->workd[ipntr[2]-1]); CHKERRQ(ierr);
205
      } else {
206
        ierr = VecPlaceArray(x,&ar->workd[ipntr[0]-1]); CHKERRQ(ierr);
207
      }
740 dsic.upv.es!antodo 208
      ierr = VecPlaceArray(y,&ar->workd[ipntr[1]-1]); CHKERRQ(ierr);
1229 slepc 209
 
210
      if (ido == -1) {
211
        /* Y = OP * X for for the initialization phase to
2316 jroman 212
           force the starting vector into the range of OP */
213
        ierr = STApply(eps->OP,x,y); CHKERRQ(ierr);
1229 slepc 214
      } else if (ido == 2) {
215
        /* Y = B * X */
2316 jroman 216
        ierr = IPApplyMatrix(eps->ip,x,y); CHKERRQ(ierr);
1229 slepc 217
      } else { /* ido == 1 */
218
        if (iparam[6] == 3 && bmat[0] == 'G') {
219
          /* Y = OP * X for shift-and-invert with B semi-positive definite */
2316 jroman 220
          ierr = STAssociatedKSPSolve(eps->OP,x,y);CHKERRQ(ierr);
221
        } else if (iparam[6] == 2) {
1229 slepc 222
          /* X=A*X Y=B^-1*X for shift with B positive definite */
2316 jroman 223
          ierr = MatMult(A,x,y);CHKERRQ(ierr);
224
          if (sigmar != 0.0) {
225
            ierr = IPApplyMatrix(eps->ip,x,w);CHKERRQ(ierr);
1229 slepc 226
            ierr = VecAXPY(y,sigmar,w);CHKERRQ(ierr);
2316 jroman 227
          }
1229 slepc 228
          ierr = VecCopy(y,x); CHKERRQ(ierr);
229
          ierr = STAssociatedKSPSolve(eps->OP,x,y);CHKERRQ(ierr);
2316 jroman 230
        } else  {
1229 slepc 231
          /* Y = OP * X */
2316 jroman 232
          ierr = STApply(eps->OP,x,y); CHKERRQ(ierr);        
233
        }
1755 antodo 234
        ierr = IPOrthogonalize(eps->ip,0,PETSC_NULL,eps->nds,PETSC_NULL,eps->DS,y,PETSC_NULL,PETSC_NULL,PETSC_NULL);CHKERRQ(ierr);
6 dsic.upv.es!jroman 235
      }
1229 slepc 236
 
850 dsic.upv.es!antodo 237
      ierr = VecResetArray(x); CHKERRQ(ierr);
238
      ierr = VecResetArray(y); CHKERRQ(ierr);
742 dsic.upv.es!antodo 239
    } else if (ido != 99) {
2214 jroman 240
      SETERRQ1(((PetscObject)eps)->comm,1,"Internal error in ARPACK reverse comunication interface (ido=%i)\n",ido);
6 dsic.upv.es!jroman 241
    }
740 dsic.upv.es!antodo 242
 
243
  } while (ido != 99);
6 dsic.upv.es!jroman 244
 
245
  eps->nconv = iparam[4];
1223 slepc 246
  eps->its = iparam[2];
6 dsic.upv.es!jroman 247
 
2214 jroman 248
  if (info==3) { SETERRQ(((PetscObject)eps)->comm,1,"No shift could be applied in xxAUPD.\n"
740 dsic.upv.es!antodo 249
                           "Try increasing the size of NCV relative to NEV."); }
2214 jroman 250
  else if (info!=0 && info!=1) { SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_LIB,"Error reported by ARPACK subroutine xxAUPD (%d)",info);}
6 dsic.upv.es!jroman 251
 
393 dsic.upv.es!antodo 252
  rvec = PETSC_TRUE;
6 dsic.upv.es!jroman 253
 
740 dsic.upv.es!antodo 254
  if (eps->nconv > 0) {
6 dsic.upv.es!jroman 255
#if !defined(PETSC_USE_COMPLEX)
740 dsic.upv.es!antodo 256
    if (eps->ishermitian) {
2313 jroman 257
      ierr = EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,&ar->workl[ipntr[6]-1],eps->ncv);CHKERRQ(ierr);
740 dsic.upv.es!antodo 258
      ARseupd_ ( &fcomm, &rvec, howmny, ar->select, eps->eigr,  
2316 jroman 259
                 pV, &n, &sigmar,
260
                 bmat, &n, which, &nev, &eps->tol,
261
                 resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
262
                 ar->workl, &ar->lworkl, &info, 1, 1, 2 );
740 dsic.upv.es!antodo 263
    }
264
    else {
2313 jroman 265
      ierr = EPSMonitor(eps,iparam[2],iparam[4],&ar->workl[ipntr[5]-1],&ar->workl[ipntr[6]-1],&ar->workl[ipntr[7]-1],eps->ncv);CHKERRQ(ierr);
740 dsic.upv.es!antodo 266
      ARneupd_ ( &fcomm, &rvec, howmny, ar->select, eps->eigr, eps->eigi,
2316 jroman 267
                 pV, &n, &sigmar, &sigmai, ar->workev,
268
                 bmat, &n, which, &nev, &eps->tol,
269
                 resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
270
                 ar->workl, &ar->lworkl, &info, 1, 1, 2 );
740 dsic.upv.es!antodo 271
    }
272
#else
2313 jroman 273
    ierr = EPSMonitor(eps,eps->its,iparam[4],&ar->workl[ipntr[5]-1],eps->eigi,(PetscReal*)&ar->workl[ipntr[7]-1],eps->ncv);CHKERRQ(ierr);
740 dsic.upv.es!antodo 274
    ARneupd_ ( &fcomm, &rvec, howmny, ar->select, eps->eigr,
275
               pV, &n, &sigmar, ar->workev,
1509 slepc 276
               bmat, &n, which, &nev, &eps->tol,
277
               resid, &ncv, pV, &n, iparam, ipntr, ar->workd,
740 dsic.upv.es!antodo 278
               ar->workl, &ar->lworkl, ar->rwork, &info, 1, 1, 2 );
6 dsic.upv.es!jroman 279
#endif
2214 jroman 280
    if (info!=0) { SETERRQ1(((PetscObject)eps)->comm,PETSC_ERR_LIB,"Error reported by ARPACK subroutine xxEUPD (%d)",info); }
740 dsic.upv.es!antodo 281
  }
6 dsic.upv.es!jroman 282
 
283
  ierr = VecRestoreArray( eps->V[0], &pV ); CHKERRQ(ierr);
1231 slepc 284
  ierr = VecRestoreArray( eps->work[1], &resid ); CHKERRQ(ierr);
740 dsic.upv.es!antodo 285
  if( eps->nconv >= eps->nev ) eps->reason = EPS_CONVERGED_TOL;
286
  else eps->reason = EPS_DIVERGED_ITS;
6 dsic.upv.es!jroman 287
 
288
  if (eps->ishermitian) {
289
    ierr = PetscMemcpy(eps->errest,&ar->workl[ipntr[8]-1],eps->nconv);CHKERRQ(ierr);
290
  } else {
291
    ierr = PetscMemcpy(eps->errest,&ar->workl[ipntr[10]-1],eps->nconv);CHKERRQ(ierr);
292
  }
293
 
2305 jroman 294
  ierr = VecDestroy(&x);CHKERRQ(ierr);
295
  ierr = VecDestroy(&y);CHKERRQ(ierr);
6 dsic.upv.es!jroman 296
  PetscFunctionReturn(0);
297
}
298
 
299
#undef __FUNCT__  
176 dsic.upv.es!antodo 300
#define __FUNCT__ "EPSBackTransform_ARPACK"
476 dsic.upv.es!antodo 301
PetscErrorCode EPSBackTransform_ARPACK(EPS eps)
176 dsic.upv.es!antodo 302
{
476 dsic.upv.es!antodo 303
  PetscErrorCode ierr;
2216 jroman 304
  PetscBool      isSinv;
176 dsic.upv.es!antodo 305
 
306
  PetscFunctionBegin;
2092 jroman 307
  ierr = PetscTypeCompare((PetscObject)eps->OP,STSINVERT,&isSinv);CHKERRQ(ierr);
1229 slepc 308
  if (!isSinv) {
309
    ierr = EPSBackTransform_Default(eps);CHKERRQ(ierr);
442 dsic.upv.es!antodo 310
  }
176 dsic.upv.es!antodo 311
  PetscFunctionReturn(0);
312
}
313
 
314
#undef __FUNCT__  
6 dsic.upv.es!jroman 315
#define __FUNCT__ "EPSDestroy_ARPACK"
476 dsic.upv.es!antodo 316
PetscErrorCode EPSDestroy_ARPACK(EPS eps)
6 dsic.upv.es!jroman 317
{
476 dsic.upv.es!antodo 318
  PetscErrorCode ierr;
319
  EPS_ARPACK     *ar = (EPS_ARPACK *)eps->data;
6 dsic.upv.es!jroman 320
 
321
  PetscFunctionBegin;
2213 jroman 322
  PetscValidHeaderSpecific(eps,EPS_CLASSID,1);
1040 slepc 323
  ierr = PetscFree(ar->workev);CHKERRQ(ierr);
324
  ierr = PetscFree(ar->workl);CHKERRQ(ierr);
325
  ierr = PetscFree(ar->select);CHKERRQ(ierr);
326
  ierr = PetscFree(ar->workd);CHKERRQ(ierr);
6 dsic.upv.es!jroman 327
#if defined(PETSC_USE_COMPLEX)
1040 slepc 328
  ierr = PetscFree(ar->rwork);CHKERRQ(ierr);
6 dsic.upv.es!jroman 329
#endif
1040 slepc 330
  ierr = PetscFree(eps->data);CHKERRQ(ierr);
260 dsic.upv.es!antodo 331
  ierr = EPSDefaultFreeWork(eps);CHKERRQ(ierr);
1596 slepc 332
  ierr = EPSFreeSolution(eps);CHKERRQ(ierr);
6 dsic.upv.es!jroman 333
  PetscFunctionReturn(0);
334
}
335
 
336
EXTERN_C_BEGIN
337
#undef __FUNCT__  
338
#define __FUNCT__ "EPSCreate_ARPACK"
476 dsic.upv.es!antodo 339
PetscErrorCode EPSCreate_ARPACK(EPS eps)
6 dsic.upv.es!jroman 340
{
476 dsic.upv.es!antodo 341
  PetscErrorCode ierr;
6 dsic.upv.es!jroman 342
 
343
  PetscFunctionBegin;
2329 jroman 344
  ierr = PetscNewLog(eps,EPS_ARPACK,&eps->data);CHKERRQ(ierr);
503 dsic.upv.es!antodo 345
  eps->ops->setup                = EPSSetUp_ARPACK;
6 dsic.upv.es!jroman 346
  eps->ops->destroy              = EPSDestroy_ARPACK;
176 dsic.upv.es!antodo 347
  eps->ops->backtransform        = EPSBackTransform_ARPACK;
503 dsic.upv.es!antodo 348
  eps->ops->computevectors       = EPSComputeVectors_Default;
6 dsic.upv.es!jroman 349
  PetscFunctionReturn(0);
350
}
351
EXTERN_C_END