[1985] | 1 | /*! |
---|
| 2 | \file scalar_algorithm_reduce_scalar.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 13 Oct 2016 |
---|
| 5 | \date 13 Oct 2016 |
---|
| 6 | |
---|
| 7 | \brief Algorithm for reduce an DOMAIN to a scalar |
---|
| 8 | */ |
---|
| 9 | #ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__ |
---|
| 10 | #define __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__ |
---|
| 11 | |
---|
[1999] | 12 | #include "algorithm_transformation_reduce.hpp" |
---|
[1985] | 13 | #include "transformation.hpp" |
---|
| 14 | |
---|
| 15 | namespace xios { |
---|
| 16 | |
---|
| 17 | class CScalar; |
---|
| 18 | class CDomain; |
---|
| 19 | class CReduceDomainToScalar; |
---|
| 20 | class CReductionAlgorithm; |
---|
| 21 | |
---|
| 22 | /*! |
---|
| 23 | \class CScalarAlgorithmReduceDomain |
---|
| 24 | Reducing an DOMAIN to a scalar |
---|
| 25 | */ |
---|
[1999] | 26 | class CScalarAlgorithmReduceDomain : public CAlgorithmTransformationReduce |
---|
[1985] | 27 | { |
---|
| 28 | public: |
---|
[1988] | 29 | CScalarAlgorithmReduceDomain(bool isSource, CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo); |
---|
[1985] | 30 | |
---|
| 31 | virtual ~CScalarAlgorithmReduceDomain(); |
---|
| 32 | |
---|
| 33 | static bool registerTrans(); |
---|
| 34 | |
---|
[2145] | 35 | virtual StdString getAlgoName() {return "\\nreduce_domain";} |
---|
| 36 | |
---|
[1985] | 37 | protected: |
---|
[1999] | 38 | CDomain* domainSrc_ ; |
---|
[1985] | 39 | |
---|
| 40 | |
---|
[2011] | 41 | public: |
---|
[2270] | 42 | static shared_ptr<CGenericAlgorithmTransformation> create(bool isSource, CGrid* gridDst, CGrid* gridSrc, |
---|
[1985] | 43 | CTransformation<CScalar>* transformation, |
---|
| 44 | int elementPositionInGrid, |
---|
| 45 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 46 | std::map<int, int>& elementPositionInGridSrc2DOMAINPosition, |
---|
| 47 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 48 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 49 | std::map<int, int>& elementPositionInGridDst2DOMAINPosition, |
---|
| 50 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
| 51 | static bool dummyRegistered_; |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | } |
---|
| 55 | #endif // __XIOS_SCALAR_ALGORITHM_REDUCE_DOMAIN_HPP__ |
---|