Skip to main content
`Ctrl`+`K`

# KSPGetType

Gets the `KSP` type as a string from the `KSP` object.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPGetType(KSP ksp, KSPType *type)

Not Collective

## Input Parameter

- ksp - Krylov context

## Output Parameter

- type - name of the `KSP` method

## See Also

KSP: Linear System Solvers, `KSPType`, `KSP`, `KSPSetType()`

## Level

intermediate

## Location

src/ksp/ksp/interface/itcreate.c

## Examples

src/ksp/ksp/tutorials/ex57f.F90
src/ksp/ksp/tutorials/ex27.c
src/ksp/ksp/tutorials/ex76.c

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