TaoRegisterDynamic

Adds a method to the TAO_SOLVER package for unconstrained minimization.

Synopsis

TaoRegisterDynamic(char *name_solver,char *path,char *name_Create,int (*routine_Create)(TAO_SOLVER))
Not collective

Input Parameters

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

Notes

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

If dynamic libraries are used, then the fourth input argument (routine_Create) 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

   TaoRegisterDynamic("my_solver","/home/username/my_lib/lib/libg_c++/solaris/mylib.a",
                "MySolverCreate",MySolverCreate);

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

    TaoSetMethod(solver,"my_solver")
or at runtime via the option
    -tao_method my_solver

Keywords

TAO_SOLVER, register

See Also

TaoRegisterAll(), TaoRegisterDestroy()

Level:advanced
Location:src/petsctao/sys/petsckernel.c
TAO Solver Index
Table of Contents