TaoTermSumSetTermHessianMatrices — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# TaoTermSumSetTermHessianMatrices

Set Hessian matrices that can be used internally by a `TAOTERMSUM`

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermSumSetTermHessianMatrices(TaoTerm term, PetscInt index, Mat unmapped_H, Mat unmapped_Hpre, Mat mapped_H, Mat mapped_Hpre)

Logically collective

## Input Parameters

- term - a `TaoTerm` of type `TAOTERMSUM`

- index - the index for the term from `TaoTermSumSetTerm()` or `TaoTermSumAddTerm()`

- unmapped_H - (optional) unmapped Hessian matrix

- unmapped_Hpre - (optional) unmapped matrix for constructing the preconditioner of `unmapped_H`

- mapped_H - (optional) Hessian matrix

- mapped_Hpre - (optional) matrix for constructing the preconditioner of `mapped_H`

## Notes

If the inner term has the form \(g(x) = \alpha f(Ax; p)\), the “mapped” Hessians should be able to hold the Hessian \(\nabla^2 g\) and the unmapped Hessians should be able to hold the Hessian \(\nabla_x^2 f\). If the term is not mapped, just pass the unmapped Hessians (e.g. `TaoTermSumSetTermHessianMatrices(term, 0, H, Hpre, NULL, NULL)`).

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TAOTERMSUM`, `TaoTermComputeHessian()`, `TaoTermSumGetTermHessianMatrices()`

## Level

developer

## Location

src/tao/term/impls/sum/taotermsum.c

## Implementations

TaoTermSumSetTermHessianMatrices_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