[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(); |
---|
[1680] | 30 | |
---|
| 31 | virtual StdString getName() {return "Domain Trans. Filter \\n Compute Connectivity";} |
---|
| 32 | |
---|
[934] | 33 | protected: |
---|
| 34 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
| 35 | |
---|
| 36 | protected: |
---|
[944] | 37 | void computeLocalConnectivity(int type, |
---|
| 38 | CDomain* domain, |
---|
| 39 | int& nbConnectivityMax, |
---|
| 40 | CArray<int,1>& nbConnectivity, |
---|
| 41 | CArray<int,2>& localConnectivity); |
---|
[934] | 42 | |
---|
| 43 | private: |
---|
| 44 | static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc, |
---|
| 45 | CTransformation<CDomain>* transformation, |
---|
| 46 | int elementPositionInGrid, |
---|
| 47 | std::map<int, int>& elementPositionInGridSrc2ScalarPosition, |
---|
| 48 | std::map<int, int>& elementPositionInGridSrc2AxisPosition, |
---|
| 49 | std::map<int, int>& elementPositionInGridSrc2DomainPosition, |
---|
| 50 | std::map<int, int>& elementPositionInGridDst2ScalarPosition, |
---|
| 51 | std::map<int, int>& elementPositionInGridDst2AxisPosition, |
---|
| 52 | std::map<int, int>& elementPositionInGridDst2DomainPosition); |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | } |
---|
| 56 | #endif // __XIOS_DOMAIN_ALGORITHM_COMPUTE_CONNECTIVITY_HPP__ |
---|