#include "slepcst.h" PetscErrorCode STGetOperator(ST st,Mat *Op)Collective on st
|st||- the spectral transformation context|
|Op||- operator matrix|
The returned shell matrix is essentially a wrapper to the STApply() and STApplyTranspose() operations. The operator can often be expressed as
Op = D*inv(K)*M*inv(D)
where D is the balancing matrix, and M and K are two matrices corresponding to the numerator and denominator for spectral transformations that represent a rational matrix function. In the case of STSHELL, the inner part inv(K)*M is replaced by the user-provided operation from STShellSetApply().
The preconditioner matrix K typically depends on the value of the shift, and its inverse is handled via an internal KSP object. Normal usage does not require explicitly calling STGetOperator(), but it can be used to force the creation of K and M, and then K is passed to the KSP. This is useful for setting options associated with the PCFactor (to set MUMPS options, for instance).
The returned matrix must NOT be destroyed by the user. Instead, when no longer needed it must be returned with STRestoreOperator(). In particular, this is required before modifying the ST matrices or the shift.
A NULL pointer can be passed in Op in case the matrix is not required but we want to force its creation. In this case, STRestoreOperator() should not be called.