[1457] | 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 | protected: |
---|
| 29 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | private: |
---|
| 33 | |
---|
| 34 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
| 35 | CTransformation<CDomain>* transformation, |
---|
| 36 | int elementPositionInGrid, |
---|
| 37 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 38 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 39 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 40 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 41 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 42 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
| 43 | }; |
---|
| 44 | |
---|
| 45 | } |
---|
| 46 | #endif // __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__ |
---|