TaoGetResidualNorm — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# TaoGetResidualNorm

Gets the current value of the norm of the residual (gradient) at this time.

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoGetResidualNorm(Tao tao, PetscReal *value)

Not Collective

## Input Parameter

- tao - the `Tao` context

## Output Parameter

- value - the current value

## Developer Notes

This is the 2-norm of the residual, we cannot use `TaoGetGradientNorm()` because that has a different meaning. For some reason `Tao` sometimes calls the gradient the residual.

## See Also

TAO: Optimization Solvers, `Tao`, `TaoGetLinearSolveIterations()`, `TaoGetIterationNumber()`, `TaoGetObjective()`

## Level

intermediate

## Location

src/tao/interface/taosolver.c

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