Skip to main content
`Ctrl`+`K`

# SNESNewtonTRDCSetPostCheck

Sets a user function that is called after the search step has been determined but before the next function evaluation. Allows the user a chance to change or override the decision of the line search routine

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESNewtonTRDCSetPostCheck(SNES snes, PetscErrorCode (*func)(SNES, Vec, Vec, Vec, PetscBool *, PetscBool *, void *), void *ctx)

Logically Collective

## Input Parameters

- snes - the nonlinear solver object

- func - [optional] function evaluation routine, for the calling sequence see `SNESNewtonTRDCPostCheck()`

- ctx - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)

## Note

This function is called BEFORE the function evaluation within the `SNESNEWTONTRDC` solver while the function set in `SNESLineSearchSetPostCheck()` is called AFTER the function evaluation.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESNEWTONTRDC`, `SNESNewtonTRDCPostCheck()`, `SNESNewtonTRDCGetPostCheck()`, `SNESNewtonTRDCSetPreCheck()`, `SNESNewtonTRDCGetPreCheck()`

## Level

intermediate

## Location

src/snes/impls/ntrdc/ntrdc.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages