11 #ifndef OOPS_BASE_DEPARTURES_H_ 12 #define OOPS_BASE_DEPARTURES_H_ 19 #include <boost/shared_ptr.hpp> 28 #include "oops/util/DateTime.h" 29 #include "oops/util/dot_product.h" 30 #include "oops/util/Duration.h" 31 #include "oops/util/Logger.h" 32 #include "oops/util/Printable.h" 48 template <
typename MODEL>
61 explicit Departures(std::vector<boost::shared_ptr<ObsVector_> >);
83 void save(
const std::string &)
const;
86 void print(std::ostream &)
const;
88 std::vector<boost::shared_ptr<ObsVector_> >
dep_;
93 template<
typename MODEL>
96 for (std::size_t jj = 0; jj < obsgeom.
size(); ++jj) {
97 boost::shared_ptr<ObsVector_>
tmp(
new ObsVector_(obsgeom[jj]));
100 Log::trace() <<
"Departures created" << std::endl;
103 template<
typename MODEL>
107 Log::trace() <<
"Departures created" << std::endl;
110 template<
typename MODEL>
114 for (std::size_t jj = 0; jj < other.
dep_.size(); ++jj) {
118 Log::trace() <<
"Departures copy-created" << std::endl;
121 template<
typename MODEL>
123 Log::trace() <<
"Departures destructed" << std::endl;
126 template<
typename MODEL>
128 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
129 *dep_[jj] = *rhs.
dep_[jj];
134 template<
typename MODEL>
136 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
137 *dep_[jj] += *rhs.
dep_[jj];
142 template<
typename MODEL>
144 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
145 *dep_[jj] -= *rhs.
dep_[jj];
150 template<
typename MODEL>
152 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
158 template<
typename MODEL>
160 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
161 *dep_[jj] *= *rhs.
dep_[jj];
166 template<
typename MODEL>
168 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
169 *dep_[jj] /= *rhs.
dep_[jj];
174 template<
typename MODEL>
176 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
181 template<
typename MODEL>
183 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
188 template<
typename MODEL>
190 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
191 dep_[jj]->axpy(zz, *rhs.
dep_[jj]);
195 template<
typename MODEL>
198 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
199 zz += dot_product(*dep_[jj], *other.
dep_[jj]);
204 template <
typename MODEL>
206 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
207 dep_[jj]->save(
name);
211 template <
typename MODEL>
213 for (std::size_t jj = 0; jj < dep_.size(); ++jj) {
220 #endif // OOPS_BASE_DEPARTURES_H_ ObsSpaces< MODEL > ObsSpace_
Departures(const ObsSpace_ &)
ObsAuxIncrement< MODEL > ObsAuxIncr_
Departures & operator=(const Departures &)
void axpy(const double &, const Departures &)
Difference between two observation vectors.
const ObsVector_ & operator[](const std::size_t ii) const
GeoVaLs< MODEL > GeoVaLs_
The namespace for the main oops code.
void save(const std::string &) const
Save departures values.
void print(std::ostream &) const
Departures & operator*=(const double &)
ObsVector< MODEL > ObsVector_
Departures & operator/=(const Departures &)
Abstract base class for quantities.
ObsErrorBase< MODEL > ObsErrorBase_
Base class for observation error covariance matrices.
double dot_product_with(const Departures &) const
ObsVector_ & operator[](const std::size_t ii)
std::vector< boost::shared_ptr< ObsVector_ > > dep_
Departures & operator+=(const Departures &)
std::size_t size() const
Access.
Departures & operator-=(const Departures &)
std::size_t size() const
Access.
LinearObsOperator< MODEL > LinearObsOperator_