11 #ifndef OOPS_ASSIMILATION_LBMINIMIZER_H_ 12 #define OOPS_ASSIMILATION_LBMINIMIZER_H_ 16 #include <boost/scoped_ptr.hpp> 18 #include "eckit/config/Configuration.h" 24 #include "oops/util/Logger.h" 48 const std::string
classname()
const override = 0;
61 template<
typename MODEL>
63 int ninner = config.getInt(
"ninner");
64 double gnreduc = config.getDouble(
"gradient_norm_reduction");
67 gradJb_.reset(
new CtrlInc_(J_.jb()));
69 gradJb_.reset(
new CtrlInc_(J_.jb().resolution(), *gradJb_));
73 Log::info() << classname() <<
": max iter = " << ninner
74 <<
", requested norm reduction = " << gnreduc << std::endl;
83 J_.computeGradientFG(rhs);
84 J_.jb().multiplyB(rhs, brhs);
85 J_.jb().addGradientFG(brhs, *gradJb_);
88 Log::info() << classname() <<
" rhs" << brhs << std::endl;
96 Log::info() << classname() <<
" output increment:" << *dx << std::endl;
108 #endif // OOPS_ASSIMILATION_LBMINIMIZER_H_ LBHessianMatrix< MODEL > LBHessianMatrix_
const std::string classname() const override=0
LB (Left B-preconditioned) Minimizers.
LBMinimizer(const CostFct_ &J)
CtrlInc_ * doMinimize(const eckit::Configuration &) override
The namespace for the main oops code.
boost::scoped_ptr< CtrlInc_ > gradJb_
subroutine, public info(self)
ControlIncrement< MODEL > CtrlInc_
Minimizer< MODEL > Minimizer_
virtual void solve(CtrlInc_ &, CtrlInc_ &, const LBHessianMatrix_ &, const int, const double)=0
A Minimizer knows how to minimize a cost function.
CostFunction< MODEL > CostFct_