source: XIOS/trunk/src/transformation/axis_algorithm_zoom.hpp @ 1169

Last change on this file since 1169 was 1169, checked in by mhnguyen, 3 years ago

Non-continuous zoom on axis
Zoomed points are defined by array index of zoom_axis

+) Update axis with new type of zoom

Test
+) On Curie
+) Work
+) Update test_complete with this new zoom.

File size: 2.0 KB
Line 
1/*!
2   \file axis_algorithm_zoom.hpp
3   \author Ha NGUYEN
4   \since 03 June 2015
5   \date 12 June 2015
6
7   \brief Algorithm for zooming on an axis.
8 */
9#ifndef __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
10#define __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
11
12#include "axis_algorithm_transformation.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16class CAxis;
17class CZoomAxis;
18
19/*!
20  \class CAxisAlgorithmZoom
21  Implementing zoom on axis
22  A zoomed region can be considered as region that isn't masked.
23  Only this zoomed region is extracted to write on Netcdf.
24*/
25class CAxisAlgorithmZoom : public CAxisAlgorithmTransformation
26{
27public:
28  CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis);
29
30  virtual ~CAxisAlgorithmZoom() {}
31
32  static bool registerTrans();
33protected:
34  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
35
36private:
37  void updateAxisDestinationMask();
38  void updateZoom();
39
40private:
41  //! Global zoom begin on axis
42  StdSize zoomBegin_;
43
44  //! Global zoom end on axis
45  StdSize zoomEnd_;
46
47  //! Global zoom size on axis
48  StdSize zoomSize_;
49
50  std::vector<int> zoomIndex_;
51
52private:
53
54  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
55                                                CTransformation<CAxis>* transformation,
56                                                int elementPositionInGrid,
57                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
58                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
59                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
60                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
61                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
62                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
63};
64
65}
66#endif // __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
Note: See TracBrowser for help on using the repository browser.