PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ gradientAt()

void pism::inverse::IPMeanSquareFunctional2S::gradientAt ( array::Scalar x,
array::Scalar gradient 
)
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.

Implements pism::inverse::IPFunctional< array::Scalar >.

Definition at line 221 of file IPMeanSquareFunctional.cc.

References pism::array::Array2D< T >::add(), pism::inverse::IPFunctional< array::Scalar >::m_grid, m_normalization, m_weights, and pism::array::Array::set().