KSPGetPC#

Returns a pointer to the preconditioner context with the KSP

Synopsis#

#include "petscksp.h" 
#include "petscmat.h" 
PetscErrorCode KSPGetPC(KSP ksp, PC *pc)

Not Collective

Input Parameter#

  • ksp - iterative context obtained from KSPCreate()

Output Parameter#

  • pc - preconditioner context

Note#

The PC is created if it does not already exist.

Developer Note#

Calls KSPCheckPCMPI() to check if the KSP is effected by -mpi_linear_solver_server

See Also#

KSP: Linear System Solvers, KSPSetPC(), KSP, PC

Level#

developer

Location#

src/ksp/ksp/interface/itfunc.c

Examples#

src/dm/impls/stag/tutorials/ex2.c
src/ts/tutorials/ex30.c
src/ksp/pc/tutorials/ex2.c
src/ts/utils/dmplexlandau/tutorials/ex1f90.F90
src/ksp/pc/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex1.c
src/ts/tutorials/ex20opt_p.c
src/ts/tutorials/ex20opt_ic.c
src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex3.c


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