# SNESSetApplicationContext

Sets the optional user-defined context for the nonlinear solvers.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode PETSCSNES_DLLEXPORT SNESSetApplicationContext(SNES snes,void *usrP)

Collective on SNES

### Input Parameters

| snes | - the SNES context
| usrP | - optional user context

### Keywords

SNES, nonlinear, set, application, context

### See Also

SNESGetApplicationContext()

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