# TaoComputeDualVariables
Computes the dual vectors corresponding to the bounds of the variables 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoComputeDualVariables(Tao tao, Vec DL, Vec DU)
```
Collective on tao


## Input Parameter

- ***tao -*** the Tao context



## Output Parameters

- ***DL -*** dual variable vector for the lower bounds
- ***DU -*** dual variable vector for the upper bounds





## Note
DL and DU should be created before calling this routine.  If calling
this routine after using an unconstrained solver, DL and DU are set to all
zeros.



.seealso: `Tao`, `TaoComputeObjective()`, `TaoSetVariableBounds()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/interface/taosolver_bounds.c.html#TaoComputeDualVariables">src/tao/interface/taosolver_bounds.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver_bounds.c)


[Index of all Tao routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
