[631] | 1 | /*! |
---|
| 2 | \file domain_algorithm_transformation.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 02 Jul 2015 |
---|
| 5 | \date 02 Jul 2015 |
---|
| 6 | |
---|
| 7 | \brief Interface for all domain transformation algorithms. |
---|
| 8 | */ |
---|
| 9 | #ifndef __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 10 | #define __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__ |
---|
| 11 | |
---|
| 12 | #include "generic_algorithm_transformation.hpp" |
---|
| 13 | #include "domain.hpp" |
---|
| 14 | |
---|
| 15 | namespace xios { |
---|
| 16 | |
---|
| 17 | /*! |
---|
| 18 | \class CDomainAlgorithmTransformation |
---|
| 19 | Algorithms for domain. |
---|
| 20 | */ |
---|
| 21 | class CDomainAlgorithmTransformation : public virtual CGenericAlgorithmTransformation |
---|
| 22 | { |
---|
| 23 | public: |
---|
| 24 | CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource); |
---|
| 25 | |
---|
| 26 | virtual ~CDomainAlgorithmTransformation(); |
---|
| 27 | |
---|
| 28 | protected: |
---|
| 29 | virtual void computeGlobalGridIndexFromGlobalIndexElement(int domainDestGlobalIndex, |
---|
| 30 | const std::vector<int>& domainSrcGlobalIndex, |
---|
[827] | 31 | const std::vector<int>& destGlobalIndexPositionInGrid, |
---|
[631] | 32 | int domainPositionInGrid, |
---|
| 33 | const std::vector<int>& gridDestGlobalDim, |
---|
| 34 | const std::vector<int>& gridSrcGlobalDim, |
---|
[668] | 35 | const std::vector<size_t>& globalIndexGridDestSendToServer, |
---|
[631] | 36 | CArray<size_t,1>& globalIndexDestGrid, |
---|
| 37 | std::vector<std::vector<size_t> >& globalIndexSrcGrid); |
---|
| 38 | |
---|
[827] | 39 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >&); |
---|
| 40 | |
---|
[631] | 41 | protected: |
---|
| 42 | inline void domainGlobalIndex(const int& index, const int& niGlob, const int& njGlob, |
---|
| 43 | int& iIndex, int& jIndex); |
---|
| 44 | |
---|
| 45 | protected: |
---|
| 46 | //! Domain on grid destination |
---|
| 47 | CDomain* domainDest_; |
---|
| 48 | |
---|
| 49 | //! Domain on grid source |
---|
| 50 | CDomain* domainSrc_; |
---|
| 51 | }; |
---|
| 52 | |
---|
| 53 | } |
---|
| 54 | #endif // __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__ |
---|