petsc-3.6.2 2015-10-02
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

### Input Parameters

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

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