[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" |
---|
[620] | 14 | |
---|
| 15 | namespace xios { |
---|
[869] | 16 | |
---|
[933] | 17 | class CAxis; |
---|
| 18 | class CInverseAxis; |
---|
| 19 | |
---|
[624] | 20 | /*! |
---|
| 21 | \class CAxisAlgorithmInverse |
---|
| 22 | Inversing an axis |
---|
| 23 | */ |
---|
[623] | 24 | class CAxisAlgorithmInverse : public CAxisAlgorithmTransformation |
---|
[620] | 25 | { |
---|
| 26 | public: |
---|
[933] | 27 | CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis); |
---|
[620] | 28 | |
---|
[623] | 29 | virtual ~CAxisAlgorithmInverse() {} |
---|
[621] | 30 | |
---|
[933] | 31 | static bool registerTrans(); |
---|
| 32 | |
---|
[1982] | 33 | virtual StdString getName() {return "inverse_axis";} |
---|
[1704] | 34 | |
---|
[827] | 35 | protected: |
---|
| 36 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
[630] | 37 | |
---|
| 38 | private: |
---|
| 39 | void updateAxisValue(); |
---|
[933] | 40 | |
---|
| 41 | private: |
---|
| 42 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
| 43 | CTransformation<CAxis>* transformation, |
---|
| 44 | int elementPositionInGrid, |
---|
| 45 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 46 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 47 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 48 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 49 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 50 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
[620] | 51 | }; |
---|
| 52 | |
---|
| 53 | } |
---|
| 54 | #endif // __XIOS_AXIS_ALGORITHM_INVERSE_HPP__ |
---|