Skip to main content
`Ctrl`+`K`

# TaoTermSumAddTerm

Append a term to the terms being summed

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermSumAddTerm(TaoTerm sumterm, const char prefix[], PetscReal scale, TaoTerm term, Mat map, PetscInt *index)

Collective

## Input Parameters

- sumterm - a `TaoTerm` of type `TAOTERMSUM`

- prefix - (optional) the prefix used for configuring the term (if `NULL`, the index of the term will be used as a prefix, e.g. `term_0_`, `term_1_`, etc.)

- scale - the coefficient scaling the term in the sum

- term - the `TaoTerm` to add

- map - (optional) a map from the `TAOTERMSUM` solution space to the `term` solution space; if `NULL` the map is assumed to be the identity

## Output Parameter

- index - (optional) the index of the newly added term

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TAOTERMSUM`

## Level

developer

## Location

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

## Implementations

TaoTermSumAddTerm_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