TaoSetTaoSetUpDownRoutines

Sets the routines that setup and destroy solver data structures

Synopsis

#include "tao_solver.h"  
int TaoSetTaoSetUpDownRoutines(TAO_SOLVER tao, 
                              int (*setup)(TAO_SOLVER,void*),
                              int (*setdown)(TAO_SOLVER,void*))
Collective on TAO_SOLVER

Input Parameters

tao - the TAO_SOLVER context
setup - routine that creates the work vectors in a solver.
setdown - the routine that will destroy the work vectors of a solver

Note

This routine is generally called within a "TaoCreate_XXX" routine. The routines set here will be called in the TaoSetApplication() and TaoDestroy() routines, respectively. Vectors and other data structures needed by the solver can be created and destroyed within the TaoSolve_XXX() routine, or before and after this routine. The advantage to doing it before and after is that the solver can be called multiple times without reallocated these structures -- improving efficiency.

Note

When the 'setup' routine is called, the solution vector, and other data will be available to clone.

Note

When TAO calls these routines, the second arguement will be the context specified in TaoSetTaoSolveRoutine().

Keywords

TAO_SOLVER, setup, destroy

See Also

TaoCreate(), TaoSetUp(), TaoSetDown(), TaoDestroy(), TaoSetTaoSolveRoutine()

Level:developer
Location:src/interface/newsolver.c
TAO Solver Index
Table of Contents