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