[934] | 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 | |
---|

| 15 | namespace xios { |
---|

| 16 | class CDomain; |
---|

| 17 | class CComputeConnectivityDomain; |
---|

| 18 | |
---|

| 19 | /*! |
---|

| 20 | \class CDomainAlgorithmComputeConnectivity |
---|

| 21 | */ |
---|

| 22 | class CDomainAlgorithmComputeConnectivity : public CDomainAlgorithmTransformation |
---|

| 23 | { |
---|

| 24 | public: |
---|

| 25 | CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, CComputeConnectivityDomain* compute_connectivityDomain); |
---|

| 26 | |
---|

| 27 | virtual ~CDomainAlgorithmComputeConnectivity() {} |
---|

| 28 | |
---|

| 29 | static bool registerTrans(); |
---|

| 30 | protected: |
---|

| 31 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|

| 32 | |
---|

| 33 | protected: |
---|

[944] | 34 | void computeLocalConnectivity(int type, |
---|

| 35 | CDomain* domain, |
---|

| 36 | int& nbConnectivityMax, |
---|

| 37 | CArray<int,1>& nbConnectivity, |
---|

| 38 | CArray<int,2>& localConnectivity); |
---|

[934] | 39 | |
---|

| 40 | private: |
---|

| 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__ |
---|