[1985] | 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 | |
---|
[1999] | 12 | #include "algorithm_transformation_reduce.hpp" |
---|
[1985] | 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 | */ |
---|
[1999] | 26 | class CScalarAlgorithmReduceAxis : public CAlgorithmTransformationReduce |
---|
[1985] | 27 | { |
---|
| 28 | public: |
---|
[1988] | 29 | CScalarAlgorithmReduceAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo); |
---|
[1985] | 30 | |
---|
| 31 | |
---|
| 32 | virtual ~CScalarAlgorithmReduceAxis(); |
---|
| 33 | |
---|
| 34 | static bool registerTrans(); |
---|
| 35 | |
---|
[2145] | 36 | virtual StdString getAlgoName() {return "\\nreduce_axis";} |
---|
[1985] | 37 | |
---|
[2011] | 38 | public: |
---|
[2270] | 39 | static shared_ptr<CGenericAlgorithmTransformation> create(bool isSource, CGrid* gridDst, CGrid* gridSrc, |
---|
[1985] | 40 | CTransformation<CScalar>* transformation, |
---|
| 41 | int elementPositionInGrid, |
---|
| 42 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 43 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 44 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 45 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 46 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 47 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
| 48 | static bool dummyRegistered_; |
---|
| 49 | }; |
---|
| 50 | |
---|
| 51 | } |
---|
| 52 | #endif // __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__ |
---|