Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ gradientAt()

template<class IMVecType >
virtual void pism::inverse::IPFunctional< IMVecType >::gradientAt ( IMVecType &  x,
IMVecType &  gradient 
)
pure virtual

Computes the gradient of the functional at the vector x.

On an \(m\times n\) Grid, an array::Array \(x\) with \(d\) degrees of freedom will be \(d m n\)-dimensional with components \(x_i\). The gradient computed here is the vector of directional derivatives \(\nabla J\) of the functional \(J\) with respect to \(x\). Concretely, the \(i^{\rm th}\) component of \(\nabla J\) is

\[ \nabla J_i = \frac{\partial}{\partial x_i} J(x). \]

This vector is returned as gradient.

Implemented in pism::inverse::IPTotalVariationFunctional2S, pism::inverse::IPLogRatioFunctional, and pism::inverse::IPLogRelativeFunctional.

Referenced by pism::inverse::IP_SSATaucTaoTikhonovProblemLCL::evaluateObjectiveAndGradient(), and pism::inverse::IPInnerProductFunctional< IMVecType >::interior_product().