FV3 Bundle
GridPoint.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_BASE_GRIDPOINT_H_
12 #define OOPS_BASE_GRIDPOINT_H_
13 
14 #include <string>
15 #include <vector>
16 
17 #include "oops/base/Variables.h"
18 #include "oops/util/Printable.h"
19 
20 namespace oops {
21 
22 class GridPoint: public util::Printable {
23  public:
24  GridPoint(const oops::Variables vars, std::vector<double> vals, std::vector<int> varlens)
25  : vars_(vars), vals_(vals), varlens_(varlens) {}
27 
28  const std::vector<double> getVals() {return vals_;}
29  private:
30  void print(std::ostream & os) const {
31  os << "GridPoint, size: " << vals_.size() << ", first element: " << vals_[0] << std::endl; }
33  const std::vector<double> vals_; // data in flat array
34  const std::vector<int> varlens_; // vector containing nlevs for each variable
35 };
36 
37 } // namespace oops
38 
39 #endif // OOPS_BASE_GRIDPOINT_H_
const std::vector< double > getVals()
Definition: GridPoint.h:28
const std::vector< int > varlens_
Definition: GridPoint.h:34
void print(std::ostream &os) const
Definition: GridPoint.h:30
The namespace for the main oops code.
const std::vector< double > vals_
Definition: GridPoint.h:33
const oops::Variables vars_
Definition: GridPoint.h:32
GridPoint(const oops::Variables vars, std::vector< double > vals, std::vector< int > varlens)
Definition: GridPoint.h:24