NEPSetDimensions#
Sets the number of eigenvalues to compute and the dimension of the subspace.
Synopsis#
#include "slepcnep.h"
PetscErrorCode NEPSetDimensions(NEP nep,PetscInt nev,PetscInt ncv,PetscInt mpd)
Logically Collective
Input Parameters#
nep - the nonlinear 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#
-nep_nev <nev> - sets the number of eigenvalues
-nep_ncv <ncv> - sets the dimension of the subspace
-nep_mpd <mpd> - sets the maximum projected dimension
Notes#
Use PETSC_DETERMINE for ncv and mpd to assign a reasonably good value, which is
dependent on the solution method. For any of the arguments, use PETSC_CURRENT
to preserve the current value.
The parameters ncv and mpd are intimately related, so that the user is advised
to set one of them at most. Normal usage is:
in cases where
nevis small, the user setsncv(a reasonable default is2*nev).in cases where
nevis large, the user setsmpd.
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.
See Also#
Level#
intermediate
Location#
Examples#
src/nep/tutorials/ex42.c
src/nep/tutorials/ex20.c
src/nep/tutorials/ex22f.F90
src/nep/tutorials/ex22.c
src/nep/tutorials/ex54f.F90
src/nep/tutorials/ex20f.F90
Index of all NEP routines Table of Contents for all manual pages Index of all manual pages