# TaoAppSetInitialSolutionVec

Sets the vector representing the variables and an initial guess.

## Synopsis

    #include "tao.h"
    int TaoAppSetInitialSolutionVec(TAO_APPLICATION taoapp, Vec xx)

Collective on TAO_APPLICATION

## Input Parameters

| taoapp | - the TAO_APPLICATION context
| xx | - variable vector that stores the solution

## Note

This vector will be used by the solver, so do not use it for other purposes. The user should destroy this vector after solving the application.

## Note

If the user is unaware of a decent initial solution, the vector should be set to zero.

## Note

The TAO solvers will not use the contents of this Vec until the TaoSolve() is called. Therefore the user may compute an initial solution in this vector after this routine -- but before TaoSolve().

## See Also

TaoAppGetSolutionVec(), TaoAppSetObjectiveRoutine()

Level:beginner
Location:src/petsctao/application/petscapp/tao_app.c
TAO Solver Index
Table of Contents

### Examples

src/bound/examples/tutorials/plate2.c.html
src/bound/examples/tutorials/jbearing2.c.html
src/bound/examples/tutorials/plate2f.F.html
src/complementarity/examples/tutorials/minsurf1.c.html
src/complementarity/examples/tutorials/blackscholes.c.html
src/unconstrained/examples/tutorials/eptorsion1.c.html
src/unconstrained/examples/tutorials/eptorsion2.c.html
src/unconstrained/examples/tutorials/minsurf2.c.html
src/unconstrained/examples/tutorials/rosenbrock1.c.html
src/unconstrained/examples/tutorials/eptorsion2f.F.html
src/unconstrained/examples/tutorials/rosenbrock1f.F.html