petsc-3.7.1 2016-05-15
Report Typos and Errors

# SNESSetKSP

Sets a KSP context for the SNES object to use

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode  SNESSetKSP(SNES snes,KSP ksp)

Not Collective, but the SNES and KSP objects must live on the same MPI_Comm Many br

### Input Parameters

| snes | - the SNES context Many br
| ksp | - the KSP context Many br

### Notes

The SNES object already has its KSP object, you can obtain with SNESGetKSP() Many brso this routine is rarely needed. Many br

The KSP object that is already in the SNES object has its reference count Many brdecreased by one. Many br

Many br

### Keywords

SNES, nonlinear, get, KSP, context

### See Also

KSPGetPC(), SNESCreate(), KSPCreate(), SNESSetKSP()

Level:developer
Location:src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages