SNESVISetComputeVariableBounds#
Sets a function that is called to compute the bounds on variable for (differential) variable inequalities.
Synopsis#
#include "petscsnes.h"
PetscErrorCode SNESVISetComputeVariableBounds(SNES snes, PetscErrorCode (*compute)(SNES, Vec, Vec))
Input parameter#
snes - the
SNEScontextcompute - function that computes the bounds
Calling Sequence of function#
PetscErrorCode compute(SNES snes,Vec lower,Vec higher, void *ctx)
snes - the
SNEScontextlower - vector to hold lower bounds
higher - vector to hold upper bounds
Notes#
Problems with bound constraints can be solved with the reduced space, SNESVINEWTONRSLS, and semi-smooth SNESVINEWTONSSLS solvers.
For entries with no bounds you can set PETSC_NINFINITY or PETSC_INFINITY
You may use SNESVISetVariableBounds() to provide the bounds once if they will never change
If you have associated a DM with the SNES and provided a function to the DM via DMSetVariableBounds() that will be used automatically
to provide the bounds and you need not use this function.
See Also#
Variational Inequalities, SNES, SNESVISetVariableBounds(), DMSetVariableBounds(), SNESSetFunctionDomainError(), SNESSetJacobianDomainError(), SNESVINEWTONRSLS, SNESVINEWTONSSLS,
‘SNESSetType()`
Level#
advanced
Location#
Examples#
src/snes/tutorials/ex58.c.html
src/snes/tutorials/ex9.c.html
Implementations#
SNESVISetComputeVariableBounds_VI in src/snes/impls/vi/vi.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages