:orphan: # TaoBoundSolution Ensures that the solution vector is snapped into the bounds within a given tolerance. ## Synopsis ``` #include "petsctao.h" PetscErrorCode TaoBoundSolution(Vec X, Vec XL, Vec XU, PetscReal bound_tol, PetscInt *nDiff, Vec Xout) ``` Collective ## Input Parameters - ***X -*** solution vector - ***XL -*** lower bound vector - ***XU -*** upper bound vector - ***bound_tol -*** absolute tolerance in enforcing the bound ## Output Parameters - ***nDiff -*** total number of vector entries that have been bounded - ***Xout -*** modified solution vector satisfying bounds to bound_tol ## See Also `TAOBNCG`, `TAOBNTL`, `TAOBNTR` ## Level developer ## Location src/tao/bound/utils/isutil.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/bound/utils/isutil.c) [Index of all Tao routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)