TaoGradientNorm#

Compute the norm using the NormType, the user has selected

Synopsis#

#include "petsctao.h" 
PetscErrorCode TaoGradientNorm(Tao tao, Vec gradient, NormType type, PetscReal *gnorm)

Collective

Input Parameters#

  • tao - the Tao context

  • gradient - the gradient

  • type - the norm type

Output Parameter#

  • gnorm - the gradient norm

Note#

If TaoSetGradientNorm() has been set and type is NORM_2 then the norm provided with TaoSetGradientNorm() is used.

Developer Notes#

Should be named TaoComputeGradientNorm().

The usage is a bit confusing, with TaoSetGradientNorm() plus NORM_2 resulting in the computation of the user provided norm, perhaps a refactorization is in order.

See Also#

TAO: Optimization Solvers, Tao, TaoSetGradientNorm(), TaoGetGradientNorm()

Level#

advanced

Location#

src/tao/interface/taosolver.c


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