Skip to main content
`Ctrl`+`K`

# SNESSetFunctionType

Sets the `SNESFunctionType` of the `SNES` method.

## Synopsis

    #include "petscsnes.h"
    #include "petscsnes.h"
    PetscErrorCode SNESSetFunctionType(SNES snes, SNESFunctionType type)

Logically Collective

## Input Parameters

- snes - the `SNES` context

- type - the function type

Values of the function type:

- `SNES_FUNCTION_DEFAULT` - the default for the given `SNESType`

- `SNES_FUNCTION_UNPRECONDITIONED` - an unpreconditioned function evaluation (this is the function provided with `SNESSetFunction()`

- `SNES_FUNCTION_PRECONDITIONED` - a transformation of the function provided with `SNESSetFunction()`

## Note

Different `SNESType`s use this value in different ways

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESFunctionType`, `SNESGetNormSchedule()`, `SNESComputeFunction()`, `VecNorm()`, `SNESSetFunction()`, `SNESSetInitialFunction()`, `SNESNormSchedule`

## 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