petsc-3.13.6 2020-09-29
Report Typos and Errors

KSPSetPC

Sets the preconditioner to be used to calculate the Section 1.5 Writing Application Codes with PETSc of the preconditioner on a vector.

Synopsis

#include "petscksp.h" 
PetscErrorCode  KSPSetPC(KSP ksp,PC pc)
Collective on ksp

Input Parameters

ksp - iterative context obtained from KSPCreate()
pc - the preconditioner object

Notes

Use KSPGetPC() to retrieve the preconditioner context (for example, to free it at the end of the computations).

See Also

KSPGetPC(), KSP

Level

developer

Location

src/ksp/ksp/interface/itfunc.c

Examples

src/ksp/ksp/tutorials/ex59.c.html

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