1 | /*! |
---|
2 | \brief Algorithm for reordering domain. |
---|
3 | */ |
---|
4 | #ifndef __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__ |
---|
5 | #define __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__ |
---|
6 | |
---|
7 | #include "domain_algorithm_transformation.hpp" |
---|
8 | #include "transformation.hpp" |
---|
9 | |
---|
10 | namespace xios { |
---|
11 | |
---|
12 | class CDomain; |
---|
13 | class CReorderDomain; |
---|
14 | |
---|
15 | /*! |
---|
16 | \class CDomainAlgorithmReorder |
---|
17 | Reordering data on domain |
---|
18 | */ |
---|
19 | class CDomainAlgorithmReorder : public CDomainAlgorithmTransformation |
---|
20 | { |
---|
21 | public: |
---|
22 | CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain); |
---|
23 | |
---|
24 | virtual ~CDomainAlgorithmReorder() {} |
---|
25 | |
---|
26 | static bool registerTrans(); |
---|
27 | |
---|
28 | virtual StdString getName() {return "reorder_domain";} |
---|
29 | |
---|
30 | protected: |
---|
31 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
32 | |
---|
33 | |
---|
34 | private: |
---|
35 | |
---|
36 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
37 | CTransformation<CDomain>* transformation, |
---|
38 | int elementPositionInGrid, |
---|
39 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
40 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
41 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
42 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
43 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
44 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
45 | }; |
---|
46 | |
---|
47 | } |
---|
48 | #endif // __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__ |
---|