petsc-3.7.1 2016-05-15
Report Typos and Errors

PCShellSetApplyRichardson

Sets routine to use as preconditioner in Richardson iteration.

Synopsis

#include "petscpc.h" 
PetscErrorCode  PCShellSetApplyRichardson(PC pc,PetscErrorCode (*apply)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool,PetscInt*,PCRichardsonConvergedReason*))
Logically Collective on PC Many br

Input Parameters

pc - the preconditioner context Many br
apply - the application-provided preconditioning routine Many br

Calling sequence of apply

   PetscErrorCode apply (PC pc,Vec b,Vec x,Vec r,PetscReal rtol,PetscReal abstol,PetscReal dtol,PetscInt maxits)
Many br

pc - the preconditioner, get the application context with PCShellGetContext() Many br
b - right-hand-side Many br
x - current iterate Many br
r - work space Many br
rtol - relative tolerance of residual norm to stop at Many br
abstol - absolute tolerance of residual norm to stop at Many br
dtol - if residual norm increases by this factor than return Many br
maxits - number of iterations to run Many br

Notes: the function MUST return an error code of 0 on success and nonzero on failure. Many br

Many br

Keywords

PC, shell, set, apply, Richardson, user-provided

See Also

PCShellSetApply(), PCShellSetContext()

Level:developer
Location:
src/ksp/pc/impls/shell/shellpc.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages