TaoTermSetFromOptions — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# TaoTermSetFromOptions

Configure a `TaoTerm` from the PETSc options database

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermSetFromOptions(TaoTerm term)

Collective

## Input Parameter

- term - a `TaoTerm`

## Options Database Keys

- -tao_term_type - l1, halfl2squared; see `TaoTermType` for a complete list

- -tao_term_solution_vec_type - the type of vector to use for the solution, see `VecType` for a complete list of vector types

- -tao_term_parameters_vec_type - the type of vector to use for the parameters, see `VecType` for a complete list of vector types

- -tao_term_parameters_mode <optional,none,required> - `TAOTERM_PARAMETERS_OPTIONAL`, `TAOTERM_PARAMETERS_NONE`, `TAOTERM_PARAMETERS_REQUIRED`

- -tao_term_hessian_pre_is_hessian - Whether `TaoTermCreateHessianMatricesDefault()` should make a separate preconditioning matrix

- -tao_term_hessian_mat_type - `MatType` for Hessian matrix created by `TaoTermCreateHessianMatricesDefault()`

- -tao_term_hessian_pre_mat_type - `MatType` for approximate Hessian matrix used to construct the preconditioner created by `TaoTermCreateHessianMatricesDefault()`

- -tao_term_fd_delta - Increment for finite difference derivative approximations in `TaoTermComputeGradientFD()`

- -tao_term_gradient_use_fd - Use finite differences in `TaoTermComputeGradient()`, overriding other user-provided or built-in routines

- -tao_term_hessian_use_fd - Use finite differences in `TaoTermComputeHessian()`, overriding other user-provided or built-in routines

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermCreate()`, `TaoTermSetType()`, `TaoTermSetUp()`, `TaoTermView()`, `TaoTermDestroy()`

## Level

beginner

## Location

src/tao/term/interface/taoterm.c

## Examples

src/tao/term/tutorials/ex1.c

## Implementations

TaoTermSetFromOptions_L1() in src/tao/term/impls/l1/taoterml1.c
TaoTermSetFromOptions_Sum() in src/tao/term/impls/sum/taotermsum.c

Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages