#include "slepcst.h" PetscErrorCode STSetPreconditionerMat(ST st,Mat mat)Collective
st | - the spectral transformation context | |
mat | - the matrix that will be used in constructing the preconditioner |
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.