FV3 Bundle
BMatrix.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef OOPS_ASSIMILATION_BMATRIX_H_
12 #define OOPS_ASSIMILATION_BMATRIX_H_
13 
14 #include <boost/noncopyable.hpp>
15 
18 
19 namespace oops {
20 
21  /// The \f$ B \f$ matrix.
22  /*!
23  * The solvers represent matrices as objects that implement a "multiply"
24  * method. This class defines objects that apply the \f$ B \f$ matrix.
25  */
26 
27 template<typename MODEL> class BMatrix : private boost::noncopyable {
30 
31  public:
32  explicit BMatrix(const CostFct_ & j): j_(j) {}
33  void multiply(const CtrlInc_ & x, CtrlInc_ & bx) const {
34  j_.jb().multiplyB(x, bx);
35  }
36 
37  private:
38  CostFct_ const & j_;
39 };
40 
41 } // namespace oops
42 
43 #endif // OOPS_ASSIMILATION_BMATRIX_H_
const JbTotal_ & jb() const
Access .
Definition: CostFunction.h:97
BMatrix(const CostFct_ &j)
Definition: BMatrix.h:32
Cost Function.
Definition: CostFunction.h:56
l_size ! loop over number of fields ke do j
The namespace for the main oops code.
CostFunction< MODEL > CostFct_
Definition: BMatrix.h:29
CostFct_ const & j_
Definition: BMatrix.h:38
ControlIncrement< MODEL > CtrlInc_
Definition: BMatrix.h:28
The matrix.
Definition: BMatrix.h:27
void multiplyB(const CtrlInc_ &, CtrlInc_ &) const
Multiply by covariance matrix and its inverse.
Definition: CostJbTotal.h:271
void multiply(const CtrlInc_ &x, CtrlInc_ &bx) const
Definition: BMatrix.h:33