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
RevLine 
[624]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 */
[621]9#ifndef __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
10#define __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
11
[622]12#include "axis_algorithm_transformation.hpp"
[933]13#include "transformation.hpp"
[621]14
15namespace xios {
[933]16class CAxis;
17class CZoomAxis;
18
[624]19/*!
20  \class CAxisAlgorithmZoom
21  Implementing zoom on axis
[933]22  A zoomed region can be considered as region that isn't masked.
[624]23  Only this zoomed region is extracted to write on Netcdf.
24*/
[623]25class CAxisAlgorithmZoom : public CAxisAlgorithmTransformation
[621]26{
27public:
[623]28  CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis);
[621]29
[623]30  virtual ~CAxisAlgorithmZoom() {}
[621]31
[933]32  static bool registerTrans();
[827]33protected:
34  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
[621]35
[622]36private:
[623]37  void updateAxisDestinationMask();
38  void updateZoom();
[624]39
[623]40private:
[624]41  //! Global zoom begin on axis
[622]42  StdSize zoomBegin_;
[624]43
44  //! Global zoom end on axis
[622]45  StdSize zoomEnd_;
[624]46
47  //! Global zoom size on axis
[622]48  StdSize zoomSize_;
[933]49
[1169]50  std::vector<int> zoomIndex_;
51
[933]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);
[621]63};
64
65}
66#endif // __XIOS_AXIS_ALGORITHM_ZOOM_HPP__
Note: See TracBrowser for help on using the repository browser.