#include "petscsnes.h" PetscErrorCode SNESLineSearchSetVIFunctions(SNESLineSearch linesearch, SNESLineSearchVIProjectFunc projectfunc, SNESLineSearchVINormFunc normfunc)
snes | - nonlinear context obtained from SNESCreate() | |
projectfunc | - function for projecting the function to the bounds | |
normfunc | - function for computing the norm of an active set |
Logically Collective on SNES
projectfunc (SNES snes, Vec X)
snes | - nonlinear context | |
X | - current solution |
X | - Projected solution |
projectfunc (SNES snes, Vec X, Vec F, PetscScalar * fnorm)
snes | - nonlinear context | |
X | - current solution | |
F | - current residual |
fnorm | - VI-specific norm of the function |
The VI solvers require special evaluation of the function norm such that the norm is only calculated on the inactive set. This should be implemented by normfunc.