OOPS
GeometryQGIterator.cc
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 #include "eckit/config/Configuration.h"
13 #include "model/QgFortran.h"
14 #include "oops/util/Logger.h"
15 
16 // -----------------------------------------------------------------------------
17 
18 namespace qg {
19 
20 // -----------------------------------------------------------------------------
21 
24 }
25 
26 // -----------------------------------------------------------------------------
27 
28 GeometryQGIterator::GeometryQGIterator(const GeometryQG& geom, const int & index) {
30 }
31 
32 
33 // -----------------------------------------------------------------------------
34 
37 }
38 
39 // -----------------------------------------------------------------------------
40 
42  int equals = 0;
43  qg_geom_iter_equals_f90(keyIter_, other.toFortran(), equals);
44  return (equals == 1);
45 }
46 
47 // -----------------------------------------------------------------------------
48 
50  int equals = 0;
51  qg_geom_iter_equals_f90(keyIter_, other.toFortran(), equals);
52  return (equals == 0);
53 }
54 
55 // -----------------------------------------------------------------------------
56 
57 eckit::geometry::Point2 GeometryQGIterator::operator*() const {
58  double lat, lon;
60  return eckit::geometry::Point2(lat, lon);
61 }
62 
63 // -----------------------------------------------------------------------------
64 
67  return *this;
68 }
69 
70 // -----------------------------------------------------------------------------
71 
72 void GeometryQGIterator::print(std::ostream & os) const {
73  os << "GeometryQGIterator, key: " << keyIter_ << std::endl;
74 }
75 
76 // -----------------------------------------------------------------------------
77 
78 } // namespace qg
qg
The namespace for the qg model.
Definition: qg/model/AnalyticInit.cc:13
qg::GeometryQGIterator::operator!=
bool operator!=(const GeometryQGIterator &) const
Definition: GeometryQGIterator.cc:49
QgFortran.h
qg::GeometryQGIterator::GeometryQGIterator
GeometryQGIterator(const GeometryQGIterator &)
Definition: GeometryQGIterator.cc:22
qg::qg_geom_iter_clone_f90
void qg_geom_iter_clone_f90(F90iter &, const F90iter &)
qg::qg_geom_iter_setup_f90
void qg_geom_iter_setup_f90(F90iter &, const F90geom &, const int &)
qg::qg_geom_iter_equals_f90
void qg_geom_iter_equals_f90(const F90iter &, const F90iter &, int &)
qg::GeometryQGIterator::toFortran
const F90iter & toFortran() const
Definition: GeometryQGIterator.h:46
qg::GeometryQG::toFortran
const F90geom & toFortran() const
Definition: GeometryQG.h:64
qg::GeometryQGIterator::print
void print(std::ostream &) const
Definition: GeometryQGIterator.cc:72
qg::GeometryQGIterator
Definition: GeometryQGIterator.h:33
qg::qg_geom_iter_current_f90
void qg_geom_iter_current_f90(const F90iter &, double &, double &)
qg::GeometryQGIterator::~GeometryQGIterator
~GeometryQGIterator()
Definition: GeometryQGIterator.cc:35
qg::qg_geom_iter_delete_f90
void qg_geom_iter_delete_f90(F90iter &)
qg::GeometryQGIterator::keyIter_
F90iter keyIter_
Definition: GeometryQGIterator.h:50
qg::GeometryQGIterator::operator*
eckit::geometry::Point2 operator*() const
Definition: GeometryQGIterator.cc:57
GeometryQGIterator.h
qg::qg_geom_iter_next_f90
void qg_geom_iter_next_f90(const F90iter &)
qg::GeometryQGIterator::operator++
GeometryQGIterator & operator++()
Definition: GeometryQGIterator.cc:65
qg::GeometryQG
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:54
qg::GeometryQGIterator::operator==
bool operator==(const GeometryQGIterator &) const
Definition: GeometryQGIterator.cc:41