STSinvertSetMatMode

Sets a flag to indicate how the matrix is being shifted in the shift-and-invert spectral transformation.

Synopsis

#include "slepcst.h" 
int STSinvertSetMatMode(ST st, STSinvertMatMode mode)
Collective on ST

Input Parameters

st - the spectral transformation context
mode - the mode flag, one of STSINVERT_MATMODE_COPY, STSINVERT_MATMODE_INPLACE or STSINVERT_MATMODE_SHELL

Options Database Key

-st_sinvert_matmode <mode> -Activates STSinvertSetMatMode()

Note

By default (STSINVERT_MATMODE_COPY), a copy of matrix A is made and then this copy is shifted explicitly, e.g. A <- (A - s B).

With STSINVERT_MATMODE_INPLACE, the original matrix A is shifted at STSetUp() and unshifted at the end of the computations. With respect to the previous one, this mode avoids a copy of matrix A. However, a backdraw is that the recovered matrix might be slightly different from the original one (due to roundoff).

With STSINVERT_MATMODE_SHELL, the solver works with an implicit shell matrix that represents the shifted matrix. This mode is the most efficient in creating the shifted matrix but it places serious limitations to the linear solves performed in each iteration of the eigensolver (typically, only interative solvers with Jacobi preconditioning can be used).

In the case of generalized problems, in the two first modes the matrix A - s B has to be computed explicitly. The efficiency of this computation can be controlled with STSinvertSetMatStructure().

See Also

STSetOperators(), STSinvertSetMatStructure()

Level:intermediate
Location:
src/st/impls/sinvert/sinvert.c
Index of all ST routines
Table of Contents for all manual pages
Index of all manual pages