# KSPSetUp

Sets up the internal data structures for the later use of an iterative solver.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode PETSCKSP_DLLEXPORT KSPSetUp(KSP ksp)

Collective on KSP

### Input Parameter

ksp -iterative context obtained from KSPCreate()

### Keywords

KSP, setup

### See Also

KSPCreate(), KSPSolve(), KSPDestroy()

Level:developer
Location:src/ksp/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/pc/examples/tutorials/ex1.c.html
src/ksp/pc/examples/tutorials/ex2.c.html
src/ksp/examples/tutorials/ex5.c.html
src/ksp/examples/tutorials/ex7.c.html
src/ksp/examples/tutorials/ex8.c.html
src/ksp/examples/tutorials/ex9.c.html
src/ksp/examples/tutorials/ex10.c.html
src/ksp/examples/tutorials/ex27.c.html