When I use PETSc to solve my linear systems, I always use the subroutine
PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat)
where Amat
refers to the matrix that defines my linear system and Pmat
is the Matrix used in constructing the preconditioner.
I am not sure in which scenarios it would be advisable to use another matrix than $A$ or Amat
to construct the preconditioner, i.e. to use a preconditioner from another (probably related) linear system.
EDIT
Taking a look at the PETSc Manual, one possible occasion in which the matrices Amat
and Pmat
differ is
when a preconditioning matrix is obtained from a lower order method than that employed to form the linear system matrix.
Pmat
is not equal to $P$, instead it is an approximate of $\tilde{A}$ of $A$ that is used to "construct" the preconditioner $P$. $\endgroup$