PETSc version 3.17.4
Fix/Edit manual page

# SNESNewtonTRDCSetPreCheck

Sets a user function that is called before the search step has been determined. Allows the user a chance to change or override the trust region decision.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode  SNESNewtonTRDCSetPreCheck(SNES snes, PetscErrorCode (*func)(SNES,Vec,Vec,PetscBool*,void*),void *ctx)

Logically Collective on snes

### Input Parameters

| snes | - the nonlinear solver object
| func | - [optional] function evaluation routine, see SNESNewtonTRDCPreCheck() for the calling sequence
| ctx | - [optional] user-defined context for private data for the function evaluation routine (may be NULL)

Note: This function is called BEFORE the function evaluation within the SNESNEWTONTRDC solver.

### See Also

SNESNewtonTRDCPreCheck(), SNESNewtonTRDCGetPreCheck(), SNESNewtonTRDCSetPostCheck(), SNESNewtonTRDCGetPostCheck()

### Level

intermediate

### Location

src/snes/impls/ntrdc/ntrdc.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages