FV3 Bundle
IdVariableChange.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 UCAR.
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  */
7 
8 #ifndef OOPS_GENERIC_IDVARIABLECHANGE_H_
9 #define OOPS_GENERIC_IDVARIABLECHANGE_H_
10 
11 #include <ostream>
12 #include <string>
13 
17 #include "oops/interface/State.h"
18 #include "oops/util/Printable.h"
19 
20 // Forward declarations
21 namespace eckit {
22  class Configuration;
23 }
24 
25 namespace oops {
26 
27 // -----------------------------------------------------------------------------
28 /// Lorenz 95: no change of variable
29 
30 template <typename MODEL>
35  public:
36  static const std::string classname() {return "oops::IdVariableChange";}
37 
38  IdVariableChange(const State_ &, const State_ &, const Geometry_ &,
39  const eckit::Configuration & conf): LinearVariableChangeBase<MODEL>(conf) {}
40  virtual ~IdVariableChange() {}
41 
42 /// Perform linear transforms
43  void multiply(const Increment_ & dx1, Increment_ & dx2) const {dx2 = dx1;}
44  void multiplyInverse(const Increment_ & dx1, Increment_ & dx2) const {dx2 = dx1;}
45  void multiplyAD(const Increment_ & dx1, Increment_ & dx2) const {dx2 = dx1;}
46  void multiplyInverseAD(const Increment_ & dx1, Increment_ & dx2) const {dx2 = dx1;}
47 
48  private:
49  void print(std::ostream &) const override {}
50 };
51 
52 // -----------------------------------------------------------------------------
53 
54 } // namespace oops
55 #endif // OOPS_GENERIC_IDVARIABLECHANGE_H_
Geometry< MODEL > Geometry_
void print(std::ostream &) const override
Definition: conf.py:1
Lorenz 95: no change of variable.
Encapsulates the model state.
Increment< MODEL > Increment_
The namespace for the main oops code.
IdVariableChange(const State_ &, const State_ &, const Geometry_ &, const eckit::Configuration &conf)
void multiply(const Increment_ &dx1, Increment_ &dx2) const
Perform linear transforms.
Base class for generic variable transform.
void multiplyAD(const Increment_ &dx1, Increment_ &dx2) const
void multiplyInverse(const Increment_ &dx1, Increment_ &dx2) const
Increment Class: Difference between two states.
static const std::string classname()
void multiplyInverseAD(const Increment_ &dx1, Increment_ &dx2) const