SABER
InterpolatorBump.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020- 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 SABER_INTERPOLATION_INTERPOLATORBUMP_H_
9 #define SABER_INTERPOLATION_INTERPOLATORBUMP_H_
10 
11 #include <ostream>
12 #include <string>
13 
14 #include "atlas/field.h"
15 #include "atlas/functionspace.h"
16 #include "eckit/config/Configuration.h"
17 #include "eckit/mpi/Comm.h"
18 
19 #include "oops/base/InterpolatorBase.h"
20 #include "oops/mpi/mpi.h"
21 #include "oops/util/ObjectCounter.h"
22 
23 namespace saber {
24 
25 // -----------------------------------------------------------------------------
26 
27 /*! \brief Interface for Bump interpolation
28  *
29  */
30 
31 class InterpolatorBump : public oops::InterpolatorBase,
32  private util::ObjectCounter<InterpolatorBump> {
33  public:
34  static const std::string classname() {return "saber::InterpolatorBump";}
35 
36  InterpolatorBump(const eckit::Configuration &,
37  const atlas::FunctionSpace &,
38  const atlas::FunctionSpace &,
39  const atlas::field::FieldSetImpl * = nullptr,
40  const eckit::mpi::Comm & = oops::mpi::world());
41 
43 
44  void apply(const atlas::FieldSet &, atlas::FieldSet &) override;
45  void apply(const atlas::Field &, atlas::Field &) override;
46  void apply_ad(const atlas::FieldSet &, atlas::FieldSet &) override;
47 
48  private:
50  void print(std::ostream &) const override;
51 };
52 
53 // -----------------------------------------------------------------------------
54 
55 
56 // gnu compilers want the Bump interpolator factory to be defined here.
57 static oops::InterpolatorMaker<InterpolatorBump> makerBumpInterpolator_("bump");
58 
59 } // namespace saber
60 
61 #endif // SABER_INTERPOLATION_INTERPOLATORBUMP_H_
saber::InterpolatorBump
Interface for Bump interpolation.
Definition: InterpolatorBump.h:32
saber::InterpolatorBump::apply_ad
void apply_ad(const atlas::FieldSet &, atlas::FieldSet &) override
Definition: InterpolatorBump.cc:53
saber::InterpolatorBump::apply
void apply(const atlas::FieldSet &, atlas::FieldSet &) override
Definition: InterpolatorBump.cc:38
saber::InterpolatorBump::InterpolatorBump
InterpolatorBump(const eckit::Configuration &, const atlas::FunctionSpace &, const atlas::FunctionSpace &, const atlas::field::FieldSetImpl *=nullptr, const eckit::mpi::Comm &=oops::mpi::world())
Definition: InterpolatorBump.cc:28
saber::makerBumpInterpolator_
static oops::InterpolatorMaker< InterpolatorBump > makerBumpInterpolator_("bump")
saber
Definition: type_bump.h:22
saber::InterpolatorBump::~InterpolatorBump
~InterpolatorBump()
Definition: InterpolatorBump.cc:60
saber::InterpolatorBump::keyBumpInterpolator_
int keyBumpInterpolator_
Definition: InterpolatorBump.h:49
saber::InterpolatorBump::print
void print(std::ostream &) const override
Definition: InterpolatorBump.cc:65
saber::InterpolatorBump::classname
static const std::string classname()
Definition: InterpolatorBump.h:34