SNESNewtonTRSetPostCheck#
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 internal decision of the solver
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESNewtonTRSetPostCheck(SNES snes, PetscErrorCode (*func)(SNES snes, Vec X, Vec Y, Vec W, PetscBool *changed_Y, PetscBool *changed_W, PetscCtx ctx), PetscCtx ctx)
Logically Collective
Input Parameters#
snes - the nonlinear solver object
func - [optional] function evaluation routine, for the calling sequence see
SNESNewtonTRPostCheck()ctx - [optional] user-defined context for private data for the function evaluation routine (may be
NULL)
Calling sequence of func#
snes - the nonlinear solver object
X - the current solution value
Y - the tentative update step
W - the tentative new solution value
changed_Y - output, flag indicated
Yhas been changed by the post-checkchanged_W - output, flag indicated
Whas been changed by the post-checkctx - the optional application context
Note#
This function is called BEFORE the function evaluation within the solver while the function set in
SNESLineSearchSetPostCheck() is called AFTER the function evaluation.
See Also#
SNES: Nonlinear Solvers, SNESNEWTONTR, SNESNewtonTRPostCheck(), SNESNewtonTRGetPostCheck(), SNESNewtonTRSetPreCheck(), SNESNewtonTRGetPreCheck()
Level#
intermediate
Location#
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages