petsc-3.7.1 2016-05-15
Report Typos and Errors

# SNESLineSearchSetPreCheck

Sets a user function that is called after the initial search direction has been computed but before the line search routine has been applied. Allows the user to adjust the result of (usually a linear solve) that determined the search direction.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode  SNESLineSearchSetPreCheck(SNESLineSearch linesearch, PetscErrorCode (*func)(SNESLineSearch,Vec,Vec,PetscBool*,void*),void *ctx)

Logically Collective on SNESLineSearch Many br

### Input Parameters

| linesearch | - the SNESLineSearch context Many br
| func | - [optional] function evaluation routine, see SNESLineSearchPreCheckFunction for the calling sequence Many br
| ctx | - [optional] user-defined context for private data for the function evaluation routine (may be NULL) Many br

Many br

### Keywords

set, linesearch, pre-check

### See Also

SNESLineSearchSetPostCheck(), SNESLineSearchGetPostCheck(), SNESLineSearchGetPreCheck()

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

### Examples

src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex15.c.html