11 #ifndef OOPS_INTERFACE_GEOMETRY_H_ 12 #define OOPS_INTERFACE_GEOMETRY_H_ 18 #include <boost/shared_ptr.hpp> 21 #include "oops/util/Logger.h" 22 #include "oops/util/ObjectCounter.h" 23 #include "oops/util/Printable.h" 24 #include "oops/util/Timer.h" 34 template <
typename MODEL>
36 private util::ObjectCounter<Geometry<MODEL> > {
41 static const std::string
classname() {
return "oops::Geometry";}
43 explicit Geometry(
const eckit::Configuration &);
45 explicit Geometry(boost::shared_ptr<const Geometry_>);
48 std::vector<int>
getDims()
const;
50 std::vector<double>
getLats()
const;
51 std::vector<double>
getLons()
const;
52 std::vector<double>
getLevs()
const;
53 std::vector<double>
getArea()
const;
54 std::vector<int>
getMask(
const int &)
const;
65 void print(std::ostream &)
const;
66 boost::shared_ptr<const Geometry_>
geom_;
71 template <
typename MODEL>
73 Log::trace() <<
"Geometry<MODEL>::Geometry starting" << std::endl;
74 util::Timer timer(
classname(),
"Geometry");
76 Log::trace() <<
"Geometry<MODEL>::Geometry done" << std::endl;
81 template <
typename MODEL>
83 Log::trace() <<
"Geometry<MODEL>::Geometry copy done" << std::endl;
88 template <
typename MODEL>
90 Log::trace() <<
"Geometry<MODEL>::Geometry shared_ptr done" << std::endl;
95 template <
typename MODEL>
97 Log::trace() <<
"Geometry<MODEL>::~Geometry starting" << std::endl;
98 util::Timer timer(classname(),
"~Geometry");
100 Log::trace() <<
"Geometry<MODEL>::~Geometry done" << std::endl;
105 template <
typename MODEL>
107 Log::trace() <<
"Geometry<MODEL>::getDims" << std::endl;
108 util::Timer timer(classname(),
"getDims");
109 return geom_.getDims();
114 template <
typename MODEL>
116 Log::trace() <<
"Geometry<MODEL>::getLats" << std::endl;
117 util::Timer timer(classname(),
"getLats");
118 return geom_.getLats();
123 template <
typename MODEL>
125 Log::trace() <<
"Geometry<MODEL>::getLons" << std::endl;
126 util::Timer timer(classname(),
"getLons");
127 return geom_.getLons();
132 template <
typename MODEL>
134 Log::trace() <<
"Geometry<MODEL>::getLevs" << std::endl;
135 util::Timer timer(classname(),
"getLevs");
136 return geom_.getLevs();
141 template <
typename MODEL>
143 Log::trace() <<
"Geometry<MODEL>::getArea" << std::endl;
144 util::Timer timer(classname(),
"getAra");
145 return geom_.getArea();
150 template <
typename MODEL>
152 Log::trace() <<
"Geometry<MODEL>::getMask" << std::endl;
153 util::Timer timer(classname(),
"getMask");
154 return geom_.getMask();
159 template <
typename MODEL>
161 Log::trace() <<
"Geometry<MODEL>::begin starting" << std::endl;
162 util::Timer timer(classname(),
"begin");
164 Log::trace() <<
"Geometry<MODEL>::begin done" << std::endl;
169 template <
typename MODEL>
171 Log::trace() <<
"Geometry<MODEL>::end starting" << std::endl;
172 util::Timer timer(classname(),
"end");
174 Log::trace() <<
"Geometry<MODEL>::end done" << std::endl;
179 template <
typename MODEL>
181 Log::trace() <<
"Geometry<MODEL>::print starting" << std::endl;
182 util::Timer timer(classname(),
"print");
184 Log::trace() <<
"Geometry<MODEL>::print done" << std::endl;
191 #endif // OOPS_INTERFACE_GEOMETRY_H_ boost::shared_ptr< const Geometry_ > geom_
GeometryIterator_ end() const
std::vector< double > getArea() const
void print(std::ostream &) const
std::vector< int > getMask(const int &) const
std::vector< int > getDims() const
MODEL::Geometry Geometry_
The namespace for the main oops code.
std::vector< double > getLevs() const
Geometry & operator=(const Geometry &)
std::vector< double > getLons() const
static const std::string classname()
const Geometry_ & geometry() const
Interfacing.
std::vector< double > getLats() const
Geometry(const eckit::Configuration &)
GeometryIterator< MODEL > GeometryIterator_
GeometryIterator_ begin() const