11 #ifndef OOPS_INTERFACE_GEOVALS_H_ 12 #define OOPS_INTERFACE_GEOVALS_H_ 16 #include <boost/noncopyable.hpp> 17 #include <boost/scoped_ptr.hpp> 19 #include "eckit/config/Configuration.h" 22 #include "oops/util/ObjectCounter.h" 23 #include "oops/util/Printable.h" 24 #include "oops/util/Timer.h" 29 template <
typename MODEL>
31 private util::ObjectCounter<GeoVaLs<MODEL> > {
36 static const std::string
classname() {
return "oops::GeoVaLs";}
59 void read(
const eckit::Configuration &);
61 void write(
const eckit::Configuration &)
const;
64 void print(std::ostream &)
const;
70 template <
typename MODEL>
72 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs starting" << std::endl;
73 util::Timer timer(
classname(),
"GeoVaLs");
75 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs done" << std::endl;
80 template <
typename MODEL>
83 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs read starting" << std::endl;
84 util::Timer timer(
classname(),
"GeoVaLs");
86 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs read done" << std::endl;
91 template <
typename MODEL>
93 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs starting" << std::endl;
94 util::Timer timer(
classname(),
"GeoVaLs");
96 Log::trace() <<
"ObsVector<MODEL>::GeoVaLs done" << std::endl;
101 template <
typename MODEL>
103 Log::trace() <<
"GeoVaLs<MODEL>::~GeoVaLs starting" << std::endl;
104 util::Timer timer(classname(),
"~GeoVaLs");
106 Log::trace() <<
"GeoVaLs<MODEL>::~GeoVaLs done" << std::endl;
111 template <
typename MODEL>
113 Log::trace() <<
"GeoVaLs<MODEL>::dot_product_with starting" << std::endl;
114 util::Timer timer(classname(),
"dot_product_with");
115 double zz = gvals_->dot_product_with(*other.
gvals_);
116 Log::trace() <<
"GeoVaLs<MODEL>::dot_product_with done" << std::endl;
122 template <
typename MODEL>
124 Log::trace() <<
"GeoVaLs<MODEL>::operator= starting" << std::endl;
125 util::Timer timer(classname(),
"operator=");
127 Log::trace() <<
"GeovaLs<MODEL>::operator= done" << std::endl;
133 template <
typename MODEL>
135 Log::trace() <<
"GeoVaLs<MODEL>::+=(GeoVaLs, GeoVaLs) starting" << std::endl;
136 util::Timer timer(classname(),
"operator+=");
138 Log::trace() <<
"GeoVaLs<MODEL>::+= done" << std::endl;
144 template <
typename MODEL>
146 Log::trace() <<
"GeoVaLs<MODEL>::-=(GeoVaLs, GeoVaLs) starting" << std::endl;
147 util::Timer timer(classname(),
"operator-=");
149 Log::trace() <<
"GeoVaLs<MODEL>::+= done" << std::endl;
162 template <
typename MODEL>
164 Log::trace() <<
"GeoVaLs<MODEL>::/=(GeoVaLs, GeoVaLs) starting" << std::endl;
165 util::Timer timer(classname(),
"operator/=");
167 Log::trace() <<
"GeoVaLs<MODEL>::+= done" << std::endl;
173 template<
typename MODEL>
175 Log::trace() <<
"GeoVaLs<MODEL>::operator*= starting" << std::endl;
176 util::Timer timer(classname(),
"operator*=");
178 Log::trace() <<
"GeoVaLs<MODEL>::operator*= done" << std::endl;
184 template <
typename MODEL>
186 Log::trace() <<
"GeoVaLs<MODEL>::abs starting" << std::endl;
187 util::Timer timer(classname(),
"abs");
189 Log::trace() <<
"GeoVaLs<MODEL>::abs done" << std::endl;
193 template <
typename MODEL>
195 Log::trace() <<
"GeoVaLs<MODEL>::zero starting" << std::endl;
196 util::Timer timer(classname(),
"zero");
198 Log::trace() <<
"GeoVaLs<MODEL>::zero done" << std::endl;
203 template <
typename MODEL>
205 Log::trace() <<
"GeoVaLs<MODEL>::norm starting" << std::endl;
206 util::Timer timer(classname(),
"norm");
207 double zz = gvals_->norm();
208 Log::trace() <<
"GeoVaLs<MODEL>::norm done" << std::endl;
214 template <
typename MODEL>
216 Log::trace() <<
"GeoVaLs<MODEL>::random starting" << std::endl;
217 util::Timer timer(classname(),
"random");
219 Log::trace() <<
"GeoVaLs<MODEL>::random done" << std::endl;
224 template<
typename MODEL>
226 Log::trace() <<
"GeoVaLs<MODEL>::read starting" << std::endl;
227 util::Timer timer(classname(),
"read");
229 Log::trace() <<
"GeoVaLs<MODEL>::read done" << std::endl;
234 template<
typename MODEL>
236 Log::trace() <<
"GeoVaLs<MODEL>::write starting" << std::endl;
237 util::Timer timer(classname(),
"write");
239 Log::trace() <<
"GeoVaLs<MODEL>::write done" << std::endl;
264 template <
typename MODEL>
266 const eckit::Configuration &
conf) {
267 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs analytic init starting" << std::endl;
268 util::Timer timer(classname(),
"GeoVaLs");
270 Log::trace() <<
"GeoVaLs<MODEL>::GeoVaLs analytic init done" << std::endl;
275 template<
typename MODEL>
277 Log::trace() <<
"GeoVaLs<MODEL>::print starting" << std::endl;
278 util::Timer timer(classname(),
"print");
280 Log::trace() <<
"GeoVaLs<MODEL>::print done" << std::endl;
287 #endif // OOPS_INTERFACE_GEOVALS_H_ const GeoVaLs_ & geovals() const
Interfacing.
Locations< MODEL > Locations_
GeoVaLs & operator=(const GeoVaLs &)
GeoVaLs & operator+=(const GeoVaLs &)
GeoVaLs & operator-=(const GeoVaLs &)
void abs()
Linear algebra and utilities, mostly for writing tests.
boost::scoped_ptr< GeoVaLs_ > gvals_
const Locations_ & locations() const
Interfacing.
The namespace for the main oops code.
void write(const eckit::Configuration &) const
GeoVaLs & operator*=(const double &)
void analytic_init(const Locations_ &, const eckit::Configuration &)
GeoVaLs Analytic Initialization.
void read(const eckit::Configuration &)
GeoVaLs & operator/=(const GeoVaLs &)
GeoVaLs Normalization Operator.
GeoVaLs(const Locations_ &, const Variables &)
static const std::string classname()
double dot_product_with(const GeoVaLs &) const
void print(std::ostream &) const