1 | |
---|
2 | #ifndef __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__ |
---|
3 | #define __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__ |
---|
4 | |
---|
5 | #include "domain_algorithm_transformation.hpp" |
---|
6 | #include "transformation.hpp" |
---|
7 | |
---|
8 | namespace xios { |
---|
9 | |
---|
10 | class CDomain; |
---|
11 | class CZoomDomain; |
---|
12 | |
---|
13 | /*! |
---|
14 | \class CDomainAlgorithmZoom |
---|
15 | Implementing zoom (alternative zoom) on domain |
---|
16 | */ |
---|
17 | class CDomainAlgorithmZoom : public CDomainAlgorithmTransformation |
---|
18 | { |
---|
19 | public: |
---|
20 | CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain); |
---|
21 | |
---|
22 | virtual ~CDomainAlgorithmZoom() {} |
---|
23 | |
---|
24 | static bool registerTrans(); |
---|
25 | protected: |
---|
26 | void updateDomainAttributes(); |
---|
27 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
28 | |
---|
29 | private: |
---|
30 | void updateZoom(); |
---|
31 | |
---|
32 | private: |
---|
33 | //! Global zoom begin on domain |
---|
34 | int zoomIBegin_; |
---|
35 | int zoomJBegin_; |
---|
36 | |
---|
37 | //! Global zoom end on domain |
---|
38 | int zoomIEnd_; |
---|
39 | int zoomJEnd_; |
---|
40 | |
---|
41 | //! Global zoom size on domain |
---|
42 | int zoomNi_; |
---|
43 | int zoomNj_; |
---|
44 | |
---|
45 | private: |
---|
46 | |
---|
47 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
48 | CTransformation<CDomain>* transformation, |
---|
49 | int elementPositionInGrid, |
---|
50 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
51 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
52 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
53 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
54 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
55 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
56 | }; |
---|
57 | |
---|
58 | } |
---|
59 | #endif // __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__ |
---|