1 | /*! |
---|
2 | \file scalar_algorithm_reduce_scalar.hpp |
---|
3 | \author Ha NGUYEN |
---|
4 | \since 23 June 2016 |
---|
5 | \date 23 June 2016 |
---|
6 | |
---|
7 | \brief Algorithm for reduce an axis to a scalar |
---|
8 | */ |
---|
9 | #ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|
10 | #define __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|
11 | |
---|
12 | #include "algorithm_transformation_reduce.hpp" |
---|
13 | #include "transformation.hpp" |
---|
14 | |
---|
15 | namespace xios { |
---|
16 | |
---|
17 | class CScalar; |
---|
18 | class CAxis; |
---|
19 | class CReduceAxisToScalar; |
---|
20 | class CReductionAlgorithm; |
---|
21 | |
---|
22 | /*! |
---|
23 | \class CScalarAlgorithmReduceAxis |
---|
24 | Reducing an axis to a scalar |
---|
25 | */ |
---|
26 | class CScalarAlgorithmReduceAxis : public CAlgorithmTransformationReduce |
---|
27 | { |
---|
28 | public: |
---|
29 | CScalarAlgorithmReduceAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo); |
---|
30 | |
---|
31 | |
---|
32 | virtual ~CScalarAlgorithmReduceAxis(); |
---|
33 | |
---|
34 | static bool registerTrans(); |
---|
35 | |
---|
36 | |
---|
37 | public: |
---|
38 | static CGenericAlgorithmTransformation* create(bool isSource, CGrid* gridDst, CGrid* gridSrc, |
---|
39 | CTransformation<CScalar>* transformation, |
---|
40 | int elementPositionInGrid, |
---|
41 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
42 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
43 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
44 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
45 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
46 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
47 | static bool dummyRegistered_; |
---|
48 | }; |
---|
49 | |
---|
50 | } |
---|
51 | #endif // __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|