Skip to main content
`Ctrl`+`K`

# SNESNewtonALSetFunction

Sets a user function that is called at each function evaluation to compute the tangent load vector for the arc-length continuation method.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESNewtonALSetFunction(SNES snes, SNESFunctionFn *func, void *ctx)

Logically Collective

## Input Parameters

- snes - the nonlinear solver object

- func - [optional] tangent load function evaluation routine, see `SNESFunctionFn` for the calling sequence. `U` is the current solution vector, `Q` is the output tangent load vector

- ctx - [optional] user-defined context for private data for the function evaluation routine (may be `NULL`)

## Notes

If the current value of the load parameter is needed in `func`, it can be obtained with `SNESNewtonALGetLoadParameter()`.

The tangent load vector is the partial derivative of external load with respect to the load parameter. In the case of proportional loading, the tangent load vector is the full external load vector at the end of the load step.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESNEWTONAL`, `SNESNewtonALGetFunction()`, `SNESNewtonALGetLoadParameter()`

## Level

intermediate

## Location

src/snes/impls/al/al.c

## Examples

src/snes/tutorials/ex16.c

## Implementations

SNESNewtonALSetFunction_NEWTONAL() in src/snes/impls/al/al.c

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages