Skip to main content
`Ctrl`+`K`

# DMSetVariableBounds

sets a function to compute the lower and upper bound vectors for `SNESVI`.

## Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    #include "petscds.h"
    PetscErrorCode DMSetVariableBounds(DM dm, PetscErrorCode (*f)(DM dm, Vec lower, Vec upper))

Logically Collective

## Input Parameters

- dm - the `DM` object

- f - the function that computes variable bounds used by `SNESVI` (use `NULL` to cancel a previous function that was set)

## Calling sequence of f

- dm - the `DM`

- lower - the vector to hold the lower bounds

- upper - the vector to hold the upper bounds

## Developer Note

Should be called `DMSetComputeVIBounds()` or something similar

## See Also

DM Basics, `DM`, `DMComputeVariableBounds()`, `DMHasVariableBounds()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMCreateColoring()`, `DMCreateMatrix()`, `DMCreateMassMatrix()`, `DMGetApplicationContext()`, `DMSetJacobian()`

## Level

intermediate

## Location

src/dm/interface/dm.c

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