PCMatApplyRichardson#

Applies several steps of Richardson iteration with the particular preconditioner to multiple vectors stored as a MATDENSE. This routine is usually used by the Krylov solvers and not the application code directly.

Synopsis#

#include "petscksp.h" 
PetscErrorCode PCMatApplyRichardson(PC pc, Mat B, Mat Y, Mat W, PetscReal rtol, PetscReal abstol, PetscReal dtol, PetscInt its, PetscBool guesszero, PetscInt *outits, PCRichardsonConvergedReason *reason)

Collective

Input Parameters#

  • pc - the PC preconditioner context

  • B - the block of right-hand sides

  • W - one work block of vectors, may be NULL

  • rtol - relative decrease in residual norm convergence criteria

  • abstol - absolute residual norm convergence criteria

  • dtol - divergence residual norm increase criteria

  • its - the number of iterations to apply

  • guesszero - PETSC_TRUE if Y is known to be initially zero

Output Parameters#

  • outits - number of iterations actually used

  • reason - the reason the apply terminated

  • Y - the block of solutions (also contains the initial guess if guesszero is PETSC_FALSE)

Notes#

Most preconditioners do not support this function. Use the command PCMatApplyRichardsonExists() to determine if one does.

W may be NULL. For example KSPRICHARDSON does not provide one, so implementations that need scratch space must allocate it themselves.

Like PCMatApply(), B and Y must be different matrices.

See Also#

KSP: Linear System Solvers, PC, PCMatApplyRichardsonExists(), PCApplyRichardson(), PCMatApply(), KSPMatSolve()

Level#

developer

Location#

src/ksp/pc/interface/precon.c

Implementations#

PCMatApplyRichardson_Shell() in src/ksp/pc/impls/shell/shellpc.c


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