TaoTermSumSetTermMask#
Set a TaoTermMask on a term in the sum
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoTermSumSetTermMask(TaoTerm term, PetscInt index, TaoTermMask mask)
Logically collective
Input Parameters#
term - a
TaoTermof typeTAOTERMSUMindex - the index for the term from
TaoTermSumSetTerm()orTaoTermSumAddTerm()mask - a bitmask of
TaoTermMaskevaluation methods to mask (e.g. justTAOTERM_MASK_OBJECTIVEor a bitwise-or likeTAOTERM_MASK_OBJECTIVE | TAOTERM_MASK_GRADIENT)
Options Database Keys#
-tao_term_sum_<prefix_>mask - a list containing any of
none,objective,gradient, andhessianto indicate which evaluations to mask for a term with a given prefix (seeTaoTermSumSetTerm())
Note#
Some optimization methods may add a damping term to the Hessian of an
objective function without affecting the objective or gradient. If, e.g.,
the regularizer has index 1, then this can be accomplished with
TaoTermSumSetTermMask(term, 1, TAOTERM_MASK_OBJECTIVE | TAOTERM_MASK_GRADIENT).
See Also#
TaoTerm: composable objective function terms,
TaoTerm,
TAOTERMSUM,
TaoTermSumGetTermMask()
Level#
developer
Location#
Implementations#
TaoTermSumSetTermMask_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