FV3 Bundle
LocsL95.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 LORENZ95_LOCSL95_H_
12 #define LORENZ95_LOCSL95_H_
13 
14 #include <ostream>
15 #include <string>
16 #include <vector>
17 
18 #include "oops/util/ObjectCounter.h"
19 #include "oops/util/Printable.h"
20 
21 namespace eckit {
22  class Configuration;
23 }
24 
25 namespace lorenz95 {
26 
27 /// LocsL95 class to handle locations for L95 model.
28 class LocsL95 : public util::Printable,
29  private util::ObjectCounter<LocsL95> {
30  public:
31  static const std::string classname() {return "lorenz95::LocsL95";}
32 
33  LocsL95(const std::vector<int> &, const std::vector<double> &);
34  explicit LocsL95(const eckit::Configuration &);
35  ~LocsL95() {}
36 
37  size_t size() const {return locs_.size();}
38  const double & operator[](const size_t ii) const {return locs_.at(ii);}
39  const int & globalIndex(const size_t ii) const {return indx_.at(ii);}
40 
41  private:
42  void print(std::ostream & os) const;
43  std::vector<int> indx_;
44  std::vector<double> locs_;
45 };
46 
47 } // namespace lorenz95
48 
49 #endif // LORENZ95_LOCSL95_H_
const int & globalIndex(const size_t ii) const
Definition: LocsL95.h:39
std::vector< int > indx_
Definition: LocsL95.h:43
const double & operator[](const size_t ii) const
Definition: LocsL95.h:38
LocsL95(const std::vector< int > &, const std::vector< double > &)
LocsL95 class to handle locations for L95 model.
Definition: LocsL95.h:28
static const std::string classname()
Definition: LocsL95.h:31
The namespace for the L95 model.
std::vector< double > locs_
Definition: LocsL95.h:44
void print(std::ostream &os) const
size_t size() const
Definition: LocsL95.h:37