11 #ifndef OOPS_ASSIMILATION_PRIMALMINIMIZER_H_
12 #define OOPS_ASSIMILATION_PRIMALMINIMIZER_H_
16 #include "eckit/config/Configuration.h"
21 #include "oops/util/Logger.h"
49 const int,
const double) = 0;
56 template<
typename MODEL,
typename OBS>
59 int ninner = config.getInt(
"ninner");
60 double gnreduc = config.getDouble(
"gradient norm reduction");
62 bool runOnlineAdjTest = config.getBool(
"online diagnostics.online adj test",
false);
64 Log::info() << classname() <<
": max iter = " << ninner
65 <<
", requested norm reduction = " << gnreduc << std::endl;
68 Hessian_ hessian(J_, runOnlineAdjTest);
73 J_.computeGradientFG(rhs);
74 J_.jb().addGradientFG(rhs);
76 Log::info() << classname() <<
" rhs" << rhs << std::endl;
82 double reduc = this->solve(*dx, rhs, hessian, B, ninner, gnreduc);
84 Log::test() << classname() <<
": reduction in residual norm = " << reduc << std::endl;
85 Log::info() << classname() <<
" output" << *dx << std::endl;
94 #endif // OOPS_ASSIMILATION_PRIMALMINIMIZER_H_