11 #ifndef OOPS_ASSIMILATION_LBHESSIANMATRIX_H_
12 #define OOPS_ASSIMILATION_LBHESSIANMATRIX_H_
16 #include <boost/noncopyable.hpp>
24 template<
typename MODEL>
class JqTermTLAD;
33 template<
typename MODEL,
typename OBS>
class LBHessianMatrix :
private boost::noncopyable {
44 for (
unsigned jj = 0; jj <
j_.
nterms(); ++jj) {
67 for (
unsigned jj = 0; jj <
j_.
nterms(); ++jj) {
83 for (
unsigned jj = 0; jj <
j_.
nterms(); ++jj) {
void zero()
Linear algebra operators.
const JbTotal_ & jb() const
Access .
virtual void runTLM(CtrlInc_ &, PostProcessorTLAD< MODEL > &, PostProcessor< Increment_ > post=PostProcessor< Increment_ >(), const bool idModel=false) const =0
virtual void runADJ(CtrlInc_ &, PostProcessorTLAD< MODEL > &, PostProcessor< Increment_ > post=PostProcessor< Increment_ >(), const bool idModel=false) const =0
const CostBase_ & jterm(const size_t ii) const
Access terms of the cost function other than .
virtual void zeroAD(CtrlInc_ &) const =0
void finalizeTL(const CtrlInc_ &, CtrlInc_ &) const
void initializeAD(CtrlInc_ &, const CtrlInc_ &, PostProcTLAD_ &) const
Initialize before starting the AD run.
void multiplyB(const CtrlInc_ &, CtrlInc_ &) const
Multiply by covariance matrix and its inverse.
virtual void computeCostTL(const ControlIncrement< MODEL, OBS > &, GeneralizedDepartures &) const =0
Finish cost computation after TL model integration.
virtual void computeCostAD(std::shared_ptr< const GeneralizedDepartures >, ControlIncrement< MODEL, OBS > &, PostProcTLAD_ &) const =0
Adjoint of computeCostTL (initialize and set post-processors adjoint to force AD model)
virtual std::unique_ptr< GeneralizedDepartures > newDualVector() const =0
Provide new dual space vector (for example a Departure for Jo).
virtual void setPostProcAD() const =0
Adjoint ot setPostProcTL (clean-up)
virtual std::unique_ptr< GeneralizedDepartures > multiplyCoInv(const GeneralizedDepartures &) const =0
virtual void setPostProcTL(const ControlIncrement< MODEL, OBS > &, PostProcTLAD_ &) const =0
Initialize and set TL post-processors to collect data during TL model integration.
JqTermTLAD< MODEL > JqTermTLAD_
void multiply(const CtrlInc_ &dx, CtrlInc_ &dz) const
CostFunction< MODEL, OBS > CostFct_
LBHessianMatrix(const CostFct_ &j)
ControlIncrement< MODEL, OBS > CtrlInc_
Control model post processing.
The namespace for the main oops code.