source: XIOS/dev/dev_trunk_graph/src/transformation/domain_algorithm/domain_algorithm_expand.hpp @ 2026

Last change on this file since 2026 was 2026, checked in by yushan, 9 months ago

Graph intermediate commit to a tmp branch.

  • Property svn:executable set to *
File size: 2.5 KB
Line 
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
15namespace xios {
16class CDomain;
17class CExpandDomain;
18
19/*!
20  \class CDomainAlgorithmExpand
21*/
22class CDomainAlgorithmExpand : public CAlgorithmTransformationTransfer
23{
24public:
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
32protected:
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
36protected:
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
47public:
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__
Note: See TracBrowser for help on using the repository browser.