Skip to main content
`Ctrl`+`K`

# STPrecondSetKSPHasMat

Sets a flag indicating that during `STSetUp` the coefficient matrix of the `KSP` linear solver (`Amat`) must be set to be the same matrix as the preconditioner (`Pmat`).

## Synopsis

    #include "slepcst.h"
    PetscErrorCode STPrecondSetKSPHasMat(ST st,PetscBool ksphasmat)

Collective

## Input Parameters

- st - the spectral transformation context

- ksphasmat - the flag

## Notes

Often, the preconditioner matrix is used only in the `PC` object, but in some solvers this matrix must be provided also as the `Amat` matrix in the `KSP` object.

## See Also

ST: Spectral Transformation, `STPRECOND`, `STPrecondGetKSPHasMat()`, `STSetShift()`

## Level

developer

## Location

src/sys/classes/st/impls/precond/precond.c

## Implementations

STPrecondSetKSPHasMat_Precond() in src/sys/classes/st/impls/precond/precond.c

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