#include "petscpc.h" PetscErrorCode PCShellSetApplyRichardson(PC pc,PetscErrorCode (*apply)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool,PetscInt*,PCRichardsonConvergedReason*))Logically Collective on PC
pc | - the preconditioner context | |
apply | - the Section 1.5 Writing Application Codes with PETSc-provided preconditioning routine |
PetscErrorCode apply (PC pc,Vec b,Vec x,Vec r,PetscReal rtol,PetscReal abstol,PetscReal dtol,PetscInt maxits)
pc | - the preconditioner, get the Section 1.5 Writing Application Codes with PETSc context with PCShellGetContext() | |
b | - right-hand-side | |
x | - current iterate | |
r | - work space | |
rtol | - relative tolerance of residual norm to stop at | |
abstol | - absolute tolerance of residual norm to stop at | |
dtol | - if residual norm increases by this factor than return | |
maxits | - number of iterations to run |