[1314] | 1 | /*! |
---|

| 2 | \file axis_algorithm_reduce_domain.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 axis |
---|

| 8 | */ |
---|

| 9 | #ifndef __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__ |
---|

| 10 | #define __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__ |
---|

| 11 | |
---|

| 12 | #include "axis_algorithm_transformation.hpp" |
---|

| 13 | #include "transformation.hpp" |
---|

| 14 | |
---|

| 15 | namespace xios { |
---|

| 16 | |
---|

| 17 | class CAxis; |
---|

| 18 | class CScalar; |
---|

| 19 | class CDuplicateScalarToAxis; |
---|

| 20 | |
---|

| 21 | |
---|

| 22 | /*! |
---|

| 23 | \class CAxisAlgorithmDuplicateScalar |
---|

| 24 | Duplicate scalar into axis destination |
---|

| 25 | */ |
---|

| 26 | class CAxisAlgorithmDuplicateScalar : public CAxisAlgorithmTransformation |
---|

| 27 | { |
---|

| 28 | public: |
---|

| 29 | CAxisAlgorithmDuplicateScalar(CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo); |
---|

| 30 | |
---|

| 31 | virtual ~CAxisAlgorithmDuplicateScalar(); |
---|

| 32 | |
---|

| 33 | static bool registerTrans(); |
---|

| 34 | |
---|

| 35 | protected: |
---|

| 36 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|

| 37 | |
---|

| 38 | private: |
---|

| 39 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|

| 40 | CTransformation<CAxis>* 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 | }; |
---|

| 49 | |
---|

| 50 | } |
---|

| 51 | #endif // __XIOS_AXIS_ALGORITHM_DUPLICATE_SCALAR_HPP__ |
---|