# PCPreSolve

Optional pre-solve phase, intended for any preconditioner-specific actions that must be performed before the iterative solve itself.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode PETSCKSP_DLLEXPORT PCPreSolve(PC pc,KSP ksp)

Collective on PC

### Input Parameters

| pc | - the preconditioner context
| ksp | - the Krylov subspace context

### Sample of Usage

        PCPreSolve(pc,ksp);
        KSPSolve(ksp,b,x);
        PCPostSolve(pc,ksp);

### Notes

The pre-solve phase is distinct from the PCSetUp() phase.

KSPSolve() calls this directly, so is rarely called by the user.

### Keywords

PC, pre-solve

### See Also

PCPostSolve()

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