IODA
InefficientDistribution.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2019 UCAR
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  */
7 
8 #include "ioda/distribution/InefficientDistribution.h"
9 
10 #include <algorithm>
11 #include <iostream>
12 #include <numeric>
13 
14 #include "oops/util/Logger.h"
15 
16 
17 namespace ioda {
18 // -----------------------------------------------------------------------------
19 InefficientDistribution::InefficientDistribution(const eckit::mpi::Comm & Comm) :
20  Distribution(Comm) {
21  oops::Log::trace() << "InefficientDistribution constructed" << std::endl;
22 }
23 
24 // -----------------------------------------------------------------------------
26  oops::Log::trace() << "InefficientDistribution destructed" << std::endl;
27 }
28 
29 // -----------------------------------------------------------------------------
30 /*!
31  * \brief Inefficient distribution
32  *
33  * \details This method distributes all observations to all processes.
34  *
35  * \param[in] RecNum Record number, checked if belongs on this process element
36  */
37 bool InefficientDistribution::isMyRecord(std::size_t RecNum) const {
38  return true;
39 }
40 
41 // -----------------------------------------------------------------------------
42 
43 } // namespace ioda
ioda::Distribution
class for distributing obs across multiple process elements
Definition: src/distribution/Distribution.h:30
ioda::InefficientDistribution::InefficientDistribution
InefficientDistribution(const eckit::mpi::Comm &Comm)
Definition: InefficientDistribution.cc:19
ioda::InefficientDistribution::~InefficientDistribution
~InefficientDistribution()
Definition: InefficientDistribution.cc:25
ioda
Definition: IodaUtils.cc:13
ioda::InefficientDistribution::isMyRecord
bool isMyRecord(std::size_t RecNum) const override
Inefficient distribution.
Definition: InefficientDistribution.cc:37