source: XIOS/dev/dev_olga/src/transformation/axis_algorithm_inverse.hpp @ 1620

Last change on this file since 1620 was 933, checked in by mhnguyen, 4 years ago

Improving transformation selection. Instead of modifying directly grid_transformation
we only need to register a new transformation with the framework

+) Update all transformations with this new method

Test
+) On Curie
+) Basic tests pass

File size: 1.7 KB
Line 
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 */
9#ifndef __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
10#define __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
11
12#include "axis_algorithm_transformation.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16
17class CAxis;
18class CInverseAxis;
19
20/*!
21  \class CAxisAlgorithmInverse
22  Inversing an axis
23*/
24class CAxisAlgorithmInverse : public CAxisAlgorithmTransformation
25{
26public:
27  CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis);
28
29  virtual ~CAxisAlgorithmInverse() {}
30
31  static bool registerTrans();
32
33protected:
34  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
35
36private:
37  void updateAxisValue();
38
39private:
40  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
41                                                CTransformation<CAxis>* transformation,
42                                                int elementPositionInGrid,
43                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
44                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
45                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
46                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
47                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
48                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
49};
50
51}
52#endif // __XIOS_AXIS_ALGORITHM_INVERSE_HPP__
Note: See TracBrowser for help on using the repository browser.