source: XIOS/trunk/src/transformation/domain_algorithm_compute_connectivity.hpp @ 934

Last change on this file since 934 was 934, checked in by mhnguyen, 4 years ago

Adding new transformation: Compute_connectivity_domain

Test
+) On Curie
+) Test passes

File size: 2.2 KB
Line 
1/*!
2   \file domain_algorithm_compute_connectivity.hpp
3   \author Ha NGUYEN
4   \since 03 June 2015
5   \date 12 June 2015
6
7   \brief Algorithm for compute_connectivitying on an domain.
8 */
9#ifndef __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
10#define __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
11
12#include "domain_algorithm_transformation.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16class CDomain;
17class CComputeConnectivityDomain;
18
19/*!
20  \class CDomainAlgorithmComputeConnectivity
21*/
22class CDomainAlgorithmComputeConnectivity : public CDomainAlgorithmTransformation
23{
24public:
25  CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, CComputeConnectivityDomain* compute_connectivityDomain);
26
27  virtual ~CDomainAlgorithmComputeConnectivity() {}
28
29  static bool registerTrans();
30protected:
31  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
32
33protected:
34  void computeNodeConnectivity(CDomain* domain, int& nbConnectivityMax,
35                               CArray<int,1>& nbConnectivity, CArray<int,2>& localConnectivity);
36
37  void computeEdgeConnectivity(CDomain* domain, int& nbConnectivityMax,
38                               CArray<int,1>& nbConnectivity, CArray<int,2>& localConnectivity);
39
40private:
41  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
42                                                CTransformation<CDomain>* transformation,
43                                                int elementPositionInGrid,
44                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
45                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
46                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
47                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
48                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
49                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
50};
51
52}
53#endif // __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__
Note: See TracBrowser for help on using the repository browser.