[935] | 1 | /*! |
---|
| 2 | \file domain_algorithm_expand.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 08 Aug 2016 |
---|
| 5 | \date 08 Aug 2016 |
---|
| 6 | |
---|
| 7 | \brief Algorithm for expanding an domain. |
---|
| 8 | */ |
---|
| 9 | #ifndef __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__ |
---|
| 10 | #define __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__ |
---|
| 11 | |
---|
| 12 | #include "domain_algorithm_transformation.hpp" |
---|
| 13 | #include "transformation.hpp" |
---|
| 14 | |
---|
| 15 | namespace xios { |
---|
| 16 | class CDomain; |
---|
| 17 | class CExpandDomain; |
---|
| 18 | |
---|
| 19 | /*! |
---|
| 20 | \class CDomainAlgorithmExpand |
---|
| 21 | */ |
---|
| 22 | class CDomainAlgorithmExpand : public CDomainAlgorithmTransformation |
---|
| 23 | { |
---|
| 24 | public: |
---|
| 25 | CDomainAlgorithmExpand(CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain); |
---|
| 26 | |
---|
| 27 | virtual ~CDomainAlgorithmExpand() {} |
---|
| 28 | |
---|
| 29 | static bool registerTrans(); |
---|
[941] | 30 | |
---|
[935] | 31 | protected: |
---|
[1158] | 32 | bool isXPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear) |
---|
| 33 | bool isYPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear) |
---|
| 34 | |
---|
| 35 | protected: |
---|
[941] | 36 | void expandDomainEdgeConnectivity(CDomain* domainDestination, CDomain* domainSource); |
---|
| 37 | void expandDomainNodeConnectivity(CDomain* domainDestination, CDomain* domainSource); |
---|
[1158] | 38 | void updateRectilinearDomainAttributes(CDomain* domainDestination, |
---|
| 39 | CDomain* domainSource, |
---|
| 40 | CArray<int,2>& neighborsDomainSrc); |
---|
[941] | 41 | |
---|
[1158] | 42 | void updateUnstructuredDomainAttributes(CDomain* domainDestination, |
---|
| 43 | CDomain* domainSource, |
---|
| 44 | CArray<int,2>& neighborsDomainSrc); |
---|
| 45 | |
---|
[941] | 46 | protected: |
---|
[935] | 47 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
| 48 | |
---|
| 49 | private: |
---|
| 50 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
| 51 | CTransformation<CDomain>* transformation, |
---|
| 52 | int elementPositionInGrid, |
---|
| 53 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 54 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 55 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 56 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 57 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 58 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
| 59 | }; |
---|
| 60 | |
---|
| 61 | } |
---|
| 62 | #endif // __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__ |
---|