tao-2.1-p0 2012-07-24

TaoSolverRegister

Adds a method to the TAO package for unconstrained minimization.

Synopsis

TaoSolverRegister(char *name_solver,char *path,char *name_Create,int (*routine_Create)(TaoSolver))
Not collective

Input Parameters

sname - name of a new user-defined solver
path - path (either absolute or relative) the library containing this solver
cname - name of routine to Create method context
func - routine to Create method context

Notes

TaoSolverRegister() may be called multiple times to add several user-defined solvers.

If dynamic libraries are used, then the fourth input argument (func) is ignored.

Environmental variables such as ${TAO_DIR}, ${PETSC_ARCH}, ${PETSC_DIR}, and others of the form ${any_environmental_variable} occuring in pathname will be replaced with the appropriate values used when PETSc and TAO were compiled.

Sample usage

   TaoSolverRegister("my_solver","/home/username/mylibraries/${PETSC_ARCH}/mylib.a",
                "MySolverCreate",MySolverCreate);

Then, your solver can be chosen with the procedural interface via

    TaoSetType(tao,"my_solver")
or at runtime via the option
    -tao_method my_solver

See Also

TaoSolverRegisterAll(), TaoSolverRegisterDestroy()

Level:advanced
Location:src/interface/taosolver.c
TAO Solver Index
Table of Contents