Skip to main content
`Ctrl`+`K`

# SNESTestFunction

Computes the difference between the computed and finite-difference functions

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESTestFunction(SNES snes)

Collective

## Input Parameter

- snes - the `SNES` context

## Options Database Keys

- -snes_test_function - compare the user provided function with one compute via finite differences to check for errors.

- -snes_test_function_view - display the user provided function, the finite difference function and the difference

## See Also

SNES: Nonlinear Solvers, `SNESTestJacobian()`, `SNESSetFunction()`, `SNESComputeFunction()`

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