[624] | 1 | /*! |
---|
| 2 | \file axis_algorithm_transformation.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 14 May 2015 |
---|
[630] | 5 | \date 29 June 2015 |
---|
[624] | 6 | |
---|
| 7 | \brief Interface for all axis transformation algorithms. |
---|
| 8 | */ |
---|
[620] | 9 | #ifndef __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 10 | #define __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 11 | |
---|
| 12 | #include "generic_algorithm_transformation.hpp" |
---|
| 13 | #include "axis.hpp" |
---|
| 14 | |
---|
| 15 | namespace xios { |
---|
| 16 | |
---|
[624] | 17 | /*! |
---|
| 18 | \class CAxisAlgorithmTransformation |
---|
| 19 | Algorithms for axis. |
---|
| 20 | */ |
---|
[620] | 21 | class CAxisAlgorithmTransformation : public virtual CGenericAlgorithmTransformation |
---|
| 22 | { |
---|
| 23 | public: |
---|
[622] | 24 | CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource); |
---|
[620] | 25 | |
---|
[621] | 26 | virtual ~CAxisAlgorithmTransformation(); |
---|
| 27 | |
---|
[620] | 28 | protected: |
---|
[630] | 29 | virtual void computeGlobalGridIndexFromGlobalIndexElement(int axisDestGlobalIndex, |
---|
[620] | 30 | const std::vector<int>& axisSrcGlobalIndex, |
---|
[827] | 31 | const std::vector<int>& destGlobalIndexPositionInGrid, |
---|
[620] | 32 | int axisPositionInGrid, |
---|
| 33 | const std::vector<int>& gridDestGlobalDim, |
---|
[631] | 34 | const std::vector<int>& gridSrcGlobalDim, |
---|
[829] | 35 | const GlobalLocalMap& globalLocalIndexDestSendToServerMap, |
---|
| 36 | std::vector<std::pair<size_t,int> >& globalLocalIndexDestMap, |
---|
[630] | 37 | std::vector<std::vector<size_t> >& globalIndexSrcGrid); |
---|
[624] | 38 | |
---|
[827] | 39 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
| 40 | |
---|
[620] | 41 | protected: |
---|
[624] | 42 | //! Global index of an axis on grid destination |
---|
[622] | 43 | std::vector<int> axisDestGlobalIndex_; |
---|
[624] | 44 | |
---|
| 45 | //! Size of |
---|
[622] | 46 | int axisDestGlobalSize_; |
---|
[620] | 47 | |
---|
[630] | 48 | //! Axis on grid destination |
---|
| 49 | CAxis* axisDest_; |
---|
| 50 | |
---|
| 51 | //! Axis on grid source |
---|
| 52 | CAxis* axisSrc_; |
---|
[620] | 53 | }; |
---|
| 54 | |
---|
| 55 | } |
---|
| 56 | #endif // __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__ |
---|