PetscErrorCode PETSCSNES_DLLEXPORT SNESLineSearchSetPreCheck(SNES snes,PetscErrorCode (*func)(SNES,Vec,Vec,void*,PetscTruth*),void *checkctx)
snes | - nonlinear context obtained from SNESCreate() | |
func | - pointer to function | |
checkctx | - optional user-defined context for use by step checking routine |
Collective on SNES
int func (SNES snes, Vec x,Vec y,void *checkctx, PetscTruth *changed_y)where func returns an error code of 0 on success and a nonzero on failure.
snes | - nonlinear context | |
checkctx | - optional user-defined context for use by step checking routine | |
x | - previous iterate | |
y | - new search direction and length |
y | - search direction (possibly changed) | |
changed_y | - indicates search direction was changed by this routine |
Notes: All line searches accept the new iterate computed by the line search checking routine.
Level:advanced
Location:src/snes/impls/ls/ls.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages