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 "algorithm_transformation_transfer.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 CAlgorithmTransformationTransfer |
---|
23 | { |
---|
24 | public: |
---|
25 | CDomainAlgorithmExpand(bool isSource, CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain); |
---|
26 | |
---|
27 | virtual ~CDomainAlgorithmExpand() {} |
---|
28 | |
---|
29 | static bool registerTrans(); |
---|
30 | virtual StdString getAlgoName() {return "\\nexpand_domain";} |
---|
31 | |
---|
32 | protected: |
---|
33 | bool isXPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear) |
---|
34 | bool isYPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear) |
---|
35 | |
---|
36 | protected: |
---|
37 | void expandDomainEdgeConnectivity(CDomain* domainDestination, CDomain* domainSource); |
---|
38 | void expandDomainNodeConnectivity(CDomain* domainDestination, CDomain* domainSource); |
---|
39 | void updateRectilinearDomainAttributes(CDomain* domainDestination, |
---|
40 | CDomain* domainSource, |
---|
41 | CArray<int,2>& neighborsDomainSrc); |
---|
42 | |
---|
43 | void updateUnstructuredDomainAttributes(CDomain* domainDestination, |
---|
44 | CDomain* domainSource, |
---|
45 | CArray<int,2>& neighborsDomainSrc); |
---|
46 | |
---|
47 | public: |
---|
48 | static CGenericAlgorithmTransformation* create(bool isSource, CGrid* gridDst, CGrid* gridSrc, |
---|
49 | CTransformation<CDomain>* transformation, |
---|
50 | int elementPositionInGrid, |
---|
51 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
52 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
53 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
54 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
55 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
56 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
57 | static bool dummyRegistered_; |
---|
58 | }; |
---|
59 | |
---|
60 | } |
---|
61 | #endif // __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__ |
---|