EPSSetDimensions

Sets the number of eigenvalues to compute and the dimension of the subspace.

Synopsis

#include "slepceps.h" 
PetscErrorCode EPSSetDimensions(EPS eps,PetscInt nev,PetscInt ncv,PetscInt mpd)
Logically Collective on EPS

Input Parameters

eps - the eigensolver context
nev - number of eigenvalues to compute
ncv - the maximum dimension of the subspace to be used by the solver
mpd - the maximum dimension allowed for the projected problem

Options Database Keys

-eps_nev <nev> - Sets the number of eigenvalues
-eps_ncv <ncv> - Sets the dimension of the subspace
-eps_mpd <mpd> - Sets the maximum projected dimension

Notes

Pass 0 to retain the previous value of any parameter.

Use PETSC_DECIDE for ncv and mpd to assign a reasonably good value, which is dependent on the solution method.

The parameters ncv and mpd are intimately related, so that the user is advised to set one of them at most. Normal usage is that (a) in cases where nev is small, the user sets ncv (a reasonable default is 2*nev); and (b) in cases where nev is large, the user sets mpd.

The value of ncv should always be between nev and (nev+mpd), typically ncv=nev+mpd. If nev is not too large, mpd=nev is a reasonable choice, otherwise a smaller value should be used.

When computing all eigenvalues in an interval, see EPSSetInterval(), the meaning of nev changes. In that case, the number of eigenvalues in the interval is not known a priori; the meaning of nev is then the number of eigenvalues that are computed at a time when sweeping the interval from one end to the other. The value of nev in this case may have an impact on overall performance. The value of ncv should not be assigned in this case.

See Also

EPSGetDimensions(), EPSSetInterval()

Location: src/eps/interface/opts.c
Index of all EPS routines
Table of Contents for all manual pages
Index of all manual pages