[624] | 1 | /*! |
---|
| 2 | \file axis_algorithm_inverse.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 14 May 2015 |
---|
| 5 | \date 09 June 2015 |
---|
| 6 | |
---|
| 7 | \brief Algorithm for inversing an axis.. |
---|
| 8 | */ |
---|
[620] | 9 | #ifndef __XIOS_AXIS_ALGORITHM_INVERSE_HPP__ |
---|
| 10 | #define __XIOS_AXIS_ALGORITHM_INVERSE_HPP__ |
---|
| 11 | |
---|
[622] | 12 | #include "axis_algorithm_transformation.hpp" |
---|
[933] | 13 | #include "transformation.hpp" |
---|
[1053] | 14 | #ifdef _usingEP |
---|
| 15 | #include "ep_declaration.hpp" |
---|
| 16 | #endif |
---|
| 17 | |
---|
[620] | 18 | namespace xios { |
---|
[869] | 19 | |
---|
[933] | 20 | class CAxis; |
---|
| 21 | class CInverseAxis; |
---|
| 22 | |
---|
[624] | 23 | /*! |
---|
| 24 | \class CAxisAlgorithmInverse |
---|
| 25 | Inversing an axis |
---|
| 26 | */ |
---|
[623] | 27 | class CAxisAlgorithmInverse : public CAxisAlgorithmTransformation |
---|
[620] | 28 | { |
---|
| 29 | public: |
---|
[933] | 30 | CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis); |
---|
[620] | 31 | |
---|
[623] | 32 | virtual ~CAxisAlgorithmInverse() {} |
---|
[621] | 33 | |
---|
[933] | 34 | static bool registerTrans(); |
---|
| 35 | |
---|
[827] | 36 | protected: |
---|
| 37 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
[630] | 38 | |
---|
| 39 | private: |
---|
| 40 | void updateAxisValue(); |
---|
[933] | 41 | |
---|
| 42 | private: |
---|
| 43 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
| 44 | CTransformation<CAxis>* transformation, |
---|
| 45 | int elementPositionInGrid, |
---|
| 46 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 47 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 48 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 49 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 50 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 51 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
[620] | 52 | }; |
---|
| 53 | |
---|
| 54 | } |
---|
| 55 | #endif // __XIOS_AXIS_ALGORITHM_INVERSE_HPP__ |
---|