source: XIOS/trunk/src/transformation/domain_algorithm_expand.hpp @ 1704

Last change on this file since 1704 was 1704, checked in by yushan, 5 years ago

Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.

File size: 2.6 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 "domain_algorithm_transformation.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16class CDomain;
17class CExpandDomain;
18
19/*!
20  \class CDomainAlgorithmExpand
21*/
22class CDomainAlgorithmExpand : public CDomainAlgorithmTransformation
23{
24public:
25  CDomainAlgorithmExpand(CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain);
26
27  virtual ~CDomainAlgorithmExpand() {}
28
29  static bool registerTrans();
30
31  virtual StdString getName() {return "Domain Trans. Filter \\n Expand";}
32
33protected:
34  bool isXPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear)
35  bool isYPeriodic_; // Flag to determine the periodicity of expansion (only for rectilinear)
36
37protected:
38  void expandDomainEdgeConnectivity(CDomain* domainDestination, CDomain* domainSource);
39  void expandDomainNodeConnectivity(CDomain* domainDestination, CDomain* domainSource);
40  void updateRectilinearDomainAttributes(CDomain* domainDestination,
41                                         CDomain* domainSource,
42                                         CArray<int,2>& neighborsDomainSrc);
43
44  void updateUnstructuredDomainAttributes(CDomain* domainDestination,
45                                          CDomain* domainSource,
46                                          CArray<int,2>& neighborsDomainSrc);
47
48protected:
49  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
50
51private:
52  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
53                                                CTransformation<CDomain>* transformation,
54                                                int elementPositionInGrid,
55                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
56                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
57                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
58                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
59                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
60                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
61};
62
63}
64#endif // __XIOS_DOMAIN_ALGORITHM_EXPAND_HPP__
Note: See TracBrowser for help on using the repository browser.