source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_expand.hpp @ 2270

Last change on this file since 2270 was 2270, checked in by ymipsl, 3 years ago

Tracking memory leak :
Tranformations and algorithms are now managed with shared_ptr.

YM

  • 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 shared_ptr<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.