11 #ifndef OOPS_ASSIMILATION_COSTJB4D_H_
12 #define OOPS_ASSIMILATION_COSTJB4D_H_
17 #include "eckit/config/LocalConfiguration.h"
24 #include "oops/util/DateTime.h"
25 #include "oops/util/dot_product.h"
26 #include "oops/util/Logger.h"
29 template<
typename MODEL>
class JqTermTLAD;
46 CostJb4D(
const eckit::Configuration &,
const eckit::mpi::Comm &,
83 std::unique_ptr<ModelSpaceCovarianceBase<MODEL> >
B_;
85 std::unique_ptr<const Geometry_>
resol_;
87 const eckit::LocalConfiguration
conf_;
96 template<
typename MODEL>
99 : xb_(xb), B_(), ctlvars_(ctlvars), resol_(), time_(xb.validTime()),
100 conf_(config,
"background error"), commTime_(comm)
102 Log::trace() <<
"CostJb4D contructed." << std::endl;
107 template<
typename MODEL>
115 template<
typename MODEL>
123 template<
typename MODEL>
131 template<
typename MODEL>
133 B_->multiply(dxin, dxout);
138 template<
typename MODEL>
140 B_->inverseMultiply(dxin, dxout);
145 template<
typename MODEL>
152 template<
typename MODEL>
virtual ~CostJb4D()
Destructor.
CostJb4D(const eckit::Configuration &, const eckit::mpi::Comm &, const Geometry_ &, const Variables &, const State_ &)
Construct .
JqTermTLAD< MODEL > * initializeJqTLAD() const override
Empty Jq observer.
Geometry< MODEL > Geometry_
JqTermTLAD< MODEL > * initializeJqAD(const Increment_ &) const override
Empty AD Jq observer.
void addGradient(const Increment_ &, Increment_ &, Increment_ &) const override
Add Jb gradient.
void linearize(const State_ &, const Geometry_ &) override
Linearize before the linear computations.
Increment< MODEL > Increment_
void Bminv(const Increment_ &, Increment_ &) const override
JqTermTLAD< MODEL > * initializeJqTL() const override
Empty TL Jq observer.
std::unique_ptr< const Geometry_ > resol_
void computeIncrement(const State_ &, const State_ &, const State_ &, Increment_ &) const override
Get increment from state (usually first guess).
std::unique_ptr< ModelSpaceCovarianceBase< MODEL > > B_
const eckit::LocalConfiguration conf_
const eckit::mpi::Comm & commTime_
Increment_ * newStateIncrement() const override
Create new increment (set to 0).
void randomize(Increment_ &) const override
Randomize.
void Bmult(const Increment_ &, Increment_ &) const override
Multiply by and .
Jb Cost Function Base Class.
Geometry class used in oops; subclass of interface class interface::Geometry.
Increment class used in oops.
State class used in oops; subclass of interface class interface::State.
void diff(const State_ &state1, const State_ &state2)
Set this Increment to be difference between state1 and state2.
The namespace for the main oops code.