slepc-3.21.1 2024-04-26
Report Typos and Errors


Sets the matrix to be used to build the preconditioner.


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

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.

An alternative to pass an approximation of A-sigma*B with this function is to provide approximations of A and B via STSetSplitPreconditioner(). The difference is that when sigma changes the preconditioner is recomputed.

Use NULL to remove a previously set matrix.

See Also

STGetPreconditionerMat(), STSetShift(), STGetOperator(), STSetSplitPreconditioner()







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