PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ 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::IPMeanSquareFunctional2V, pism::inverse::IPLogRelativeFunctional, pism::inverse::IPLogRatioFunctional, pism::inverse::IP_L2NormFunctional2V, pism::inverse::IPTotalVariationFunctional2S, pism::inverse::IPMeanSquareFunctional2S, pism::inverse::IPGroundedIceH1NormFunctional2S, pism::inverse::IP_L2NormFunctional2S, and pism::inverse::IP_H1NormFunctional2S.

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