:orphan: # SNESSetNPC Sets the nonlinear preconditioner to be used. ## Synopsis ``` #include "petscsnes.h" PetscErrorCode SNESSetNPC(SNES snes, SNES npc) ``` Collective ## Input Parameters - ***snes -*** iterative context obtained from `SNESCreate()` - ***npc -*** the preconditioner object ## Notes Use `SNESGetNPC()` to retrieve the preconditioner context (for example, to configure it using the API). Only some `SNESType` can use a nonlinear preconditioner ## See Also [](ch_snes), `SNESNGS`, `SNESFAS`, `SNESGetNPC()`, `SNESHasNPC()` ## Level developer ## Location src/snes/interface/snes.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c) [Index of all SNES routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)