TAOTERMHALFL2SQUARED — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# TAOTERMHALFL2SQUARED

A `TaoTerm` that computes \(\tfrac{1}{2}\|x - p\|_2^2\), for solution \(x\) and parameters \(p\).

## Notes

By default this term is `TAOTERM_PARAMETERS_OPTIONAL`. If the parameters argument is `NULL` in the evaluation routines (`TaoTermComputeObjective()`, `TaoTermComputeGradient()`, etc.), then it is assumed \(p = 0\) and the term computes \(\tfrac{1}{2}\|x\|_2^2\).

The default Hessian creation mode (see `TaoTermGetCreateHessianMode()`) is `H == Hpre` and `TaoTermCreateHessianMatrices()` will create a `MATDIAGONAL` for the Hessian.

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermType`, `TaoTermCreateHalfL2Squared()`, `TAOTERML1`, `TAOTERMQUADRATIC`

## Level

intermediate

## Location

src/tao/term/impls/halfl2squared/taotermhalfl2squared.c

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