source: XIOS/trunk/src/transformation/axis_algorithm_transformation.hpp @ 624

Last change on this file since 624 was 624, checked in by mhnguyen, 6 years ago

Final tests of zoom and inverse on axis

+) Modify test_client and test_complete to work with new grid definition
+) Correct some bugs causing memory leak
+) Clean abundant code
+) Add more comments to new files

Test
+) On Curie
+) test_client and test_complete pass with correct results

File size: 1.5 KB
Line 
1/*!
2   \file axis_algorithm_transformation.hpp
3   \author Ha NGUYEN
4   \since 14 May 2015
5   \date 09 June 2015
6
7   \brief Interface for all axis transformation algorithms.
8 */
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
15namespace xios {
16
17/*!
18  \class CAxisAlgorithmTransformation
19  Algorithms for axis.
20*/
21class CAxisAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
22{
23public:
24  CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource);
25
26  virtual ~CAxisAlgorithmTransformation();
27
28protected:
29  virtual void computeGlobalIndexFromGlobalIndexElement(int axisDestGlobalIndex,
30                                                        const std::vector<int>& axisSrcGlobalIndex,
31                                                        int axisPositionInGrid,
32                                                        const std::vector<int>& gridDestGlobalDim,
33                                                        const CArray<size_t,1>& globalIndexGridDestSendToServer,
34                                                        CArray<size_t,1>& globalIndexDestGrid,
35                                                        std::vector<CArray<size_t,1> >& globalIndexSrcGrid);
36  void computeIndexSourceMapping();
37
38protected:
39  //! Global index of an axis on grid destination
40  std::vector<int> axisDestGlobalIndex_;
41
42  //! Size of
43  int axisDestGlobalSize_;
44
45};
46
47}
48#endif // __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
Note: See TracBrowser for help on using the repository browser.