SNESLineSearchSetPostCheck#
Sets a user function that is called after the line search has been applied to determine the step direction and length. Allows the user a chance to change or override the decision of the line search routine
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESLineSearchSetPostCheck(SNESLineSearch linesearch, PetscErrorCode (*func)(SNESLineSearch, Vec, Vec, Vec, PetscBool *, PetscBool *, void *), void *ctx)
Logically Collective linesearch
Input Parameters#
linesearch - the
SNESLineSearchcontextfunc - [optional] function evaluation routine, see
SNESLineSearchPostCheckfor the calling sequencectx - [optional] user-defined context for private data for the function evaluation routine (may be NULL)
Notes#
Use SNESLineSearchSetPreCheck() to change the step before the line search.
search is complete.
Use SNESVISetVariableBounds() and SNESVISetComputeVariableBounds() to cause SNES to automatically control the ranges of variables allowed.
See Also#
SNESLineSearch, SNESGetLineSearch(), SNESLineSearchPostCheck(), SNESLineSearchSetPreCheck(), SNESLineSearchGetPreCheck(), SNESLineSearchGetPostCheck(),
SNESVISetVariableBounds(), SNESVISetComputeVariableBounds(), SNESSetFunctionDomainError(), `SNESSetJacobianDomainError()
Level#
intermediate
Location#
Examples#
src/snes/tutorials/ex3.c.html
src/ts/tutorials/ex27.c.html
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages