TaoSetFromOptions#
Sets various Tao parameters from the options database
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoSetFromOptions(Tao tao)
Collective
Input Parameter#
tao - the
Taosolver context
Options Database Keys#
-tao_type type - The algorithm that
taowill use (lmvm, nls, etc.). SeeTaoType-tao_gatol gatol - absolute error tolerance for ||gradient||
-tao_grtol grtol - relative error tolerance for ||gradient||
-tao_gttol gttol - reduction of ||gradient|| relative to initial gradient
-tao_max_it max - sets maximum number of iterations
-tao_max_funcs max - sets maximum number of function evaluations
-tao_fmin fmin - stop if function value reaches
fmin-tao_steptol tol - stop if the trust region radius becomes less than
tol-tao_trust0 radius - initial trust region radius
-tao_monitor viewer_specification - prints function value and residual norm at each iteration
-tao_monitor_constraint_norm viewer_specification - prints objective value, gradient, and constraint norm at each iteration
-tao_monitor_globalization viewer_specification - prints information about the globalization at each iteration
-tao_monitor_solution viewer_specification - prints solution vector at each iteration
-tao_monitor_residual viewer_specification - view the least-squares residual at each iteration
-tao_monitor_step viewer_specification - prints step vector at each iteration
-tao_monitor_gradient viewer_specification - prints gradient vector at each iteration
-tao_monitor_solution_draw (true|false) - use
TaoMonitorSolutionDraw()to draw the solution at each iteration-tao_monitor_gradient_draw (true|false) - use
TaoMonitorGradientDraw()to draw the gradient at each iteration-tao_monitor_step_draw (true|false) - use
TaoMonitorStepDraw()to draw the solution step at each iteration-tao_monitor_cancel (true|false) - cancels all monitors (except those set from the command line)
-tao_fd_gradient (true|false) - use gradient computed with finite differences
-tao_fd_hessian (true|false) - use Hessian computed with finite differences
-tao_mf_hessian (true|false) - use matrix-free Hessian computed with finite differences. No
TaoTermsupport-tao_view viewer_specification - displays information about
taoat the end ofTaoSolve()-tao_view_solution viewer_specification - view the solution at the end of the optimization process
-tao_converged_reason (true|false) - displays the reason
taostopped iterating-tao_add_terms prefix1,prefix2,… - takes a comma-separated list of up to 16 options prefixes, a
TaoTermwill be created for each and added to the objective function-tao_recycle_history (true|false) - reuse the history from previous
TaoSolve(), for some algorithms. SeeTaoSetRecycleHistory()-tao_subset_type (subvec|mask|matrixfree) - strategies for handling active-sets, see
TaoSubsetType-tao_ksp_ew (true|false) - use Eisenstat-Walker linear system convergence test, see
TaoKSPSetUseEW()
Notes#
See PetscOptionsCreateViewer() for the format of viewer_specification
To see all options, run your program with the -help option or consult the
user’s manual. Should be called after TaoCreate() but before TaoSolve().
See Also#
TAO: Optimization Solvers, Tao, TaoCreate(), TaoSolve(), TaoSetRecycleHistory(), PetscOptionsCreateViewer(), TaoSubsetType, TaoKSPSetUseEW()
Level#
beginner
Location#
Examples#
src/tao/constrained/tutorials/maros.c
src/tao/pde_constrained/tutorials/elliptic.c
src/tao/leastsquares/tutorials/chwirut2f.F90
src/tao/pde_constrained/tutorials/hyperbolic.c
src/tao/constrained/tutorials/ex1.c
src/tao/pde_constrained/tutorials/parabolic.c
src/tao/leastsquares/tutorials/chwirut1.c
src/tao/leastsquares/tutorials/chwirut1f.F90
src/tao/constrained/tutorials/tomographyADMM.c
src/tao/leastsquares/tutorials/cs1.c
Implementations#
TaoSetFromOptions_BLMVM() in src/tao/bound/impls/blmvm/blmvm.c
TaoSetFromOptions_BNCG() in src/tao/bound/impls/bncg/bncg.c
TaoSetFromOptions_BNK() in src/tao/bound/impls/bnk/bnk.c
TaoSetFromOptions_BNTL() in src/tao/bound/impls/bnk/bntl.c
TaoSetFromOptions_BNTR() in src/tao/bound/impls/bnk/bntr.c
TaoSetFromOptions_BQNK() in src/tao/bound/impls/bqnk/bqnk.c
TaoSetFromOptions_BQNLS() in src/tao/bound/impls/bqnls/bqnls.c
TaoSetFromOptions_TRON() in src/tao/bound/impls/tron/tron.c
TaoSetFromOptions_SSLS() in src/tao/complementarity/impls/ssls/ssls.c
TaoSetFromOptions_ADMM() in src/tao/constrained/impls/admm/admm.c
TaoSetFromOptions_ALMM() in src/tao/constrained/impls/almm/almm.c
TaoSetFromOptions_IPM() in src/tao/constrained/impls/ipm/ipm.c
TaoSetFromOptions_PDIPM() in src/tao/constrained/impls/ipm/pdipm.c
TaoSetFromOptions_BRGN() in src/tao/leastsquares/impls/brgn/brgn.c
TaoSetFromOptions_POUNDERS() in src/tao/leastsquares/impls/pounders/pounders.c
TaoSetFromOptions_LCL() in src/tao/pde_constrained/impls/lcl/lcl.c
TaoSetFromOptions_BQPIP() in src/tao/quadratic/impls/bqpip/bqpip.c
TaoSetFromOptions_GPCG() in src/tao/quadratic/impls/gpcg/gpcg.c
TaoSetFromOptions_BMRM() in src/tao/unconstrained/impls/bmrm/bmrm.c
TaoSetFromOptions_CG() in src/tao/unconstrained/impls/cg/taocg.c
TaoSetFromOptions_LMVM() in src/tao/unconstrained/impls/lmvm/lmvm.c
TaoSetFromOptions_NM() in src/tao/unconstrained/impls/neldermead/neldermead.c
TaoSetFromOptions_NLS() in src/tao/unconstrained/impls/nls/nls.c
TaoSetFromOptions_NTL() in src/tao/unconstrained/impls/ntl/ntl.c
TaoSetFromOptions_NTR() in src/tao/unconstrained/impls/ntr/ntr.c
TaoSetFromOptions_OWLQN() in src/tao/unconstrained/impls/owlqn/owlqn.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages