slepc-3.16.1 2021-11-17
Report Typos and Errors


Sets the matrix to be used to build the preconditioner.


#include "slepcst.h" 
PetscErrorCode STSetPreconditionerMat(ST st,Mat mat)
Collective on st

Input Parameters

st  - the spectral transformation context
mat  - the matrix that will be used in constructing the preconditioner


This matrix will be passed to the internal KSP object (via the last argument of KSPSetOperators()) as the matrix to be used when constructing the preconditioner. If no matrix is set or mat is set to NULL, A-sigma*B will be used to build the preconditioner, being sigma the value set by STSetShift().

More precisely, this is relevant for spectral transformations that represent a rational matrix function, and use a KSP object for the denominator, called K in the description of STGetOperator(). It includes also the STPRECOND case. If the user has a good approximation to matrix K that can be used to build a cheap preconditioner, it can be passed with this function. Note that it affects only the Pmat argument of KSPSetOperators(), not the Amat argument.

If a preconditioner matrix is set, the default is to use an iterative KSP rather than a direct method.

See Also

STGetPreconditionerMat(), STSetShift(), STGetOperator()

Location: src/sys/classes/st/interface/stfunc.c



Index of all ST routines
Table of Contents for all manual pages
Index of all manual pages