11 #ifndef OOPS_INTERFACE_OBSAUXINCREMENT_H_ 12 #define OOPS_INTERFACE_OBSAUXINCREMENT_H_ 17 #include <boost/scoped_ptr.hpp> 20 #include "oops/util/Logger.h" 21 #include "oops/util/ObjectCounter.h" 22 #include "oops/util/Printable.h" 23 #include "oops/util/Timer.h" 33 template <
typename MODEL>
35 private util::ObjectCounter<ObsAuxIncrement<MODEL> > {
40 static const std::string
classname() {
return "oops::ObsAuxIncrement";}
63 void read(
const eckit::Configuration &);
64 void write(
const eckit::Configuration &)
const;
68 void print(std::ostream &)
const;
69 boost::scoped_ptr<ObsAuxIncrement_>
aux_;
74 template <
typename MODEL>
76 Log::trace() <<
"operator+=(ObsAuxControl, ObsAuxIncrement) starting" << std::endl;
77 util::Timer timer(
"oops::ObsAuxIncrement",
"operator+=ObsAuxControl");
79 Log::trace() <<
"operator+=(ObsAuxControl, ObsAuxIncrement) done" << std::endl;
85 template<
typename MODEL>
88 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement starting" << std::endl;
89 util::Timer timer(
classname(),
"ObsAuxIncrement");
91 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement done" << std::endl;
94 template<
typename MODEL>
96 const bool copy) : aux_()
98 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement copy starting" << std::endl;
99 util::Timer timer(
classname(),
"ObsAuxIncrement");
101 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement copy done" << std::endl;
104 template<
typename MODEL>
106 const eckit::Configuration &
conf) : aux_()
108 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement interpolated starting" << std::endl;
109 util::Timer timer(
classname(),
"ObsAuxIncrement");
111 Log::trace() <<
"ObsAuxIncrement<MODEL>::ObsAuxIncrement interpolated done" << std::endl;
114 template<
typename MODEL>
116 Log::trace() <<
"ObsAuxIncrement<MODEL>::~ObsAuxIncrement starting" << std::endl;
117 util::Timer timer(classname(),
"~ObsAuxIncrement");
119 Log::trace() <<
"ObsAuxIncrement<MODEL>::~ObsAuxIncrement done" << std::endl;
122 template<
typename MODEL>
124 Log::trace() <<
"ObsAuxIncrement<MODEL>::diff starting" << std::endl;
125 util::Timer timer(classname(),
"diff");
127 Log::trace() <<
"ObsAuxIncrement<MODEL>::diff done" << std::endl;
130 template<
typename MODEL>
132 Log::trace() <<
"ObsAuxIncrement<MODEL>::zero starting" << std::endl;
133 util::Timer timer(classname(),
"zero");
135 Log::trace() <<
"ObsAuxIncrement<MODEL>::zero done" << std::endl;
138 template<
typename MODEL>
140 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator= starting" << std::endl;
141 util::Timer timer(classname(),
"operator=");
143 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator= done" << std::endl;
147 template<
typename MODEL>
149 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator+= starting" << std::endl;
150 util::Timer timer(classname(),
"operator+=");
152 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator+= done" << std::endl;
156 template<
typename MODEL>
158 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator-= starting" << std::endl;
159 util::Timer timer(classname(),
"operator-=");
161 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator-= done" << std::endl;
165 template<
typename MODEL>
167 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator*= starting" << std::endl;
168 util::Timer timer(classname(),
"operator*=");
170 Log::trace() <<
"ObsAuxIncrement<MODEL>::operator*= done" << std::endl;
174 template<
typename MODEL>
176 Log::trace() <<
"ObsAuxIncrement<MODEL>::axpy starting" << std::endl;
177 util::Timer timer(classname(),
"axpy");
178 aux_->axpy(zz, *dx.
aux_);
179 Log::trace() <<
"ObsAuxIncrement<MODEL>::axpy done" << std::endl;
182 template<
typename MODEL>
184 Log::trace() <<
"ObsAuxIncrement<MODEL>::dot_product_with starting" << std::endl;
185 util::Timer timer(classname(),
"dot_product_with");
186 double zz = aux_->dot_product_with(*dx.
aux_);
187 Log::trace() <<
"ObsAuxIncrement<MODEL>::dot_product_with done" << std::endl;
191 template<
typename MODEL>
193 Log::trace() <<
"ObsAuxIncrement<MODEL>::read starting" << std::endl;
194 util::Timer timer(classname(),
"read");
196 Log::trace() <<
"ObsAuxIncrement<MODEL>::read done" << std::endl;
199 template<
typename MODEL>
201 Log::trace() <<
"ObsAuxIncrement<MODEL>::write starting" << std::endl;
202 util::Timer timer(classname(),
"write");
204 Log::trace() <<
"ObsAuxIncrement<MODEL>::write done" << std::endl;
207 template<
typename MODEL>
209 Log::trace() <<
"ObsAuxIncrement<MODEL>::norm starting" << std::endl;
210 util::Timer timer(classname(),
"norm");
211 double zz = aux_->norm();
212 Log::trace() <<
"ObsAuxIncrement<MODEL>::norm done" << std::endl;
216 template<
typename MODEL>
218 Log::trace() <<
"ObsAuxIncrement<MODEL>::print starting" << std::endl;
219 util::Timer timer(classname(),
"print");
221 Log::trace() <<
"ObsAuxIncrement<MODEL>::print done" << std::endl;
227 #endif // OOPS_INTERFACE_OBSAUXINCREMENT_H_ ObsAuxIncrement(const eckit::Configuration &)
Constructor, destructor.
MODEL::ObsAuxIncrement ObsAuxIncrement_
ObsAuxIncrement & operator-=(const ObsAuxIncrement &)
void diff(const ObsAuxControl_ &, const ObsAuxControl_ &)
Linear algebra operators.
double dot_product_with(const ObsAuxIncrement &) const
subroutine, public copy(self, rhs)
ObsAuxIncrement & operator+=(const ObsAuxIncrement &)
const ObsAuxIncrement_ & obsauxincrement() const
Interfacing.
State< MODEL > & operator+=(State< MODEL > &xx, const Increment< MODEL > &dx)
The namespace for the main oops code.
ObsAuxIncrement & operator=(const ObsAuxIncrement &)
static const std::string classname()
void print(std::ostream &) const
ObsAuxControl< MODEL > ObsAuxControl_
boost::scoped_ptr< ObsAuxIncrement_ > aux_
void read(const eckit::Configuration &)
I/O and diagnostics.
ObsAuxIncrement & operator*=(const double &)
void axpy(const double &, const ObsAuxIncrement &)
ObsAuxIncrement_ & obsauxincrement()
void write(const eckit::Configuration &) const
const ObsAuxControl_ & obsauxcontrol() const
Interfacing.