PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
Loading...
Searching...
No Matches

◆ gradientFD() [2/2]

void pism::inverse::gradientFD ( IPFunctional< array::Vector > &  f,
array::Vector x,
array::Vector gradient 
)

Computes finite difference approximations of a IPFunctional<array::Vector> gradient.

Useful for debugging a hand coded gradient.

Definition at line 65 of file IPFunctional.cc.

References pism::ParallelSection::check(), pism::ParallelSection::failed(), pism::array::Array::grid(), pism::array::Array::update_ghosts(), and pism::inverse::IPFunctional< IMVecType >::valueAt().