#include "petscksp.h" PetscErrorCode PETSCKSP_DLLEXPORT PCSetOperators(PC pc,Mat Amat,Mat Pmat,MatStructure flag)Collective on PC and Mat
pc | - the preconditioner context | |
Amat | - the matrix associated with the linear system | |
Pmat | - the matrix to be used in constructing the preconditioner, usually the same as Amat. | |
flag | - flag indicating information about the preconditioner matrix structure during successive linear solves. This flag is ignored the first time a linear system is solved, and thus is irrelevant when solving just one linear system. |
SAME_PRECONDITIONER | - Pmat is identical during successive linear solves. This option is intended for folks who are using different Amat and Pmat matrices and wish to reuse the same preconditioner matrix. For example, this option saves work by not recomputing incomplete factorization for ILU/ICC preconditioners. | |
SAME_NONZERO_PATTERN | - Pmat has the same nonzero structure during successive linear solves. | |
DIFFERENT_NONZERO_PATTERN | - Pmat does not have the same nonzero structure. |
If in doubt about whether your preconditioner matrix has changed structure or not, use the flag DIFFERENT_NONZERO_PATTERN.
Level:intermediate
Location:src/ksp/pc/interface/precon.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages