source: XIOS/trunk/src/transformation/domain_algorithm_zoom.hpp @ 933

Last change on this file since 933 was 933, checked in by mhnguyen, 8 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: 2.1 KB
RevLine 
[631]1/*!
2   \file domain_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 domain.
8 */
9#ifndef __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
10#define __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
11
12#include "domain_algorithm_transformation.hpp"
[933]13#include "transformation.hpp"
[631]14
15namespace xios {
[933]16
17class CDomain;
18class CZoomDomain;
19
[631]20/*!
21  \class CDomainAlgorithmZoom
22  Implementing zoom on domain
23  A zoomed region can be considered as region that isnt masked.
24  Only this zoomed region is extracted to write on Netcdf.
25*/
26class CDomainAlgorithmZoom : public CDomainAlgorithmTransformation
27{
28public:
29  CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain);
30
31  virtual ~CDomainAlgorithmZoom() {}
32
[933]33  static bool registerTrans();
[827]34protected:
35  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
[631]36
37private:
38  void updateDomainDestinationMask();
39  void updateZoom();
40
41private:
42  //! Global zoom begin on domain
43  int zoomIBegin_;
44  int zoomJBegin_;
45
46  //! Global zoom end on domain
47  int zoomIEnd_;
48  int zoomJEnd_;
49
50  //! Global zoom size on domain
51  int zoomNi_;
52  int zoomNj_;
[933]53
54private:
55
56  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
57                                                CTransformation<CDomain>* transformation,
58                                                int elementPositionInGrid,
59                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
60                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
61                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
62                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
63                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
64                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
[631]65};
66
67}
68#endif // __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
Note: See TracBrowser for help on using the repository browser.