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

Last change on this file since 1704 was 1704, checked in by yushan, 14 months ago

Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.

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