MPAS-JEDI
LinVarChaC2A.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2021 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 #pragma once
9 
10 #include <memory>
11 #include <ostream>
12 #include <string>
13 
14 #include "eckit/config/Configuration.h"
15 
16 #include "oops/base/Variables.h"
17 #include "oops/util/Printable.h"
18 
19 #include "mpasjedi/GeometryMPAS.h"
21 
22 // Forward declarations
23 namespace eckit {
24  class Configuration;
25 }
26 
27 namespace oops {
28  class Variables;
29 }
30 
31 namespace mpas {
32  class GeometryMPAS;
33  class StateMPAS;
34  class IncrementMPAS;
35 
36 // -----------------------------------------------------------------------------
37 class LinVarChaC2A: public util::Printable {
38  public:
39  static const std::string classname() {return "mpas::LinVarChaC2A";}
40  explicit LinVarChaC2A(const StateMPAS &, const StateMPAS &, const GeometryMPAS &,
41  const eckit::Configuration &);
42  ~LinVarChaC2A();
43  // Perform linear multiplications
44  void multiply(const IncrementMPAS &, IncrementMPAS &) const;
45  void multiplyInverse(const IncrementMPAS &, IncrementMPAS &) const;
46  void multiplyAD(const IncrementMPAS &, IncrementMPAS &) const;
47  void multiplyInverseAD(const IncrementMPAS &, IncrementMPAS &) const;
48 
49  private:
50  std::shared_ptr<const GeometryMPAS> geom_;
51  oops::Variables vars_;
53  void print(std::ostream &) const override;
54 };
55 // -----------------------------------------------------------------------------
56 
57 } // namespace mpas
GeometryMPAS handles geometry for MPAS model.
Definition: GeometryMPAS.h:37
Increment Class: Difference between two states.
Definition: IncrementMPAS.h:57
void multiplyInverse(const IncrementMPAS &, IncrementMPAS &) const
Definition: LinVarChaC2A.cc:58
static const std::string classname()
Definition: LinVarChaC2A.h:39
void multiply(const IncrementMPAS &, IncrementMPAS &) const
Definition: LinVarChaC2A.cc:49
oops::Variables vars_
Definition: LinVarChaC2A.h:51
void multiplyAD(const IncrementMPAS &, IncrementMPAS &) const
Definition: LinVarChaC2A.cc:67
std::shared_ptr< const GeometryMPAS > geom_
Definition: LinVarChaC2A.h:50
F90lvc_C2A keyFtnConfig_
Definition: LinVarChaC2A.h:52
void multiplyInverseAD(const IncrementMPAS &, IncrementMPAS &) const
Definition: LinVarChaC2A.cc:76
LinVarChaC2A(const StateMPAS &, const StateMPAS &, const GeometryMPAS &, const eckit::Configuration &)
Definition: LinVarChaC2A.cc:29
void print(std::ostream &) const override
Definition: LinVarChaC2A.cc:85
MPAS model state.
Definition: StateMPAS.h:51
Definition: Fortran.h:17