FV3 Bundle
Accumulator.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
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  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef OOPS_BASE_ACCUMULATOR_H_
12 #define OOPS_BASE_ACCUMULATOR_H_
13 
14 #include "oops/base/Variables.h"
16 #include "oops/util/DateTime.h"
17 
18 namespace oops {
19 
20 // -----------------------------------------------------------------------------
21 
22 template <typename MODEL, typename ACC, typename FLDS> class Accumulator : public ACC {
24  public:
25  explicit Accumulator(const Geometry_ & resol, const Variables & vars,
26  const util::DateTime & vt)
27  : ACC(resol, vars, vt) {ACC::zero();}
29 
30  void accumul(const double & zz, const FLDS & xx) {ACC::accumul(zz, xx);}
31 };
32 
33 // -----------------------------------------------------------------------------
34 
35 } // namespace oops
36 
37 #endif // OOPS_BASE_ACCUMULATOR_H_
Geometry< MODEL > Geometry_
Definition: Accumulator.h:23
The namespace for the main oops code.
real(double), parameter zero
real, dimension(:,:,:), allocatable vt
void accumul(const double &zz, const FLDS &xx)
Definition: Accumulator.h:30
Accumulator(const Geometry_ &resol, const Variables &vars, const util::DateTime &vt)
Definition: Accumulator.h:25